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

fix: replace api key with SendKey before transmission #1404

Merged
merged 6 commits into from
Nov 8, 2024

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Oct 30, 2024

Which problem is this PR solving?

Replacing API key with the configured SendKey in the router causes peer communication to fail due to api key validation on both peer and incoming traffic.

To resolve this issue, this PR adjusts the replacement logic to occur immediately before transmission.

Short description of the changes

  • only check if the api key is acceptable in the router
  • do replacement in sendTraces

@VinozzZ VinozzZ added the type: bug Something isn't working label Oct 30, 2024
@VinozzZ VinozzZ added this to the v2.9 milestone Oct 30, 2024
@VinozzZ VinozzZ self-assigned this Oct 30, 2024
@VinozzZ VinozzZ requested a review from a team as a code owner October 30, 2024 15:03
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

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

Looks good. Left some suggestions to improve clarity and add return error to IsAccepted

config/file_config.go Outdated Show resolved Hide resolved
config/file_config_test.go Outdated Show resolved Hide resolved
route/middleware.go Show resolved Hide resolved
@VinozzZ VinozzZ merged commit 909ef50 into main Nov 8, 2024
5 checks passed
@VinozzZ VinozzZ deleted the yingrong/replace_api_key_on_send branch November 8, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants