aws-observability / aws-otel-collector

AWS Distro for OpenTelemetry Collector (see ADOT Roadmap at https://github.com/orgs/aws-observability/projects/4)
https://aws-otel.github.io/
Other
578 stars 239 forks source link

Kafka consumer is showing invalid service name in XRay Service Map #894

Open sukrit007 opened 2 years ago

sukrit007 commented 2 years ago

Describe the bug Service name for Kafka consumer is not leveraging service.name in OTEL_RESOURCE_ATTRIBUTES. Instead it shows name of consumer and method in XRay.

Steps to reproduce

What did you expect to see? I was expecting the name of service to match service.name in OTEL_RESOURCE_ATTRIBUTES

What did you see instead? Instead it showed me service name: " process"

Additional context

anuraaga commented 2 years ago

Hi @sukrit007 - thanks for reporting, this is a known issue related to messaging spans.

@willarmiros This is the issue where we don't fill service name for spans that aren't SERVER because we don't know if they are a local root or not. I have pinged https://github.com/open-telemetry/opentelemetry-specification/issues/366 to see if we can get a clearer signal there, in the mean time you may look into any other workaround we may be able to accomplish in the xray exporter.

willarmiros commented 2 years ago

Thanks - we will take a look at the renaming in awsxrayexporter

sukrit007wawa commented 2 years ago

This was the behavior with batch consumer. When we changed the consumer to Spring Cloud Stream (non-batch consumer), we are seeing spans of consumer service under producer service. Even though the two services are deployed as separate EKS Deployments with appropriate OTEL_RESOURCE_ATTRIBUTES.

image

Tagging @alolita

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

bryan-aguilar commented 2 years ago

@willarmiros is this a WIP and should thus not be tagged stale?

willarmiros commented 2 years ago

The issue of service.name not being respected is covered here too: https://github.com/aws-observability/aws-otel-java-instrumentation/issues/158

I think we should leave this open since the change is on the collector and it's a WIP.

bryan-aguilar commented 2 years ago

Added it to the backlog. Should keep it from going stale until we have a better method.

jgprogramming commented 2 years ago

Hi @willarmiros , is there an ETA for this issue? Or any known workaround?

willarmiros commented 1 year ago

Hi all, thanks for raising this. I've documented the ask to prioritize service.name and we will make the change soon as long as there are no negative consequences of doing so that we can find.

colin-humphrey commented 11 months ago

Hey @willarmiros What's happening to this feature - it would be good to get an updated perspective, is this ready to ship or still WIP? I'll ping our TAM and Solutions Architect in parallel.

atshaw43 commented 11 months ago

This ask would be covered by this PR. It would need some modification so that we do not promote consumer spans. https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/25176/files

atshaw43 commented 11 months ago

This is being covered in this PR: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/29564