10000 add statuses API + Go/Python/TypeScript SDK support by vito · Pull Request #9327 · dagger/dagger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add statuses API + Go/Python/TypeScript SDK support #9327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

vito
Copy link
Contributor
@vito vito commented Jan 7, 2025

Goals

  • High level API for OTel spans (called "statuses" in our API)
    • Add withFoos for customizing the span
  • Ergonomic SDK APIs, without too much effort
    • This is all OTel under the hood so this feels like "progressive enhancement"
    • Go
    • Python
    • TypeScript
  • Figure out what other high level APIs we might want
    • Global spans - if any are present, we prioritize showing them over the "lower-level" full trace
      • This turned into the "reveal" mechanism
    • Global logging? Or do we just do spans? - let's do logging later
    • Logging to a span? - let's do logging later
  • Support rich UI controls
    • Icons/emojis?
    • Existing attributes? (internal, encapsulate, encapsulated) reveal/passthrough
    • Expanded vs. collapsed by default? haven't needed this, 'reveal' covers it?

Questions/TODOs

  • Do we make a point to hide OTel "span" terminology, or is it OK to leave it exposed as an advanced API alongside simpler ones ("task")?
    • June 27 update: yep - "statuses"
  • Audit creating nested spans with the same name - I think this breaks atm, too reliant on DagQL cache
  • Go SDK should have a pattern for bubbling up errors to spans

Examples

See the viztest/ changes for examples in Go, Python, and TypeScript.

@vito vito force-pushed the frontend-api branch 4 times, most recently from ca6b043 to 708d96a Compare January 10, 2025 04:42
@vito vito mentioned this pull request Jan 13, 2025
@cwlbraa
Copy link
Contributor
cwlbraa commented Jan 14, 2025

looking at the example traces, i can't tell– does this approach lose the ability for these traces to parent to a normal trace if users want to display them "normally" ? or is the idea that the CLI prioritizing showing this class of traces over the big ones and then links to both in cloud?

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@github-actions github-actions bot closed this Mar 29, 2025
@beingminimal
Copy link

@vito Please reopen this PR if this should be supported. Thanks

@vito vito reopened this Apr 7, 2025

This comment was marked as outdated.


@doc "Start a new instance of the span."
@spec start(t()) :: {:ok, Dagger.Span.t()} | {:error, term()}
def start(%__MODULE__{} = span) do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I don't need to implement OTel span, right?

This comment was marked as outdated.

@github-actions github-actions bot closed this May 6, 2025
vito added 6 commits June 26, 2025 15:52
Signed-off-by: Alex Suraci <alex@dagger.io>
general idea is to keep building on Span primitive as the gateway to
context propagation, and to provide a simplified dag.Reveal() API for
revealing a bunch of spans without wrapping them (by using a passthrough
dummy span).

Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
This reverts commit 8b57e44.

Signed-off-by: Alex Suraci <alex@dagger.io>
vito and others added 10 commits June 26, 2025 16:25
Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
…pendency management

Signed-off-by: Tom Chauveau <tom@dagger.io>
Signed-off-by: Tom Chauveau <tom@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
sometimes this has unreleased APIs

Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
* better docs
* withActor -> withActorEmoji
* add withReceivedMessage (a bit awkward, but when in Rome...)
* remove withInternal; we don't really consistently support it yet,
  unsure if even needed

update viztest along the way

Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
@vito vito changed the title add OTel span API + Go/Python SDK support add statuses API + Go/Python/TypeScript SDK support Jun 27, 2025
@vito vito marked this pull request as ready for review June 27, 2025 04:37
@vito vito requested review from a team as code owners June 27, 2025 04:37
vito added 3 commits June 27, 2025 00:49
Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0