-
Notifications
You must be signed in to change notification settings - Fork 283
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
[Instrumentation.EventCounters] Support long event source names better in EventCounters instrumentation #740
[Instrumentation.EventCounters] Support long event source names better in EventCounters instrumentation #740
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #740 +/- ##
==========================================
+ Coverage 77.41% 77.56% +0.15%
==========================================
Files 176 176
Lines 5299 5308 +9
==========================================
+ Hits 4102 4117 +15
+ Misses 1197 1191 -6
|
Thanks for the change, I hadn't realised that some of the well-known counters were going to fail this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but please add entry to the changelog under unreleased section https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/src/OpenTelemetry.Instrumentation.EventCounters/CHANGELOG.md
(Short description + link to this PR).
src/OpenTelemetry.Instrumentation.EventCounters/EventCountersMetrics.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.EventCounters/EventCountersMetrics.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.EventCounters/EventCountersMetrics.cs
Outdated
Show resolved
Hide resolved
1e5eee6
to
d8ffb92
Compare
82063e7
to
dc75cb0
Compare
@open-telemetry/dotnet-contrib-approvers, if there are no objections, can someone please merge it? |
src/OpenTelemetry.Instrumentation.EventCounters/EventCountersMetrics.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.EventCounters/EventCountersMetrics.cs
Outdated
Show resolved
Hide resolved
472415f
to
1d04da6
Compare
14fedbb
to
5803f8a
Compare
I have published the package: https://www.nuget.org/packages/OpenTelemetry.Instrumentation.EventCounters/1.0.0-alpha.2 |
EventCounters instrumentation does not work for several well-known EventSources.
E.g.
Microsoft-AspNetCore-Server-Kestrel
or most of the counters inMicrosoft.AspNetCore.Http.Connections
.It happens because of instrument length limitations (63 symbols).
End users can't do anything about it except republish all events, so we need to find a reasonable way to allow at least well-known event sources. Kestrel counters, for example, are extremely useful and can't be measured in other ways (DiagSource/ActivitySource instrumentation in hosting).
So,
EventCounters.Microsoft-AspNetCore-Server-Kestrel.
is already 50 chars and it doesn't even include event name.This change proposes:
ec.
prefix instead ofEventCounters.
- It seems less important than event source/event namessuggest abbreviatingshorten the event source portion of it:ec.Microsoft-AspNetCore-Server-Kestrel.tls-handshakes-per-second
->ec.Microsoft-AspNetCore-Server-Kestr.tls-handshakes-per-second
. It generates stable and common name for a single instrument.Happy to consider other options for shortening the name.
CHANGELOG.md
updated for non-trivial changes