Skip to content
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

Envoy doesn't set span name, aka operation name, when using the OpenTelemetry tracing provider #34063

Closed
therealak12 opened this issue May 9, 2024 · 1 comment · Fixed by #34062

Comments

@therealak12
Copy link
Contributor

therealak12 commented May 9, 2024

Title: Envoy doesn't set span name, aka operation name when using the OpenTelemetry tracing provider

Description:

When using the OpenTelemetry tracing provider, although the decorator.operation is set, the produces spans have the default ingress and egress names.

Repro steps:

We're experiencing the issue in a relatively large cluster (+3000 routes). The opentelemetry sandbox can be used to reproduce the issue. Just run the sandbox and view the logs of the opentelemetry container.

Config:

The configuration file provided in the examples/opentelemetry directory can be used. Although it sets the decoration.operation, the logs show it's not used.

Logs:
Note the Name field below. It should be filled with the decorator.operation config not egress ....

Resource SchemaURL: 
Resource attributes:
     -> service.name: Str(front-envoy)
ScopeSpans #0
ScopeSpans SchemaURL: 
InstrumentationScope  
Span #0
    Trace ID       : c70726f22ff543661b4cec65b6a531d1
    Parent ID      : 
    ID             : a0eeb5dd051282f8
    Name           : egress localhost:10000
    Kind           : Client
    Start time     : 2024-04-29 03:48:15.683442 +0000 UTC
    End time       : 2024-04-29 03:48:15.691976 +0000 UTC
    Status code    : Unset
    Status message : 
Attributes:
     -> node_id: Str()
     -> zone: Str()
     -> guid:x-request-id: Str(97637684-df5e-920e-abf3-fbf13901205e)
     -> http.url: Str(http://localhost:10000/trace/2)
     -> http.method: Str(GET)
     -> downstream_cluster: Str(-)
     -> user_agent: Str(curl/7.81.0)
     -> http.protocol: Str(HTTP/1.1)
     -> peer.address: Str(172.22.0.1)
     -> request_size: Str(0)
     -> response_size: Str(37)
     -> component: Str(proxy)
     -> upstream_cluster: Str(envoy_cluster2)
     -> upstream_cluster.name: Str(envoy_cluster2)
     -> http.status_code: Str(200)
     -> response_flags: Str(-)
	{"kind": "exporter", "data_type": "traces", "name": "logging"}

Apparently, the fix is simple. I'm accompanying the issue with PR#34062.
Kindly please let me know if not implementing the setOperation function was intentional.

@phlax
Copy link
Member

phlax commented May 10, 2024

cc @AlexanderEllis @htuch

htuch pushed a commit that referenced this issue May 13, 2024
The detailed description is provided in #34063. In short, the MR implements a method for the OpenTelemetry tracing provider that was left empty and thus made the setOperation method a no-op.

Risk Level: Low
Testing: Unit testing and the sandbox.

Fixes #34063

Signed-off-by: Ahmad Karimi <ak12hastam@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants