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

feat: add Classic Ingest Key support #245

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

jharley
Copy link
Contributor

@jharley jharley commented Feb 29, 2024

Which problem is this PR solving?

We've now released Ingest Keys, but in order for them to work with Classic environments properly we need to update the key detection logic.

Short description of the changes

  • Introduces a new public function otlp.IsClassicApiKey() to potentially be used in Refinery
  • Renames the existing (otlp.ReqInfo).hasLegacyKey() method to hasClassicKey and updates it to use the above function

@jharley jharley added type: enhancement New feature or request version: bump minor A PR that adds behavior, but is backwards-compatible. labels Feb 29, 2024
@jharley jharley marked this pull request as ready for review February 29, 2024 20:19
@jharley jharley requested a review from a team as a code owner February 29, 2024 20:19
@jharley jharley requested a review from a team February 29, 2024 20:19
@jharley jharley self-assigned this Feb 29, 2024
@@ -87,6 +88,16 @@ func IsContentTypeSupported(contentType string) bool {
return false
}

// IsClassicApiKey checks if the given API key is a Classic API key.
func IsClassicApiKey(key string) bool {
if len(key) == 32 {
Copy link
Contributor Author

@jharley jharley Mar 1, 2024

Choose a reason for hiding this comment

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

I removed the "len 0" check here as that wasn't being considered previously

@MikeGoldsmith MikeGoldsmith merged commit 278903f into main Mar 4, 2024
3 checks passed
@MikeGoldsmith MikeGoldsmith deleted the jharley.classic-ingest-key-support branch March 4, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request version: bump minor A PR that adds behavior, but is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants