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 HTTPTransport sampling callback for services #370

Merged
merged 2 commits into from
Mar 27, 2018

Conversation

delner
Copy link
Contributor

@delner delner commented Mar 15, 2018

If priority sampling is enabled, and HTTPTransport attempts to write service spans to the agent, it will trigger the sampling updater callback which will try to process the services response (which is OK) as a traces response (which is JSON), resulting in lots of parse errors.

This pull request passes the action as a parameter to the callback, so it can use that information to change how it handles responses.

Should be rebased and merged after #369.

Side note; this should probably be considered a stop-gap measure. There's a lot of coupling between Writer, Transport, and the concept of "API" which makes this design fairly brittle. Would recommend a refactor in the future.

@delner delner added bug Involves a bug core Involves Datadog core libraries breaking-change Involves a breaking change labels Mar 15, 2018
@delner delner self-assigned this Mar 15, 2018
@palazzem
Copy link
Contributor

@delner in which point it's considered a breaking change? can you update the description stating in clear where it requires a user change?

@delner
Copy link
Contributor Author

delner commented Mar 22, 2018

@palazzem I'm actually not sure it is a breaking change. I might have accidentally tagged that instead of WIP (same color.) Will double check though.

@delner delner force-pushed the bugfix/transport_services_response_parsing branch from 391f86c to 74f94df Compare March 27, 2018 15:12
@delner delner removed the breaking-change Involves a breaking change label Mar 27, 2018
@delner delner merged commit c90bcd5 into master Mar 27, 2018
@delner delner added this to the 0.11.4 milestone Mar 28, 2018
@palazzem palazzem deleted the bugfix/transport_services_response_parsing branch March 29, 2018 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants