You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our applications we have a mixture of spans and we use all types (Server, Client, Consumer, Producer, Internal).
In particular, some of our spans are INTERNAL because they are triggered internally and not by a RPC or broadcast call.
So I can have an INTERNAL span called "Initialisation" for instance where the service name is set as "My Application".
If look at the trace in Tempo/Grafana, the trace appears (as expected) as belonging to the service "My Application".
But if I look at the same trace in AWS CloudWatch, the name of the node is not "My Application" but "Initialisation" instead.
So currently in order to work around this logic, we are setting the type of our root internal traces as SERVER so that the node appears correctly.
The same outcome would work if we set a property aws.span.kind to LOCAL_ROOT but while this would work, it sounds weird to set AWS specific attributes so that the exporter behaves correctly.
To me the following logic would make more sense but I wanted to ask this here as I don't fully understand the rationale with the current code:
ifspan.Kind() ==ptrace.SpanKindServer||span.ParentSpanID().IsEmpty() {
iflocalServiceName, ok:=attributes.Get(awsLocalService); ok {
name=localServiceName.Str()
}
}
If a trace does not have a parent, it is root by definition and therefore the name should behave the same as a Server ?
This logic is similar to the earlier code where a span is considers a subsegment if:
it is not SERVER
and it is not CONSUMER
and it does not have a parent
By correlation, a span is a top segment if it does not have a parent?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
In our applications we have a mixture of spans and we use all types (Server, Client, Consumer, Producer, Internal).
In particular, some of our spans are INTERNAL because they are triggered internally and not by a RPC or broadcast call.
So I can have an INTERNAL span called "Initialisation" for instance where the service name is set as "My Application".
If look at the trace in Tempo/Grafana, the trace appears (as expected) as belonging to the service "My Application".
But if I look at the same trace in AWS CloudWatch, the name of the node is not "My Application" but "Initialisation" instead.
I believe this behaviour is because of this code:
So currently in order to work around this logic, we are setting the type of our root internal traces as SERVER so that the node appears correctly.
The same outcome would work if we set a property
aws.span.kindtoLOCAL_ROOTbut while this would work, it sounds weird to set AWS specific attributes so that the exporter behaves correctly.To me the following logic would make more sense but I wanted to ask this here as I don't fully understand the rationale with the current code:
If a trace does not have a parent, it is root by definition and therefore the name should behave the same as a Server ?
This logic is similar to the earlier code where a span is considers a subsegment if:
By correlation, a span is a top segment if it does not have a parent?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions