Skip to content

Fix case-sensitive HTTP headers in W3C traces#5347

Open
puffnfresh wants to merge 1 commit intocanton-network:mainfrom
puffnfresh:tracing
Open

Fix case-sensitive HTTP headers in W3C traces#5347
puffnfresh wants to merge 1 commit intocanton-network:mainfrom
puffnfresh:tracing

Conversation

@puffnfresh
Copy link
Copy Markdown

When a header did not match "traceparent" case-sensitively, a new trace ID would be generated and used, severing the tie to other services. This commit introduces a value type which normalises header name case, for comparison.

Before:

curl -v -H 'Traceparent: 00-aaaa...-bbbb...-01' http://<pod>:5003/api/validator/readyz
# traceparent: 00-cccc...-dddd...-03

curl -H 'traceparent: 00-aaaa...-bbbb...-01' http://<pod>:5003/api/validator/readyz
# traceparent: 00-aaaa...-bbbb...-01

After:

curl -v -H 'Traceparent: 00-aaaa...-bbbb...-01' http://<pod>:5003/api/validator/readyz
# traceparent: 00-aaaa...-bbbb...-01

curl -H 'traceparent: 00-aaaa...-bbbb...-01' http://<pod>:5003/api/validator/readyz
# traceparent: 00-aaaa...-bbbb...-01
image

Pull Request Checklist

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a logical synchronizer upgrade test is required (from canton-3.5), comment /lsu_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

When a header did not match "traceparent" case-sensitively, a new
trace ID would be generated and used, severing the tie to other
services.  This commit introduces a value type which normalises header
name case, for comparison.

Before:

    curl -v -H 'Traceparent: 00-aaaa...-bbbb...-01' http://<pod>:5003/api/validator/readyz
    # traceparent: 00-cccc...-dddd...-03

    curl -H 'traceparent: 00-aaaa...-bbbb...-01' http://<pod>:5003/api/validator/readyz
    # traceparent: 00-aaaa...-bbbb...-01

After:

    curl -v -H 'Traceparent: 00-aaaa...-bbbb...-01' http://<pod>:5003/api/validator/readyz
    # traceparent: 00-aaaa...-bbbb...-01

    curl -H 'traceparent: 00-aaaa...-bbbb...-01' http://<pod>:5003/api/validator/readyz
    # traceparent: 00-aaaa...-bbbb...-01
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 this pull request may close these issues.

5 participants