-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: add span status code/description cli and env var #111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
case "error": | ||
return codes.Error | ||
default: | ||
return codes.Unset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to warn here I suppose, but it's not blocking or anything.
@tobert Any plans to merge it in? |
Yeah. Apologies, I've been busy. I'm away from my dev machine right now. I
will make some time in the next day or two to read & merge. And release, if
that helps.
…-Amy
On Sat, Oct 1, 2022 at 9:29 AM Sergii Puliaiev ***@***.***> wrote:
@tobert <https://github.com/tobert> Any plans to merge it in?
—
Reply to this email directly, view it on GitHub
<#111 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACWSHXAXMRGIMUOSYVMHATWBBRHBANCNFSM55ZGMTNQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I appreciate the thoroughness of the PR, and accompanying tests :)
I'm in the process of migrating machines so I might take a bit to release, but I will get it done soon.
@tobert no worries, thank you for circling back to this and also for this repo in general, good stuff! |
@tobert Any plans to release the tool with the status flag? Thank you! |
Summary
Follow up to #27 , which was quite out of date so i'm closing it.
This pr adds
--status-code, OTEL_CLI_STATUS_CODE, status-code
and--status-description, OTEL_CLI_STATUS_DESCRIPTION, status-description
Cli Argument, Env var, and config key, respectively, for setting a span status's code and description.An important note is that description will only be set if the span status code is an
error
, which conforms to the specificationhttps://github.com/open-telemetry/opentelemetry-specification/blob/480a19d702470563d32a870932be5ddae798079c/specification/trace/api.md#set-status
There's a few rough edges, in that this doesn't get respected for clievents ( didnt seem necessary) and execCmd stuffs (i figure that was handled by the
--fail
option). Also, I didn't include a shorthand syntax for either CLI arg, since they have to be single letter, andc
was taken already, and it just kinda felt like it'd become a bikeshed for very little value so i dropped it.But i figure this is a good starting point, and since the older PR had fallen out of date, i wanted to at least implement the feedback that was added on there. I have pretty limited bandwidth but happy to fix anything up if needed here