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

Separate Dimensions for calls and duration metrics in Span Metrics #36805

Open
EOjeah opened this issue Dec 12, 2024 · 1 comment
Open

Separate Dimensions for calls and duration metrics in Span Metrics #36805

EOjeah opened this issue Dec 12, 2024 · 1 comment
Labels
connector/spanmetrics enhancement New feature or request needs triage New item requiring triage

Comments

@EOjeah
Copy link
Contributor

EOjeah commented Dec 12, 2024

Component(s)

connector/spanmetrics

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

Currently, the span metrics connector allows users to specify dimensions to extract from span data when converting to metrics. However, these dimensions are applied uniformly to both the calls (counter) and duration (histogram) metrics. This feature request proposes an enhancement to allow users to specify dimensions separately for each metric type, providing more granular control over the metrics configuration.

Describe the solution you'd like

Introduce a configuration option within the span metrics connector that allows users to specify which metrics (calls or duration) the dimensions should be applied to. This would enable users to:

  • Apply dimensions extraction to both metrics.
  • Apply dimensions extraction only to the calls (counter) metric.
  • Apply dimensions extraction only to the duration (histogram) metric.

Before

connectors:
  spanmetrics:
    dimensions:
      - name: "http.method"
      - name: "http.status_code"

After, breaking change since component is still in Alpha status

connectors:
  spanmetrics:
    dimensions:
      global: # Apply to all
        - name: "http.method" 
      calls:  # Optional, specific to calls (counter) metrics
        - name: "host.name"
      duration:  # Optional, specific to duration (histogram) metrics
        - name: "http.status_code"

OR for backward compatibility

connectors:
  spanmetrics:
    dimensions:
      - name: "http.method"
    calls_dimensions:  # Optional, specific to calls (counter) metrics
      - key: "host.name"
    duration_dimensions:  # Optional, specific to duration (histogram) metrics
      - key: "http.status_code"

Describe alternatives you've considered

The current workaround involves using the transform processor to modify the metric type after extraction. While this approach is functional, it adds complexity to the configuration process. By integrating this capability directly into the span metrics connector, users can achieve the desired configuration more intuitively and efficiently.

Additional context

No response

@EOjeah EOjeah added enhancement New feature or request needs triage New item requiring triage labels Dec 12, 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
connector/spanmetrics enhancement New feature or request needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

1 participant