This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 170
Support for Jaeger tags with binary value #1649
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c3cdf21
to
23ce524
Compare
alejandrodnm
commented
Sep 19, 2022
266d914
to
dab2978
Compare
b69a797
to
441f42f
Compare
arajkumar
reviewed
Sep 21, 2022
arajkumar
suggested changes
Sep 21, 2022
pkg/tests/end_to_end_tests/fixtures/jaeger_binaray_tag/trace.json
Outdated
Show resolved
Hide resolved
441f42f
to
c231ed2
Compare
973656b
to
3c2a61e
Compare
arajkumar
reviewed
Sep 27, 2022
175005f
to
dda53fc
Compare
dda53fc
to
1c32cea
Compare
arajkumar
approved these changes
Sep 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
1c32cea
to
20d59ef
Compare
Since we are using the OTEL translator, when ingesting Jaeger traces all the tags with `VType=ValueType_BINARY` are being encoded into base64 and stored as strings. The context of the type of value is lost after this translation occurs, meaning that, when we return those tags in a Jaeger query we return the base64 string as `VType=ValueType_STRING`. To preserve the type of the value, the prefix `data:application/octet-stream; base64,` will be added to the base64 string before storing in the DB. When retrieving a trace we look for tags that are string and have this prefix, we remove it and return a `ValueType_BINARY` with the result of decoding the base64 string. The prefix was choosen from the `The "data" URL scheme` RFC https://www.rfc-editor.org/rfc/rfc2397#section-2 . Jaeger allows these type of tags for Spans, Process and Logs.
20d59ef
to
bdb863a
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Support for Jaeger tags with binary value
Since we are using the OTEL translator, when ingesting Jaeger traces all
the tags with
VType=ValueType_BINARY
are being encoded into base64 andstored as strings. The context of the type of value is lost after this
translation occurs, meaning that, when we return those tags in a Jaeger
query we return the base64 string as
VType=ValueType_STRING
.To preserve the type of the value, the prefix
data:application/octet-stream; base64,
will be added to the base64string before storing in the DB. When retrieving a trace we look for
tags that are string and have this prefix, we remove it and return a
ValueType_BINARY
with the result of decoding the base64 string.The prefix was choosen from the
The "data" URL scheme
RFChttps://www.rfc-editor.org/rfc/rfc2397#section-2 .
Jaeger allows these type of tags for Spans, Process and Logs.
Merge requirements
Please take into account the following non-code changes that you may need to make with your PR: