jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.13k stars 2.4k forks source link

Duplicate tag keys due to agent or collector level tags #3203

Open pbdger opened 3 years ago

pbdger commented 3 years ago

Describe the bug By using the --collctor.tags parameter, duplicate key entries can be created by the agent.

To Reproduce Steps to reproduce the behavior:

Set tags parameter --collector.tags=collector=setViaAgentCli Start the Agent *Create a tracer in Your code with tag collector=setInTracerCreation

Expected behavior tags are defined as key:value pairs (https://opentracing.io/docs/overview/tags-logs-baggage/#tags). Therefore, the expectation is that when the trace is displayed at the process, there is only one tag key agent.

Screenshots image

Version:

OS: MacOs Jaeger version: 1.25 *Deployment: Docker

Additional context The fix would also need to define if the tag from the --collector.tags parameter always overwrites a tag from the tracer or if the tags from the tracer is lead.

pavolloffay commented 2 years ago

The attributes/tags in jaeger are not map - it is a list so duplicate entires are supported by design.

yurishkuro commented 2 years ago

@pavolloffay I think it would be a valid feature to have a CLI flag to control what to do with dups added by collector/agent: keep, drop, replace.

pavolloffay commented 2 years ago

I don't have any objections for it.