Skip to content

Commit 8d03e35

Browse files
jeremydvossCopilothectorhdzg
authored
Performance Counters (#43024)
* Performance Counters * tests * changelog and spelling * Update sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_performance_counters/_manager.py Co-authored-by: Copilot <[email protected]> * Update sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_performance_counters/_manager.py Co-authored-by: Copilot <[email protected]> * Tests updated after typo fix * Update sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_performance_counters/_constants.py Co-authored-by: Hector Hernandez <[email protected]> * review * clean * lint * lint --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Hector Hernandez <[email protected]>
1 parent 6097521 commit 8d03e35

File tree

12 files changed

+1901
-15
lines changed

12 files changed

+1901
-15
lines changed

.vscode/cspell.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,12 @@
11731173
"nbconvert",
11741174
"rollupby",
11751175
"milli",
1176-
"resourceid"
1176+
"resourceid",
1177+
"Exceps",
1178+
"processiorate",
1179+
"processiobytessec",
1180+
"iowait",
1181+
"softirq"
11771182
]
11781183
},
11791184
{
@@ -1193,7 +1198,8 @@
11931198
"psutil",
11941199
"psycopg",
11951200
"uninstrument",
1196-
"uninstrumented"
1201+
"uninstrumented",
1202+
"scputimes"
11971203
]
11981204
},
11991205
{

sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
- OneSettings control plane: Add killswitch + exponential backoff + sdkstats feature control
1111
([#43147](https://github.com/Azure/azure-sdk-for-python/pull/43147))
1212

13+
- Performance Counters
14+
([#43024](https://github.com/Azure/azure-sdk-for-python/pull/43024))
15+
1316
### Breaking Changes
1417

1518
### Bugs Fixed
@@ -35,7 +38,7 @@
3538
([#42542](https://github.com/Azure/azure-sdk-for-python/pull/42542))
3639
- Customer Facing SDKStats: Added the export interval env var for customer sdkstats
3740
([#42551](https://github.com/Azure/azure-sdk-for-python/pull/42551))
38-
- Rename Customer Statsbeat to Customer SDKStats as per [Spec] - https://github.com/aep-health-and-standards/Telemetry-Collection-Spec/pull/581
41+
- Rename Customer Statsbeat to Customer SDKStats as per [Spec](https://github.com/aep-health-and-standards/Telemetry-Collection-Spec/pull/581#issuecomment-3165624749)
3942
([#42573](https://github.com/Azure/azure-sdk-for-python/pull/42573))
4043
- Customer Facing SDKStats: Exception categorization as per [Spec] - https://github.com/aep-health-and-standards/Telemetry-Collection-Spec/blob/main/ApplicationInsights/sdkstats/customer_facing_sdk_stats.md
4144
([#42695](https://github.com/Azure/azure-sdk-for-python/pull/42695))
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
from azure.monitor.opentelemetry.exporter._performance_counters._manager import (
5+
enable_performance_counters,
6+
)
7+
8+
__all__ = [ "enable_performance_counters" ]
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
# (OpenTelemetry metric name, Breeze metric name)
5+
_AVAILABLE_MEMORY = (
6+
"azuremonitor.performancecounter.memoryavailablebytes",
7+
"\\Memory\\Available Bytes"
8+
)
9+
_EXCEPTION_RATE = (
10+
"azuremonitor.performancecounter.exceptionssec",
11+
"\\.NET CLR Exceptions(??APP_CLR_PROC??)\\# of Exceps Thrown / sec"
12+
)
13+
_REQUEST_EXECUTION_TIME = (
14+
"azuremonitor.performancecounter.requestexecutiontime",
15+
"\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"
16+
)
17+
_REQUEST_RATE = (
18+
"azuremonitor.performancecounter.requestssec",
19+
"\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec"
20+
)
21+
_PROCESS_CPU = (
22+
"azuremonitor.performancecounter.processtime",
23+
"\\Process(??APP_WIN32_PROC??)\\% Processor Time"
24+
)
25+
_PROCESS_CPU_NORMALIZED = (
26+
"azuremonitor.performancecounter.processtimenormalized",
27+
"\\Process(??APP_WIN32_PROC??)\\% Processor Time Normalized"
28+
)
29+
_PROCESS_IO_RATE = (
30+
"azuremonitor.performancecounter.processiobytessec",
31+
"\\Process(??APP_WIN32_PROC??)\\IO Data Bytes/sec"
32+
)
33+
_PROCESS_PRIVATE_BYTES = (
34+
"azuremonitor.performancecounter.processprivatebytes",
35+
"\\Process(??APP_WIN32_PROC??)\\Private Bytes"
36+
)
37+
_PROCESSOR_TIME = (
38+
"azuremonitor.performancecounter.processortotalprocessortime",
39+
"\\Processor(_Total)\\% Processor Time"
40+
)
41+
42+
_PERFORMANCE_COUNTER_METRIC_NAME_MAPPINGS = dict(
43+
[
44+
_AVAILABLE_MEMORY,
45+
_EXCEPTION_RATE,
46+
_REQUEST_EXECUTION_TIME,
47+
_REQUEST_RATE,
48+
_PROCESS_CPU,
49+
_PROCESS_CPU_NORMALIZED,
50+
_PROCESS_IO_RATE,
51+
_PROCESS_PRIVATE_BYTES,
52+
_PROCESSOR_TIME,
53+
]
54+
)

0 commit comments

Comments
 (0)