Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Support for Jaeger tags with binary value #1649

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

alejandrodnm
Copy link
Contributor

@alejandrodnm alejandrodnm commented Sep 16, 2022

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 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.

Merge requirements

Please take into account the following non-code changes that you may need to make with your PR:

  • CHANGELOG entry for user-facing changes
  • Updated the relevant documentation

@alejandrodnm alejandrodnm force-pushed the adn/jaeger-binary-tags branch 2 times, most recently from c3cdf21 to 23ce524 Compare September 19, 2022 13:24
@alejandrodnm alejandrodnm force-pushed the adn/jaeger-binary-tags branch 5 times, most recently from 266d914 to dab2978 Compare September 20, 2022 14:24
@alejandrodnm alejandrodnm changed the title Handle jaeger binary values Support for Jaeger tags with binary value Sep 20, 2022
@alejandrodnm alejandrodnm force-pushed the adn/jaeger-binary-tags branch 2 times, most recently from b69a797 to 441f42f Compare September 20, 2022 14:29
@alejandrodnm alejandrodnm marked this pull request as ready for review September 20, 2022 14:38
@alejandrodnm alejandrodnm requested a review from a team as a code owner September 20, 2022 14:38
@alejandrodnm alejandrodnm force-pushed the adn/jaeger-binary-tags branch 3 times, most recently from 973656b to 3c2a61e Compare September 27, 2022 10:00
@alejandrodnm alejandrodnm force-pushed the adn/jaeger-binary-tags branch 4 times, most recently from 175005f to dda53fc Compare September 28, 2022 08:08
Copy link
Member

@arajkumar arajkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.
@alejandrodnm alejandrodnm enabled auto-merge (rebase) September 30, 2022 08:28
@alejandrodnm alejandrodnm merged commit 04d2664 into master Sep 30, 2022
@alejandrodnm alejandrodnm deleted the adn/jaeger-binary-tags branch September 30, 2022 08:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants