-
Notifications
You must be signed in to change notification settings - Fork 54
Description
I'm seeking guidance on the best way to find associated mappings for SpanKind & errors.
SpanKind
The current codebase has the following snippet:
// Add Kind as a tag for now since there is no structured way of sending it with Stackdriver
// Trace API V2
if (zipkinSpan.kind() != null) {
attributes.putAttributeMap(kKindLabelKey, toAttributeValue(kindLabel(zipkinSpan.kind())));
}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)