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

gRPC plugin throws an error when no traceparent is present #903

Closed
jordanworner opened this issue Mar 26, 2020 · 0 comments · Fixed by #904
Closed

gRPC plugin throws an error when no traceparent is present #903

jordanworner opened this issue Mar 26, 2020 · 0 comments · Fixed by #904
Assignees
Labels
bug Something isn't working

Comments

@jordanworner
Copy link
Contributor

What version of OpenTelemetry are you using?

0.5.1

What version of Node are you using?

v12.16.0

What did you do?

Sent a gRPC request with no metadata

What did you expect to see?

The request completing successfully

What did you see instead?

TypeError: Cannot read property 'match' of undefined
at parseTraceParent (node_modules/@opentelemetry/core/build/src/context/propagation/HttpTraceContext.js:36:31)
at HttpTraceContext.extract (node_modules/@opentelemetry/core/build/src/context/propagation/HttpTraceContext.js:73:29)
at PropagationAPI.extract (node_modules/@opentelemetry/api/build/src/api/propagation.js:63:33)
at Object.func (node_modules/@opentelemetry/plugin-grpc/build/src/grpc.js:86:62)
at node_modules/grpc/src/server.js:593:13

Additional context

It looks like the issue is with the getter function the grpc plugin is passing to the propagation API. The grpc metadata object returns an empty array when the key isn't present, the propagator classes look like they are expecting a falsy value.

@jordanworner jordanworner added the bug Something isn't working label Mar 26, 2020
@dyladan dyladan self-assigned this Mar 26, 2020
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this issue Dec 15, 2023
Co-authored-by: Valentin Marchaud <[email protected]>
Co-authored-by: Daniel Dyla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants