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

[AzureMonitorLiveMetrics] POC #40001

Merged
merged 3 commits into from
Nov 15, 2023
Merged

[AzureMonitorLiveMetrics] POC #40001

merged 3 commits into from
Nov 15, 2023

Conversation

TimothyMothra
Copy link
Contributor

This PR commits a working Proof of Concept. This is the first working POC that gets data into the Azure Portal.
THIS IS NOT FINAL. After committing these changes, I will merge my POC with Raj's and work on additional enhancements.

image

Changes

  • Demo project
    • updated Program.cs to generate telemetry in a loop. This is needed to generate traffic to see LiveMetrics in the Azure Portal.
  • LiveMetrics project
    • Added a Customization of QuickPulseSDKClientAPIsRestClient.cs. This is needed because the Generated RestClient has a deserialization bug.
    • Added ManagerFactory, Manager, and Manager.Metrics.
      This is modeled off of the Transmitter class in our AzureMonitorExporter. The Factory ensures that we only have one instance of the Manager per ConnectionString. The Manager class has the HTTP traffic (Ping & Post). The Manager.Metrics handles our metrics.
    • Added LiveMetricsMetricExporter to translate OTel Metrics to AzureMonitor Metrics
    • Added LiveMetricsTraceExporter as the entry point to my POC and is used to initialize the Manager class.

Future Work

  • My Exporters will be merged with Raj's
  • Consolidate Constants.
  • Replace OTel Metrics SDK with custom implementation for lower overhead.

@@ -14,6 +14,7 @@
<PackageReference Include="Azure.Core" />
<PackageReference Include="OpenTelemetry" />
<PackageReference Include="OpenTelemetry.Exporter.Console" VersionOverride="1.6.0" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" VersionOverride="7.0.0" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed to read Performance Counters (CPU & Memory) to enable POC. Will work on removing this in the future.

Copy link
Contributor

@rajkumar-rangaraj rajkumar-rangaraj Nov 15, 2023

Choose a reason for hiding this comment

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

We may need to keep this one forever, there is no good way to get this value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm fine with this dependency, as System.Diagnostic is a core dependency of OTel.
Application Insights is able to read perf counters without an extra dependency. I need more time to investigate how that works. For short term, this is fine. :)

Copy link
Contributor

Choose a reason for hiding this comment

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

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

Azure.Monitor.OpenTelemetry.LiveMetrics

Copy link
Contributor

@rajkumar-rangaraj rajkumar-rangaraj left a comment

Choose a reason for hiding this comment

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

Approving as POC. This requires a complete clean up later.

@TimothyMothra TimothyMothra enabled auto-merge (squash) November 15, 2023 22:38
@TimothyMothra TimothyMothra merged commit dd563c7 into main Nov 15, 2023
15 checks passed
@TimothyMothra TimothyMothra deleted the tilee/LiveMetricsPOC branch November 15, 2023 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants