agardnerIT / tracepusher

Generate and push OpenTelemetry Trace data to an OTEL collector in JSON format
Apache License 2.0
53 stars 11 forks source link

Add ability to set the status #70

Closed agardnerIT closed 1 year ago

agardnerIT commented 1 year ago

The span status is currently hardcoded to 1 which means OK.

https://github.com/agardnerIT/tracepusher/blob/8092fa65c675d22c4017cf24b904e192920cc3c9/tracepusher.py#L330

Add the ability for users to specify that a span is in an error state.

https://github.com/agardnerIT/tracepusher/blob/8092fa65c675d22c4017cf24b904e192920cc3c9/tracepusher.py#L330

According to the spec, choices are 0 (unset), 1 (OK) or 2 (error).

For backwards compatibility, the default should be OK or 1.

Tracepusher users should be able to set the span status in plain English, not rely on obscure integers.

ie. --span-status OK or --span-status ERROR not --span-status 0 or --span-status 1

Definition on Done

1) Users can set a span status of OK or ERROR via a new optional argument: --span-status or shortcode -s eg. -s OK 2) The documentation is updated to include this flag as a new page 3) Backwards compatibility is maintained. If a status is not given, assume OK

agardnerIT commented 1 year ago

Completed and available in v0.1.0 of the operator. Will be released in v0.9.0 of standalone binary.