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

gcomapiprocessor: CanonicalHeaderKey for X-Scope-OrgID #60

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Conversation

rlankfo
Copy link
Member

@rlankfo rlankfo commented Apr 10, 2023

No description provided.

Signed-off-by: Robbie Lankford <robert.lankford@grafana.com>
@rlankfo rlankfo changed the title gcomapiprocessor: ConoicalHeaderKey for X-Scope-OrgID gcomapiprocessor: CanonicalHeaderKey for X-Scope-OrgID Apr 10, 2023
Copy link
Collaborator

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

I think there should be a test for this change, to ensure it fixes the issue, but I won't block this from being merged

@rlankfo
Copy link
Member Author

rlankfo commented Apr 11, 2023

I think there should be a test for this change, to ensure it fixes the issue, but I won't block this from being merged

Thanks @jpkrohling. Adding a test should be straight forward I think, I'll look into it today.

@rlankfo
Copy link
Member Author

rlankfo commented Apr 11, 2023

@jpkrohling I added a test case for this and it passes. I don't know that this proves it will fix the issue because the existing test cases (w/o canonical header key) don't fail like we see at runtime.

@rlankfo rlankfo merged commit 7b91740 into main Apr 11, 2023
2 checks passed
@rlankfo rlankfo deleted the update-header branch April 11, 2023 20:38
@jpkrohling
Copy link
Collaborator

Is this change live? Did it fix the issue?

@leveyjam
Copy link

// Extract X-Scope-OrgID
key := http.CanonicalHeaderKey(orgID)

https://pkg.go.dev/net/http#CanonicalHeaderKey

The canonicalization converts the first letter and any letter following a hyphen to upper case; the rest are converted to lowercase.

So that will convert X-Scope-OrgID to X-Scope-Orgid based on my reading @jpkrohling @rlankfo
We see 500s in Dev for every request - can this be changed / rolled-back?

@rlankfo
Copy link
Member Author

rlankfo commented Apr 13, 2023


// Extract X-Scope-OrgID

key := http.CanonicalHeaderKey(orgID)

https://pkg.go.dev/net/http#CanonicalHeaderKey


The canonicalization converts the first letter and any letter following a hyphen to upper case; the rest are converted to lowercase.

So that will convert X-Scope-OrgID to X-Scope-Orgid based on my reading @jpkrohling @rlankfo

We see 500s in Dev for every request - can this be changed / rolled-back?

This can be reverted but to be clear it didn't introduce the 500s in dev. These have been ongoing for a while since the faro collector is configured to send data to the otel collector (otlp-gateway-v2) instead of the otlp-gateway.

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.

None yet

4 participants