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

Support dropping of specific attributes from instrument #4427

Open
dpk83 opened this issue Apr 24, 2023 · 6 comments
Open

Support dropping of specific attributes from instrument #4427

dpk83 opened this issue Apr 24, 2023 · 6 comments
Labels
enhancement New feature or request pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package spec-compliance Issues related to compliance with the OpenTelemetry Specification
Milestone

Comments

@dpk83
Copy link

dpk83 commented Apr 24, 2023

Feature Request

Is your feature request related to a problem?

We need the ability to drop specific attributes from reported metrics.

Taking the example from the View spec.

For example, an HTTP server library might expose HTTP verb (e.g. GET, POST) and HTTP status code (e.g. 200, 301, 404). The application developer might only care about HTTP status code (e.g. reporting the total count of HTTP requests for each HTTP status code).

The SDK currently provides an option to specify a set of keys which are the only ones to be included, however in our scenario we support dynamic enrichment of metrics so some of the attributes are not known at the time of creation of the instrument. So to drop the specific instruments we need the ability to specify the list of attributes which needs to be dropped and rest all needs to be included in reported metrics.

Currently support only provide the option to include certain attributes while dropping rest of the attributes which doesn't cover the above scenario and is not sufficient.

Describe the solution you'd like:

Need ability to specify a set of attributes (as part of the View) which needs to be dropped from the metric (if exists).

Describe alternatives you've considered.

The only alternative is to capture the emitted metric and create a completely new metric which drops the desired attributes while dropping the original metric completely. This is unacceptable alternative though.

Additional Context

@dpk83 dpk83 added the enhancement New feature or request label Apr 24, 2023
@dpk83
Copy link
Author

dpk83 commented Apr 24, 2023

@noahfalk This is one missing piece of support that will be needed from either OpenTelemetry SDK or directly from .NET Meter API to be able to consume .NET metrics that James plugged in. I assumed this should be coming from OpenTelemetry SDK based on the other similar features like renaming metric, including only specific attributes etc.

FYI @reyang

@reyang
Copy link
Member

reyang commented Apr 24, 2023

@reyang
Copy link
Member

reyang commented Apr 24, 2023

If there is additional feature needed which is not captured by the SDK spec, file issue in the spec repo.

@dpk83
Copy link
Author

dpk83 commented Apr 25, 2023

@reyang Created an issue on spec as well open-telemetry/opentelemetry-specification#3441

@reyang reyang added the needs-spec-change Issues which require the OpenTelemetry Specification to clarify or define behavior label Apr 25, 2023
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

Spec allows this now, open-telemetry/opentelemetry-specification#4188
So this issue must be un-stale

@cijothomas cijothomas added pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package spec-compliance Issues related to compliance with the OpenTelemetry Specification and removed needs-spec-change Issues which require the OpenTelemetry Specification to clarify or define behavior Stale Issues and pull requests which have been flagged for closing due to inactivity labels Oct 8, 2024
@Kielek Kielek added this to the Future milestone Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package spec-compliance Issues related to compliance with the OpenTelemetry Specification
Projects
None yet
Development

No branches or pull requests

4 participants