-
Notifications
You must be signed in to change notification settings - Fork 54
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
Error label & SpanKind #173
Comments
Sorry we missed this, @fzakaria. Have you been able to get error messages into Trace? |
I don't think so although I've lost context on it. |
Thank you! |
for future readers I still believe it to be a gap using GCPSender but achieving 100% is likely out of scope for this as a compatability layer, that case better suited with using a library more native to CloudTrace |
That's fair -- if this requirement comes up again, this issue should be reopened. |
FWIW the throwable isn't lost in Brave. It is just that this implementation loses it. There's a That no one yet has implemented I'm re-opening as this issue isn't solved and the data model is a generic, not a personal requirement. |
there are two issues here, btw. The SpanKind maps exactly to Brave, this can be fixed The service is not just java anyway, and literally GRPC examples are used. I recommend simply falling back to setting both to the same value as "error" when non-empty and other tags don't exist https://cloud.google.com/trace/docs/trace-labels Later, when a SpanHandler is implemented, a Throwable can be considered when parsing (along with the "error" tag) |
Some other things that can be done.. based on the description of error, one of them can be the RPC status, which we have a field for
https://github.com/openzipkin/brave/tree/master/instrumentation/rpc#span-data-policy Almost the same on http
https://github.com/openzipkin/brave/tree/master/instrumentation/http#span-data-policy Anyone free to fix this one? looks easy peasy |
The missing compatibility for kind does seem trivial and maybe should be broken into a separate issue. It seems pretty straightforward. I think you lost me a little with the error codes; I am a bit out of touch with the codebase as I am newly back from paternity leave.
I think you mean: If so, that seems like a straightforward change for the attribute extractor as well.
The values look to be the same for "error" and either "http.status_code" & "rpc.error_code". I'm not clear on your recommendation that one of the CloudTrace tags (/error/message or /error/name) can that value. |
Thanks @fzakaria. honestly the mapping isn't that tight it says literally:
So, my guess is that this is a long name ( In that case...
sometimes having some rules is better than none, as at least it can get feedback and it is better than doing nothing! |
I'm seeking guidance on the best way to find associated mappings for SpanKind & errors.
SpanKind
The current codebase has the following snippet:
According to the documentation there seems to be structured field for reporting the kind.
https://cloud.google.com/trace/docs/reference/v2/rest/v2/SpanKind
Does this matter for the purpose of the CloudTrace UI?
Error
I believe there to be a semantic gap between Zipkin's, specifically Brave's, concept of an error tag and the corresponding error value in CloudTrace.
It is conventional in Zipkin to add a possibly empty "error" tag when a span failed. In Brave the backfilling of this tag with an Exception type name (or message) is deferred until it is known to be Zipkin2 format.
CloudTrace according to their documentation supports the following:
/error/message: An error message.
/error/name: Display name for the error.
(https://cloud.google.com/trace/docs/trace-labels)
StackTrace
https://cloud.google.com/trace/docs/reference/v2/rest/v2/StackTrace
It would be great if the AttributesExtractor could translate the error tag accordingly.
From my investigation of the code, it seems like the Span translation happens from Zipkin2 format rather than brave's Span which may unfortunate since the Throwable information is then lost.
(Would possibly allow creation of the StackTrace attribute)
The text was updated successfully, but these errors were encountered: