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

[processor/probabilisticsampling] use mdatagen for metrics #33874

Conversation

codeboten
Copy link
Contributor

Fixes #33465

@codeboten codeboten requested a review from a team July 2, 2024 23:15
@github-actions github-actions bot added the processor/probabilisticsampler Probabilistic Sampler processor label Jul 2, 2024

telemetry:
metrics:
count_traces_sampled:
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs the otelcol_processor prefix. Can you confirm with the metrics we have today?

Copy link
Contributor Author

@codeboten codeboten Jul 3, 2024

Choose a reason for hiding this comment

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

Metrics before the change:

# HELP otelcol_processor_probabilistic_sampler_count_traces_sampled Count of traces that were sampled or not
# TYPE otelcol_processor_probabilistic_sampler_count_traces_sampled counter
otelcol_processor_probabilistic_sampler_count_traces_sampled{policy="missing_randomness",sampled="false",service_instance_id="f1a27d2b-5019-44b7-8dbb-b35b6f852c8c",service_name="otelcontribcol",service_version="0.104.0-dev"} 2
otelcol_processor_probabilistic_sampler_count_traces_sampled{policy="trace_id_hash",sampled="true",service_instance_id="f1a27d2b-5019-44b7-8dbb-b35b6f852c8c",service_name="otelcontribcol",service_version="0.104.0-dev"} 2

After the change:

# HELP otelcol_processor_probabilistic_sampler_count_logs_sampled Count of logs that were sampled or not
# TYPE otelcol_processor_probabilistic_sampler_count_logs_sampled counter
otelcol_processor_probabilistic_sampler_count_logs_sampled{policy="missing_randomness",sampled="false",service_instance_id="4d31ffcc-1341-4ae0-84be-5d77592319f9",service_name="otelcontribcol",service_version="0.104.0-dev"} 1
# HELP otelcol_processor_probabilistic_sampler_count_traces_sampled Count of traces that were sampled or not
# TYPE otelcol_processor_probabilistic_sampler_count_traces_sampled counter
otelcol_processor_probabilistic_sampler_count_traces_sampled{policy="trace_id_hash",sampled="true",service_instance_id="4d31ffcc-1341-4ae0-84be-5d77592319f9",service_name="otelcontribcol",service_version="0.104.0-dev"} 2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note the change in the name of the logs vs traces sampled counter is a bugfix

Fixes open-telemetry#33465

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
@codeboten codeboten force-pushed the codeboten/mdatagen-probabilistic-processor branch from b73a52f to 58894ef Compare July 3, 2024 19:58
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
@codeboten codeboten merged commit 475960c into open-telemetry:main Jul 4, 2024
154 checks passed
@codeboten codeboten deleted the codeboten/mdatagen-probabilistic-processor branch July 4, 2024 15:28
@github-actions github-actions bot added this to the next release milestone Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processor/probabilisticsampler Probabilistic Sampler processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from opencensus library: processor/probabilisticsamplerprocessor
3 participants