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

detect int64 sample rate #209

Merged
merged 2 commits into from
Feb 23, 2021
Merged

detect int64 sample rate #209

merged 2 commits into from
Feb 23, 2021

Conversation

paulosman
Copy link

Detect int64 / int32 sample rates. Some OTLP exporters will send them as these types - so handle appropriately.

@paulosman paulosman requested a review from a team February 17, 2021 21:47
route/route.go Outdated
err = fmt.Errorf("Unrecognised sampleRate datatype - %T", attributes["sampleRate"])
switch v := attrs[sampleRateKey].(type) {
case string:
sampleRate, err = strconv.Atoi(v)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to check for this also or does it not matter as much here? strconv.ParseInt(v, 10, 32)

Copy link
Author

Choose a reason for hiding this comment

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

Do we need to check for this also or does it not matter as much here? strconv.ParseInt(v, 10, 32)

Yeah, good point - let's keep it consistent with shepherd. I'll update.

@paulosman paulosman force-pushed the paul.sample_rate_int64 branch from 969f4e9 to b8993fb Compare February 18, 2021 15:39
Copy link
Contributor

@vreynolds vreynolds left a comment

Choose a reason for hiding this comment

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

🔢

@vreynolds vreynolds merged commit 86c633a into main Feb 23, 2021
@vreynolds vreynolds deleted the paul.sample_rate_int64 branch February 23, 2021 16:47
ghost pushed a commit to opsramp/tracing-proxy that referenced this pull request Jul 5, 2024
Detect int64 / int32 sample rates. Some OTLP exporters will send them as these types - so handle appropriately.
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.

3 participants