question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Azure.Monitor.OpenTelemetry.Exporter depreciated or supposed to work?

See original GitHub issue

Query/Question I’m hoping to be using <PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc5" /> (which is the latest at the time of writing) and want to push my logs and traces to App insights on azure. The latest version of Azure.Monitor.OpenTelemetry.Exporter is currently 1.0.0-beta.1 and most of the extension methods don’t work as things seem to have been moved.

Use case 1: Tracing

                    builder.AddAzureMonitorTraceExporter(options =>
                    {
                        options.ConnectionString = "";
                    });

following code builds but gives the following error at runtime

  Startup.cs(169, 21): [CS7069] Reference to type 'TracerProviderBuilder' claims it is defined in 'OpenTelemetry', but it could not be found

Use case 2: exporting logs

                .ConfigureLogging((context, builder) =>
                {
                    ...
                    builder.AddOpenTelemetry(options =>
                    {
                        options.AddAzureMonitorLogExporter();
                    });
                });

this code doesn’t compile as it is unable to find AddAzureMonitorLogExporter, it seems like some files have moved but also AzureMonitorExporterLoggingExtensions seem to be internal for some reason?

Is this library being depreciated or still supposed to work? do you have alternative suggestions? Could you please make those public and create a new nuget release

Environment:

  • Name and version of the Library package used: <PackageReference Include="Microsoft.OpenTelemetry.Exporter.AzureMonitor" Version="1.0.0-beta.1" />
  • Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects):
.NET SDK (reflecting any global.json):
Version:   5.0.103
Commit:    72dec52dbd

Runtime Environment:
OS Name:     Mac OS X
OS Version:  11.0
OS Platform: Darwin
RID:         osx.11.0-x64
Base Path:   /usr/local/share/dotnet/sdk/5.0.103/

Host (useful for support):
 Version: 5.0.3
 Commit:  c636bbdc8a

.NET SDKs installed:
 2.2.207 [/usr/local/share/dotnet/sdk]
 2.2.401 [/usr/local/share/dotnet/sdk]
 3.1.301 [/usr/local/share/dotnet/sdk]
 3.1.406 [/usr/local/share/dotnet/sdk]
 5.0.102 [/usr/local/share/dotnet/sdk]
 5.0.103 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
 Microsoft.AspNetCore.All 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
 Microsoft.AspNetCore.All 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
 Microsoft.AspNetCore.App 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
 Microsoft.AspNetCore.App 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
 Microsoft.AspNetCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
 Microsoft.AspNetCore.App 3.1.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
 Microsoft.AspNetCore.App 3.1.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
 Microsoft.AspNetCore.App 5.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
 Microsoft.AspNetCore.App 5.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
 Microsoft.NETCore.App 2.1.16 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 Microsoft.NETCore.App 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 Microsoft.NETCore.App 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 Microsoft.NETCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 Microsoft.NETCore.App 3.1.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 Microsoft.NETCore.App 3.1.12 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 Microsoft.NETCore.App 5.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
 Microsoft.NETCore.App 5.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
TimothyMothracommented, Sep 23, 2022

@hejingkan2005 beta3 was released in Oct 2021. Our team is currently preparing to release beta4, targeting Friday Oct 7, 2022. AddAzureMonitorLogExporter will be available in beta4.

We’ve recently updated our Readme. There you’ll find instructions to get our nightly builds which would let you test the LogExporter today. You’ll also find links to our Demo app which gives a basic example to help you get started.

1reaction
TimothyMothracommented, Oct 7, 2022

Beta4 was just released. It generally takes nuget an hour to make a new package available. https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/1.0.0-beta.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Microsoft.OpenTelemetry.Exporter.AzureMonitor not ...
Describe the bug The Azure Monitor Exporter (1.0.0-beta.1) Nuget-Package is incompatible with Nuget-Package OpenTelemetry (1.0.0-rc1.1).
Read more >
Troubleshoot OpenTelemetry issues in Python - Azure
Learn how to troubleshoot OpenTelemetry issues in Python. View known issues that involve Azure Monitor OpenTelemetry Exporters.
Read more >
Troubleshoot OpenTelemetry issues in .NET - Azure
Learn how to troubleshoot OpenTelemetry issues in .NET. View known issues that involve Azure Monitor OpenTelemetry Exporters.
Read more >
Microsoft OpenTelemetry exporter for Azure Monitor
The exporter for Azure Monitor allows you to export data utilizing the OpenTelemetry SDK and send telemetry data to Azure Monitor for ...
Read more >
Migrating Azure Monitor Application Insights Python from ...
This article provides guidance on how to migrate from the Azure Monitor Application Insights Python SDK and OpenCensus exporter to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found