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

[ADDED] Sampling in MsgTrace structure #219

Merged
merged 1 commit into from
Feb 22, 2024
Merged

[ADDED] Sampling in MsgTrace structure #219

merged 1 commit into from
Feb 22, 2024

Conversation

kozlovic
Copy link
Member

When an account has a Trace field set with a Destination, if an incoming message has a traceparent header with proper flag indicating that the message should be trace, the Sampling integer (value in the range of [1..100]) allows tracing only a random sample of messages. The server will pick a random number below 100 and if that number is lower or equal to this Sampling value then the trace will trigger. If above, the trace will not trigger.

Signed-off-by: Ivan Kozlovic ivan@synadia.com

When an account has a `Trace` field set with a `Destination`, if
an incoming message has a `traceparent` header with proper flag
indicating that the message should be trace, the `Sampling` integer
(value in the range of [1..100]) allows tracing only a random
sample of messages. The server will pick a random number below 100
and if that number is lower or equal to this `Sampling` value
then the trace will trigger. If above, the trace will not trigger.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8007938917

Details

  • 0 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 81.07%

Totals Coverage Status
Change from base Build 7936248079: 0.03%
Covered Lines: 2728
Relevant Lines: 3365

💛 - Coveralls

Copy link
Member

@aricart aricart left a comment

Choose a reason for hiding this comment

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

LGTM - good thing we added by top level!

@kozlovic
Copy link
Member Author

@aricart It was a wise choice to make it a struct, since as you can see we had to add something already ;-). Same deal than before though. Once review is complete and merged, could you issue a release? I have the server branch pointing to this to make sure that everything is ok, but once I have proper release, I will update the server branch and submit the PR. Thanks!

@aricart aricart merged commit c2d30e2 into main Feb 22, 2024
6 checks passed
@aricart aricart deleted the msg_trace_sampling branch February 22, 2024 16:57
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

3 participants