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

Cannot parse DSC from envelope #4094

Closed
Dav1dde opened this issue Oct 2, 2024 · 4 comments · Fixed by #4181
Closed

Cannot parse DSC from envelope #4094

Dav1dde opened this issue Oct 2, 2024 · 4 comments · Fixed by #4181
Assignees
Labels
bug Something isn't working filler Requires little effort to resolve. Ready to be picked up anytime. onboarding

Comments

@Dav1dde
Copy link
Member

Dav1dde commented Oct 2, 2024

Relay fails to parse the DSC with the debug message failed to parse sampling context error=invalid type: floating point 1, expected a string.

relay-1                                         | 2024-10-02T08:04:02.957498Z DEBUG relay_server::envelope: failed to parse sampling context error=invalid type: floating point `1`, expected a string

Originally seen here: getsentry/self-hosted#3312 (comment)

It looks like Relay expects the sample rate to be a string, we can be a bit more lenient if that is the issue:

let value = match Option::<Cow<'_, str>>::deserialize(deserializer)? {
Some(value) => value,
None => return Ok(None),

COS:

  • Verify with the mentioned/used SDK
  • Fix the issue

Note: This error does not cause dropped events and for self hosted is without consequences.

@Dav1dde Dav1dde added bug Something isn't working filler Requires little effort to resolve. Ready to be picked up anytime. onboarding labels Oct 2, 2024
@jan-auer
Copy link
Member

jan-auer commented Oct 3, 2024

This is expected. As per spec, the sample rate must be sent as a string, this is a buggy SDK:
https://develop.sentry.dev/sdk/telemetry/traces/dynamic-sampling-context/#dsc-specification

Consequence of this is that distributed DS and extrapolation will not work, the data will be stored, however.

@Dav1dde
Copy link
Member Author

Dav1dde commented Oct 3, 2024

@jan-auer Should we be a bit more lenient here and accept both (string and numerical) or just close this?

@Dav1dde
Copy link
Member Author

Dav1dde commented Oct 3, 2024

Created an issue in the Python SDK, but I think we should just be more lenient in Relay to have a working DSC for all clients using an older SDK version.

@antonpirker
Copy link
Member

This is a problem in the Python SDK. The sample_rate in the envelope headers of an error is indeed a float instead of a str. (for envelopes containing transactions it is correct.)

We have fix and will probably release it next week: getsentry/sentry-python#3603

@olksdr olksdr assigned Dav1dde and unassigned Dav1dde Oct 7, 2024
@Litarnus Litarnus self-assigned this Oct 24, 2024
@Litarnus Litarnus linked a pull request Oct 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working filler Requires little effort to resolve. Ready to be picked up anytime. onboarding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants