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

[connector/spanmetrics] Add option exclude_dimensions_values #28568

Closed
mar4uk opened this issue Oct 24, 2023 · 4 comments
Closed

[connector/spanmetrics] Add option exclude_dimensions_values #28568

mar4uk opened this issue Oct 24, 2023 · 4 comments
Labels

Comments

@mar4uk
Copy link
Contributor

mar4uk commented Oct 24, 2023

Component(s)

connector/spanmetrics

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

Some data in metrics spanmetrics connector generates is not needed in specific cases. To reduce cardinality (and the price for storing those metrics) would be good to have an opportunity to exclude some dimension values

Describe the solution you'd like

Add new options to the spanmetrics config: exclude_dimensions_values

For example, the user is not interested in metrics that have span.kind != SPAN_KIND_SERVER. So the user can exclude those metrics by adding the option:

exclude_dimensions_values:
  - name: span.kind
     values: ['SPAN_KIND_INTERNAL','SPAN_KIND_CLIENT','SPAN_KIND_PRODUCER']

Describe alternatives you've considered

The workaround to exclude metrics with specific dimension values is to use filterprocessor:

  filter/drop_unneeded_span_metrics:
    error_mode: ignore
    metrics:
      datapoint:
          - 'IsMatch(metric.name, "traces.spanmetrics.calls") and IsMatch(attributes["span.kind"], "SPAN_KIND_INTERNAL|SPAN_KIND_CLIENT|SPAN_KIND_PRODUCER")'

Additional context

No response

@mar4uk mar4uk added enhancement New feature or request needs triage New item requiring triage labels Oct 24, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

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

@mar4uk
Copy link
Contributor Author

mar4uk commented Oct 24, 2023

I'm also interested in implementing it

@albertteoh
Copy link
Contributor

I'm also interested in implementing it

Thanks for offering to implement it, @mar4uk.

Unless if there's a very good reason, I would prefer the alternative you've provided in this ticket (thanks for putting the thought into considering this alternative!) and the reason is to keep the spanmetrics connector as simple and clean as possible, following the unix philosophy of doing one thing well (or at least, striving for that 😄).

@crobert-1
Copy link
Member

I agree with @albertteoh here. I don't see any notable benefit of another filtering implementation being introduced in the spanmetrics connector over adding the filter processor to the trace or metrics pipeline.

I'm going to close for now, but feel free to share more information in case we're missing something here!

@crobert-1 crobert-1 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
@crobert-1 crobert-1 removed the needs triage New item requiring triage label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants