Skip to content

Conversation

@rajkumar-rangaraj
Copy link
Contributor

@rajkumar-rangaraj rajkumar-rangaraj commented Sep 18, 2025

Thank you, @harsimar. Your earlier draft #52679 was instrumental in speeding up the process and adding this feature.

Application Insights Payload

{"name":"Metric","time":"2025-09-18T16:57:52.2217645Z","iKey":"key","tags":{"ai.cloud.role":"unknown_service:Azure.Monitor.OpenTelemetry.AspNetCore.Demo","ai.cloud.roleInstance":"roleinstance","ai.application.ver":null,"ai.internal.sdkVersion":"dotnet9.0.9:otel1.12.0:ext1.5.0-alpha.20250918-d"},"data":{"baseType":"MetricData","baseData":{"metrics":[{"name":"\\.NET CLR Exceptions(??APP_CLR_PROC??)\\# of Exceps Thrown / sec","value":12}],"ver":2}}}
{"name":"Metric","time":"2025-09-18T16:57:52.2219188Z","iKey":"key","tags":{"ai.cloud.role":"unknown_service:Azure.Monitor.OpenTelemetry.AspNetCore.Demo","ai.cloud.roleInstance":"roleinstance","ai.application.ver":null,"ai.internal.sdkVersion":"dotnet9.0.9:otel1.12.0:ext1.5.0-alpha.20250918-d"},"data":{"baseType":"MetricData","baseData":{"metrics":[{"name":"\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec","value":9}],"ver":2}}}
{"name":"Metric","time":"2025-09-18T16:57:52.2219863Z","iKey":"key","tags":{"ai.cloud.role":"unknown_service:Azure.Monitor.OpenTelemetry.AspNetCore.Demo","ai.cloud.roleInstance":"roleinstance","ai.application.ver":null,"ai.internal.sdkVersion":"dotnet9.0.9:otel1.12.0:ext1.5.0-alpha.20250918-d"},"data":{"baseType":"MetricData","baseData":{"metrics":[{"name":"\\Process(??APP_WIN32_PROC??)\\Private Bytes","value":48500736}],"ver":2}}}
{"name":"Metric","time":"2025-09-18T16:57:52.2221929Z","iKey":"key","tags":{"ai.cloud.role":"unknown_service:Azure.Monitor.OpenTelemetry.AspNetCore.Demo","ai.cloud.roleInstance":"roleinstance","ai.application.ver":null,"ai.internal.sdkVersion":"dotnet9.0.9:otel1.12.0:ext1.5.0-alpha.20250918-d"},"data":{"baseType":"MetricData","baseData":{"metrics":[{"name":"\\Process(??APP_WIN32_PROC??)\\% Processor Time","value":4.3582136573120565}],"ver":2}}}
{"name":"Metric","time":"2025-09-18T16:57:52.2222825Z","iKey":"key","tags":{"ai.cloud.role":"unknown_service:Azure.Monitor.OpenTelemetry.AspNetCore.Demo","ai.cloud.roleInstance":"roleinstance","ai.application.ver":null,"ai.internal.sdkVersion":"dotnet9.0.9:otel1.12.0:ext1.5.0-alpha.20250918-d"},"data":{"baseType":"MetricData","baseData":{"metrics":[{"name":"\\Process(??APP_WIN32_PROC??)\\% Processor Time Normalized","value":0.27238835358200353}],"ver":2}}}

TODO in a follow up PRs

  • Rename StandardMetricsExtractionProcessor to AzureMonitorMetricsExtractionProcessor
  • Use resource from customer meter provider - this is a long pending item

Copilot AI review requested due to automatic review settings September 18, 2025 18:32
@github-actions github-actions bot added the Monitor - Exporter Monitor OpenTelemetry Exporter label Sep 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Performance Counter support to the Azure Monitor OpenTelemetry Exporter, enabling collection of system performance metrics alongside the existing application metrics.

  • Introduces performance counter metrics collection including CPU usage, memory, request rate, and exception rate
  • Refactors the StandardMetricsExtractionProcessor to support multiple meters for different metric types
  • Adds comprehensive test coverage for the new performance counter functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
StandardMetricTests.cs Updates test methods to handle multiple metric telemetry items and adds comprehensive performance counter validation test
StandardMetricsExtractionProcessor.cs Implements performance counter metrics collection with CPU calculation logic and memory monitoring
PerfCounterConstants.cs Defines constants for performance counter metric names and their Azure Monitor mappings
AzureMonitorExporterEventSource.cs Adds event logging for performance counter collection failures and diagnostic information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor - Exporter Monitor OpenTelemetry Exporter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants