#API for user-friendly output messages?

1 messages · Page 1 of 1 (latest)

blissful drum
#

Just curious if there are any useful tricks in the current state and/or future plans to be able to output more deliberate, high-level messages to the caller of a dagger function in a "nice" way.
Printing to stdout kinda does the job (IME works a bit better in the "unhappy" case when the overall dagger call errors out) but it still gets lost in the verbose dagger engine output.
I don't necessarily mind the verbose --progress plain output, but it would be great if we could have an API to print a high-level user-directed message that would somehow "stand out" there.

#

API for user-friendly output messages?

grand snow
bleak frost
#

OTel spans should just show up, yeah, no additional tricks needed, though whether they're visible enough for this is another question - I've mentioned in other threads an idea of promoting a span to the top-level, but the idea isn't fully baked

blissful drum
#

Is there a global trace (perhaps on the Context ?) I can add spans to? (sorry if this is in the docs somewhere, didn't manage to find anything)

bleak frost
#

You would need the ID of the root span, but I don't think there's a way to access it

blissful drum
#

so it's not really supported then or how else would I do it if that's not exposed?

grand snow
#

what Alex is referring to is that you don't have way to connect your spans to the root span, but they'll be connected to your dagger function span