-
Notifications
You must be signed in to change notification settings - Fork 441
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
OpenTelemetry feature #9966
OpenTelemetry feature #9966
Conversation
50158a6
to
ba08324
Compare
…ure/azure-functions-host into roranjan/OpenTelemetryFeature
src/WebJobs.Script/Diagnostics/OpenTelemetry/ResourceAttributeConstants.cs
Show resolved
Hide resolved
src/WebJobs.Script/Diagnostics/OpenTelemetry/OpenTelemetryConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
@RohitRanjanMS can you give a description of this PR to help guide the review?
And some specific questions regarding OTel vs AppInsights SDK
|
Hi Rohit, a quick question here: after OTel mode is enabled in host, how could we make use of it in the worker side in isolated-worker mode? Where could the worker get the parent w3c trace context from the host in durable tasks? (Is it from |
Hi @lsl-2020 , we will take care of the context propagation. Here's the PR for Isolated - Azure/azure-functions-dotnet-worker#2375 |
I'm closing this pull request because I need to delete this branch. |
Thank you @RohitRanjanMS for the good work! Looking forward to the release. |
Introducing OpenTelemetry support for the Host enables users to adopt a method supported by OpenTelemetry for exporting telemetry data. This addition accommodates both existing AI SDK and new OpenTelemetry instrumentations, offering users the option to activate OpenTelemetry by adjusting the telemetry mode.
Telemetry Mode Configuration:
By default, the Host process is integrated with Application Insights through the AI SDK, emitting telemetry for requests, metrics, and logs. While logs are produced using Illoger, traces and metrics do not utilize OpenTelemetry's recommended APIs, such as ActivitySource and Meter.
To shift to a mode where the Host outputs telemetry in alignment with OpenTelemetry's standards and APIs, users can modify the telemetry mode within the host.json file or through an environmental variable override as follows:
Export Options:
Azure Monitor Exporter: Users can export telemetry to Application Insights by adding the APPLICATIONINSIGHTS_CONNECTION_STRING, enabling the Azure Monitor exporters and LiveMetrics.
OTLP Exporter: Facilitates telemetry export to any OTLP-compatible endpoint. Configuration is possible by setting the OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS for OTLP endpoints.
This implementation is compatible with all standard OpenTelemetry environment variables, allowing for the configuration of log and trace providers. As the OpenTelemetry Configuration specification becomes stable, there are plans to support more detailed configuration options, enabling users to fine-tune their telemetry behavior.
Issue describing the changes in this PR
resolves #9273
I will update the documentation later.
Pull request checklist
release_notes.md