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

otel: Add trace sampling, add small fixed #14

Merged
merged 4 commits into from
Oct 7, 2024

Conversation

javorszky
Copy link
Collaborator

Adds code to rust to take a trace sampling ratio, and adds code on the Unit side implementing the settings/telemetry/sample_ratio configuration path that will be resolved into a number. Adds a validator that makes sure that the sample ratio is in the range [0, 1].

Also fixes the following nits:

  • no need to have the "send" function be async or wrapped into tokio that C calls
  • replace a type inference from _ to usize because we know that's the only thing it can (should) be
  • break out a time duration into a const rather than creating them twice

Signed-off-by: Gabor Javorszky g.javorszky@f5.com

Adds code to rust to take a trace sampling ratio, and adds code on the
Unit side implementing the settings/telemetry/sample_ratio configuration
path that will be resolved into a number. Adds a validator that makes
sure that the sample ratio is in the range [0, 1].

Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
@javorszky
Copy link
Collaborator Author

Manual tests I've done:

  • it builds
  • settings/telemetry/sample_ratio configuration option is accepted
  • when configured to use grpc, traces do end up in grafana

@avahahn avahahn merged commit 4dcc774 into avahahn:otel-clean Oct 7, 2024
3 of 21 checks passed
@javorszky javorszky deleted the gabor/smol-nits branch October 8, 2024 00:04
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.

2 participants