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

Fix Hex Digit Count in Parent ID for W3C #26

Merged
merged 9 commits into from
Dec 15, 2022

Conversation

javiersoto15
Copy link
Contributor

Following the W3C traceparent convention from the website (https://www.w3.org/TR/trace-context/#parent-id), the parent ID has to be a 16 byte array, the hex string representation has to contain 16 chars to match the expected length.
Previously the binary was giving parents-id in the form of '7db45e47', when it has to be in the form of '28345e8fd8449de5'
This satisfy the regex used in opentelemetry as well.
(ref: https://github.com/open-telemetry/opentelemetry-go/blob/v1.11.2/propagation/trace_context.go#L44)
The changes add a new variable hex16 that's used only in the w3c propagator, to my knowledge a hex8 should still work in the other two propagations

@CLAassistant
Copy link

CLAassistant commented Dec 7, 2022

CLA assistant check
All committers have signed the CLA.

client/traceid.go Outdated Show resolved Hide resolved
@Blinkuu Blinkuu merged commit c1f8ab7 into grafana:master Dec 15, 2022
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.

None yet

3 participants