Replies: 2 comments 1 reply
-
I know there's an old example at https://github.com/cijothomas/FunctionsOpenTelemetry/blob/master/FunctionsOpenTelemetry/Startup.cs but I wonder if there is an up-to-date example. |
Beta Was this translation helpful? Give feedback.
1 reply
-
But it does not works in azure function. Is there any support on it for azure function? Asp.Net Core instrumentation should work everywhere Asp.Net Core is supported. Azure Functions is probably not using Asp.Net Core internally. I'd recommend to ask this in Azure Functions repo to get an official answer. (It used to work sometime, but it was relying on Functions internally using asp.net core) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are try to use opentelemetry trace in a project of azure function. But we find that we could not write requests table in application insights like we did in asp .net core project. The package of "OpenTelemetry.Instrumentation.AspNetCore" provides the function of "AddAspNetCoreInstrumentation" as the code shows. But it does not works in azure function. Is there any support on it for azure function?
services.AddOpenTelemetryTracing(builder => { builder .SetResourceBuilder(openTelemetryResourceBuilder) .AddAspNetCoreInstrumentation() // Auto-instrument http incoming requests .AddHttpClientInstrumentation() // Auto-instrument http outgoing dependencies like calls triggered by HttpClient .AddConsoleExporter() .AddAzureMonitorTraceExporter(option => option.ConnectionString = $"InstrumentationKey={instrumentationKey ?? "00000000-0000-0000-0000-000000000000"}"); });
Beta Was this translation helpful? Give feedback.
All reactions