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

Unnecessary conversion of trace context to base64 in OTLP exporters #4338

Closed
seemk opened this issue Dec 1, 2023 · 2 comments · Fixed by #4343
Closed

Unnecessary conversion of trace context to base64 in OTLP exporters #4338

seemk opened this issue Dec 1, 2023 · 2 comments · Fixed by #4343

Comments

@seemk
Copy link
Contributor

seemk commented Dec 1, 2023

OTLP pipeline converts trace and span IDs from hex to base64 only for these to be decoded back from base64 in protobuf.js when serializing the payload.

hexToBase64 should be replaced with hexToBinary which converts the hex strings to Uint8Array.

@dyladan
Copy link
Member

dyladan commented Dec 1, 2023

When this was written our protobuf serialization library took base64 input in order to produce binary output, not Uint8Array. We've since changed a lot about the way proto is handled so I wouldn't be surprised if both work now.

@seemk
Copy link
Contributor Author

seemk commented Dec 2, 2023

When this was written our protobuf serialization library took base64 input in order to produce binary output, not Uint8Array. We've since changed a lot about the way proto is handled so I wouldn't be surprised if both work now.

Yup, Uint8Array can be passed to protobufjs and it's quite efficient.

Fix at #4343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants