Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.46k stars 4.8k forks source link

[FEATURE REQ] Support for TrackAvailability via the OpenTelemetry exporter #46509

Open hansmbakker opened 3 weeks ago

hansmbakker commented 3 weeks ago

Library name

Azure.Monitor.OpenTelemetry.Exporter

Please describe the feature.

I'm using Aspire.NET and am using Azure.Monitor.OpenTelemetry.Exporter to get my telemetry into Application Insights.

Application Insights has the Availability pane. I would like to create a HealthCheckPublisher that publishes calls to this Availability pane in Application Insights. Unfortunately this currently seems unsupported by Azure.Monitor.OpenTelemetry.Exporter and I would like to avoid adding another TelemetryClient dependency just to be able to call TrackAvailability.

Azure.Monitor.OpenTelemetry.Exporter has internal references to it, but does not expose it:

https://github.com/Azure/azure-sdk-for-net/blob/3f46696550378c81f066707242f5dd431576e8c5/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/SchemaConstants.cs#L33

I would like to request support for this feature.

github-actions[bot] commented 3 weeks ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cijothomas @rajkumar-rangaraj @reyang @TimothyMothra.

TimothyMothra commented 3 weeks ago

Hi @hansmbakker, this is on our backlog. We have someone looking into this in our current semester, but I can't give a better ETA right now.

The only workaround we have right now is to use the Application Insights SDK's TrackAvailability method.

hansmbakker commented 3 weeks ago

Note: I also found it is possible to send them via a HTTP call: https://learn.microsoft.com/en-us/troubleshoot/azure/azure-monitor/app-insights/telemetry/investigate-missing-telemetry#powershell-script-send-availability-test-result

The documentation for the schema was not easy to find but there seems to be something at https://github.com/Azure/azure-rest-api-specs/blob/main/specification/applicationinsights/data-plane/Monitor.Exporters/preview/2020-09-15_Preview/swagger.json

TimothyMothra commented 3 weeks ago

Yup, the Powershell script will work.

There's a newer version of the schema in an adjacent directory: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/applicationinsights/data-plane/Monitor.Exporters/preview/v2.1/swagger.json This is the swagger that we use to generate our Exporter.