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

Update Metric Filter proposed spec #4025

Closed

Conversation

Leonardo-Ferreira
Copy link

Added "value" to the metric filter parameters as a way to filter metrics based on observed values.

This is very useful to avoid metrics like "You received zero http requests", "Your http queue length is zero", "The GC ran Zero times" and other "default" values.

Added "value" to the metric filter parameters as a way to filter metrics based on observed values. This is very useful to avoid metrics like "You received zero http requests", "Your http queue length is zero", "The GC ran Zero times" and other "default" values
@cijothomas
Copy link
Member

cijothomas commented Apr 30, 2024

This is very useful to avoid metrics like "You received zero http requests", "Your http queue length is zero", "The GC ran Zero times" and other "default" values.

I am not sure if this is the right direction. Would you elaborate a bit more? I'd like to first see an example where you see metrics like "you received zero http requests". If you were using Counters for this purpose, with delta temporality, if no new requests are received, then nothing gets exported. With cumulative, it'll be exporting the total count since start, not the requests-since-last-export).

@Leonardo-Ferreira
Copy link
Author

If you want to collect metrics like "You received zero http requests" than just don't filter. In my case, I pay for every single byte I log, so I really want to only log relevant data.

The accumulated cost of logging "between 11:54 and 11:55 you received zero http requests" on application insights for all my apis was over $200. Each of those logs end up being about 500bytes long! and there are so many others that 99% of time report "default"... like process.runtime.dotnet.thread_pool.queue.length, kestrel.queued_connections, kestrel.queued_connections, aspnetcore.routing.match_attempts and many others...

We must be wasting several thousand dollars per day logging these kind of redundant data

@cijothomas
Copy link
Member

If you want to collect metrics like "You received zero http requests" than just don't filter. In my case, I pay for every single byte I log, so I really want to only log relevant data.

The accumulated cost of logging "between 11:54 and 11:55 you received zero http requests" on application insights for all my apis was over $200. Each of those logs end up being about 500bytes long! and there are so many others that 99% of time report "default"... like process.runtime.dotnet.thread_pool.queue.length, kestrel.queued_connections, kestrel.queued_connections, aspnetcore.routing.match_attempts and many others...

We must be wasting several thousand dollars per day logging these kind of redundant data

I understand that some providers bill based on bytes, but this is not the right solution.
If you can tell where/how you are seeing such metrics, I can suggest better fixes. If this is specifically in OTel .NET (as you opened an issue there), I'd suggest to share a repro app, demonstrating the issue and we can take it from there.

Copy link

github-actions bot commented May 8, 2024

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 8, 2024
Copy link

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants