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

Add subpolicy metrics for And, Composite policies #36966

Open
cancub opened this issue Dec 26, 2024 · 1 comment
Open

Add subpolicy metrics for And, Composite policies #36966

cancub opened this issue Dec 26, 2024 · 1 comment
Labels
enhancement New feature or request needs triage New item requiring triage processor/tailsampling Tail sampling processor

Comments

@cancub
Copy link

cancub commented Dec 26, 2024

Component(s)

processor/tailsampling

Is your feature request related to a problem? Please describe.

I had to comb through the debug logs to determine that my Composite subpolicies weren't being followed as expected. This would be a lot easier if there was an extra level of metrics below
otelcol_processor_tail_sampling_*
which would provide the same statistics about the constituent subpolicies of And and Composite policies.

This also seems like an intuitive next step, since the same logic about wanting metrics about the individual policies also applies to subpolicies.

Describe the solution you'd like

In the same vein that we have a suite of metrics which include the label of policy and sampled, e.g.,

otelcol_processor_tail_sampling_count_traces_sampled{policy="composite-policy",sampled="false",service_instance_id="a63244e2-2969-4010-b1b8-f59c6859012c",service_name="otelcol",service_version=""} 156
otelcol_processor_tail_sampling_count_traces_sampled{policy="composite-policy",sampled="true",service_instance_id="a63244e2-2969-4010-b1b8-f59c6859012c",service_name="otelcol",service_version=""} 2972
otelcol_processor_tail_sampling_sampling_decision_latency_bucket{policy="composite-policy",service_instance_id="a63244e2-2969-4010-b1b8-f59c6859012c",service_name="otelcol",service_version="",le="1"} 2567
otelcol_processor_tail_sampling_sampling_decision_latency_bucket{policy="composite-policy",service_instance_id="a63244e2-2969-4010-b1b8-f59c6859012c",service_name="otelcol",service_version="",le="2"} 2619
otelcol_processor_tail_sampling_sampling_decision_latency_bucket{policy="composite-policy",service_instance_id="a63244e2-2969-4010-b1b8-f59c6859012c",service_name="otelcol",service_version="",le="5"} 2843
...
otelcol_processor_tail_sampling_sampling_decision_latency_bucket{policy="composite-policy",service_instance_id="a63244e2-2969-4010-b1b8-f59c6859012c",service_name="otelcol",service_version="",le="50000"} 3128
otelcol_processor_tail_sampling_sampling_decision_latency_bucket{policy="composite-policy",service_instance_id="a63244e2-2969-4010-b1b8-f59c6859012c",service_name="otelcol",service_version="",le="+Inf"} 3128
otelcol_processor_tail_sampling_sampling_decision_latency_sum{policy="composite-policy",service_instance_id="a63244e2-2969-4010-b1b8-f59c6859012c",service_name="otelcol",service_version=""} 5663
otelcol_processor_tail_sampling_sampling_decision_latency_count{policy="composite-policy",service_instance_id="a63244e2-2969-4010-b1b8-f59c6859012c",service_name="otelcol",service_version=""} 3128

I would like to see extra label of subpolicy added. This could also be a brand new metric, which would allow us to add more details, like in the case of Composite where sometimes the subpolicy actually returned Sampled, but it was over spans-per-second allocation and thus the result was NotSampled.

A new metric feels like the most straight-forward option, but it might take a bit of work, since it would require updating both the And and Composite policies with a new telemetry field like the one we have in the top-level tailSamplingProcessor

In the case of adding an extra label or labels to the existing metrics, this would just be an empty string for the policies without subpolicies.

Describe alternatives you've considered

No response

Additional context

No response

@cancub cancub added enhancement New feature or request needs triage New item requiring triage labels Dec 26, 2024
@github-actions github-actions bot added the processor/tailsampling Tail sampling processor label Dec 26, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage New item requiring triage processor/tailsampling Tail sampling processor
Projects
None yet
Development

No branches or pull requests

1 participant