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: erlang elixir samples #4177

Merged
merged 6 commits into from Mar 20, 2024

Conversation

Graborg
Copy link
Contributor

@Graborg Graborg commented Mar 18, 2024

Before:
should_sample only takes into account if the keys matched
config %{"http.target": "/healthcheck"} and a span %{"http.target": "/something_else"} would match and the span would be dropped.
After:
should_sample compares both keys and values
%{"http.target": "/healthcheck"} and a span %{"http.target": "/something_else"} => {:record_and_sample, [], []}
%{"http.target": "/healthcheck"} and a span %{"http.target": "/healthcheck"} => {:drop, [], []}

@Graborg Graborg requested review from a team as code owners March 18, 2024 17:46
Copy link

linux-foundation-easycla bot commented Mar 18, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@theletterf theletterf left a comment

Choose a reason for hiding this comment

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

Summoning @open-telemetry/erlang-approvers

@tsloughter
Copy link
Member

@theletterf thanks!

@Graborg can you explain what was wrong/fixed?

@Graborg
Copy link
Contributor Author

Graborg commented Mar 20, 2024

Hi! Sure! Before the function only took into account the that the keys matched: i.e if
config %{"http.target": "/healthcheck"} and a span %{"http.target": "/something_else"}; the span would be dropped. It now looks at the value as well.

@tsloughter
Copy link
Member

Oooh, hah! Thanks :)

Might be simpler code to just convert to a list and do a sets:is_disjoint.

@Graborg
Copy link
Contributor Author

Graborg commented Mar 20, 2024

Sure! Something like this maybe?

Copy link
Member

@tsloughter tsloughter left a comment

Choose a reason for hiding this comment

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

Perfect 👍

@cartermp cartermp merged commit 800f4a7 into open-telemetry:main Mar 20, 2024
14 checks passed
@Graborg Graborg deleted the fix-erlang-elixir-samples branch March 21, 2024 07:58
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.

None yet

4 participants