-
Notifications
You must be signed in to change notification settings - Fork 295
Description
- List of NuGet packages and version that you are using:
- Microsoft.ApplicationInsights.AspNetCore 3.0.0
- Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the
*.csprojfile):- net10.0
- Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):
- Windows
Describe the bug
DisableTelemetry does not fully disable telemetry in v3.
To Reproduce
I'm disabling telemetry according to the information in #3084
services.Configure<TelemetryConfiguration>(tc => tc.DisableTelemetry = true);
services.AddApplicationInsightsTelemetry();
I then enable the otel self diagnostic log and get this (redacted excerpt):
TracerProviderSdk event: 'Disabled because OTEL_SDK_DISABLED is true.'
Successfully transmitted a batch of telemetry Items. Origin: AzureMonitorLogExporter. AAD: False. Instrumentation Key: b29...
Failed to get Azure VM Metadata due to an exception. This is only for internal telemetry and can safely be ignored. System.AggregateException: One or more errors occurred. (A socket operation was attempted to an unreachable network. (169.254.169.254:80))
---> System.Net.Http.HttpRequestException: A socket operation was attempted to an unreachable network. (169.254.169.254:80)
---> System.Net.Sockets.SocketException (10051): A socket operation was attempted to an unreachable network.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionWaiter`1.WaitForConnectionWithTelemetryAsync(HttpRequestMessage request, HttpConnectionPool pool, Boolean async, CancellationToken requestCancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.Metrics.MetricsHandler.SendAsyncWithMetrics(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.SocketsHttpHandler.<SendAsync>g__CreateHandlerAndSendAsync|115_0(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
Successfully transmitted a batch of telemetry Items. Origin: AzureMonitorMetricExporter. AAD: False. Instrumentation Key: b29...
MetricReader event: 'Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorMetricExporter.Export succeeded.'
So it seems that logs and metrics are still enabled. Also something still tries to do some metadata discovery even though things are supposed to be disabled.
For Immediate Support
For immediate support relating to the Application Insights .NET SDK we encourage you to file an Azure Support Request with Microsoft Azure instead of filing a GitHub Issue in this repository.
You can do so by going online to the Azure portal and submitting a support request. Access to subscription management and billing support is included with your Microsoft Azure subscription, and technical support is provided through one of the Azure Support Plans. For step-by-step guidance for the Azure portal, see How to create an Azure support request. Alternatively, you can create and manage your support tickets programmatically using the Azure Support ticket REST API