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

View - allow to change aggregation type #2618

Open
cijothomas opened this issue Nov 16, 2021 · 7 comments
Open

View - allow to change aggregation type #2618

cijothomas opened this issue Nov 16, 2021 · 7 comments
Labels
enhancement New feature or request metrics Metrics signal related
Milestone

Comments

@cijothomas
Copy link
Member

Child of overall Views feature
This is to track supporting changing Aggregation type using Views. (eg: User wants to aggregate Gauge as Histogram etc.)

@cijothomas cijothomas added the enhancement New feature or request label Nov 16, 2021
@cijothomas cijothomas added this to the 1.3.0 milestone Nov 16, 2021
@cijothomas cijothomas added the metrics Metrics signal related label Nov 16, 2021
@cijothomas
Copy link
Member Author

As per the most recent spec, there is no ability to change temporality on a per instrument basis, so this issue is only to specify the aggregation itself, along with anything configurable for a particular aggregation.

@cijothomas
Copy link
Member Author

Removing this from the upcoming 1.4.0 milestone. This is less important, so far haven't seen any asks for this capability.

@cijothomas
Copy link
Member Author

Already support the ability to configuration for the Aggregation itself (like pick tags, change boundaries for histogram etc.)

@OQO
Copy link

OQO commented Apr 12, 2023

We would need this to correctly make it work for New Relic. In some cases counters should have last value aggregation instead of the default sum aggregation to make it work correctly when using OTLP for New relic.

See their Java example:
https://github.com/newrelic/newrelic-opentelemetry-examples/pull/89/files#diff-da355ef6d1092534a55829e95160ab8468884bdd521f9018feeaaa66aea6ac5bR82-R86

I have not found a way to do this in the .net SDK. Are there any workarounds to set the aggregations in the mean time?

(Please also note that according to the SDK setting aggregation should be supported in views as an optional parameter:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#view )

Copy link
Contributor

github-actions bot commented Oct 8, 2024

This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Oct 8, 2024
@cijothomas
Copy link
Member Author

Unstale. This is spec requirement.

@cijothomas cijothomas removed the Stale Issues and pull requests which have been flagged for closing due to inactivity label Oct 8, 2024
@Kielek Kielek added this to the Future milestone Oct 8, 2024
@bjrara
Copy link

bjrara commented Nov 7, 2024

+1 on this feature request.

In my scenario, I need to configure different aggregation to change instrument type like ObservableUpDownCounter to ObservableGauge because runtime metrics like process.runtime.dotnet.gc.heap.size from OpenTelemetry.Instrumentation.Runtime are reported as cumulative, but the values are actually gauge.

In the CHANGELOG, it mentions

  If your backend system distinguishes between ObservableUpDownCounter and
  ObservableGauge, then you may need to adjust your queries. Systems like
  Prometheus are unaffected by this.

With Views supporting custom aggregation, we can workaround the problem within SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request metrics Metrics signal related
Projects
None yet
Development

No branches or pull requests

4 participants