-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Zipkin translator not respecting "error" tag correctly #16530
Comments
Pinging code owners: @open-telemetry/collector-approvers. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
It seems reasonable to me, and matches the logic we have in the Jaeger translator: opentelemetry-collector-contrib/pkg/translator/jaeger/jaegerproto_to_traces.go Lines 267 to 279 in 870f399
In summary: if it's a boolean, and if it's |
Fwiw, this is also defined in the zipkin exporter specs: https://opentelemetry.io/docs/reference/specification/trace/sdk_exporters/zipkin/#status |
I think this behavior would be weird. This means that if I throw an exception/error with an error message |
The span would still be in error b/c the OTLP span would be have its status code set to error. Presumably on translating from OTLP back to Zipkin you would have to add error="true" if the otlp error status was set and there was no error attribute. I proposed the behavior only to keep it backwards compatible with existing, but don't have strong opinions. |
I see your point. I'm also thinking that if the previous behavior is a bug (I'm not saying it is), it should be ok to break (fix) it. |
I'm fine either way as well, being slightly in favor of @joe-elliott's proposal, as it matches the behavior of the Jaeger translator. Bonus points: it has the least attrition to current users of this component. |
Produced tags by the JS library:
go
At this point |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@open-telemetry/collector-approvers I think this is still very relevant, it makes the Zipkin receiver of the collector quite useless in scenarios where an error is attached to the span which is a rather important use-case. |
I'm open to accepting a pull request changing this, especially if it means aligning with OTel JS. The difficulty here is figuring out the right thing to do, given we don't have Zipkin code owners in this repository. If you know anyone who'd be interested in taking care of that component, let me know. |
@jpkrohling Could you please clarify one thing to me? Are you seeking advice from Zipkin maintainers or are you saying that the Zipkin receiver does not have an owner so it is not maintained anymore? |
Both :-) We do not have code owners for the Zipkin exporter/receiver/translator, and none of the current maintainers of this repository are Zipkin experts, from what I know. |
@jpkrohling Feel free to ping me if there is some Zipkin-specific question I can answer. I used to be an active committer for Zipkin (not so active these days). As for this issue, it sounds like there is an acceptable change to be made. Is the only thing remaining to do is for someone to make a pull request with the change? Or is there still some open question about how things should be changed? |
At this point, yes. I'll gladly review and merge a PR that does what this issue here proposes. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I'm not sure this will be less of an issue with time, can somebody label this issue so that we don't need to ping-pong with the issue bot? |
…4547) **Description:** <Describe what has changed.> Fixing a bug - Stop dropping error tags from Zipkin spans. The old code removes all errors from those spans, rendering them useless if an actual error happened. In addition, no longer delete error tags if they contain useful information. This now only deletes them if they are "true", and thus don't contain useful information. Also fixes the whole issue of **Link to tracking Issue:** #16530 **Testing:** Absolutely none, I have written no Go code before this and have not even run the code. I'm hoping CI saves me the trouble of installing and running everything locally --------- Co-authored-by: Curtis Robert <crobert@splunk.com> Co-authored-by: Curtis Robert <92119472+crobert-1@users.noreply.github.com> Co-authored-by: Antoine Toulme <antoine@lunar-ocean.com>
I can be code owner for zipkin. |
I can be one too... I think with @jcchavezs and myself we have two actual maintainers of Zipkin being able to help out keep things idiomatic and consistent. |
That's great to hear! |
Hello Everyone! I am new to the community and looking to contribute where I can. Is there anything left to be done for this issue? If I am interpreting the code correctly, I see that the status is being set to error if there exists an error tag, and the tag is only removed if the tag value string is true. |
Component(s)
receiver/zipkin
What happened?
Description
When consuming Zipkin data the translation layer does not correctly translate the "error" tag into a status of error unless the string is exactly "true". Conventionally if a Zipkin span has the "error" tag with any valid data it should be considered an errored span.
This logic likely needs to be updated to accept values other than "true".
opentelemetry-collector-contrib/pkg/translator/zipkin/zipkinv2/to_translator.go
Lines 168 to 169 in 97eb6ad
This should be updated to:
Unsure about the second line, but it preserves the existing behavior and seems reasonable to me.
Steps to Reproduce
Send zipkin data with a key/value tag "error" with any value other than "true".
Expected Result
The OTLP status code is correctly set to error.
Actual Result
The OTLP status code is set to ok.
Collector version
v0.66.0
Environment information
Environment
any
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: