Skip to content

Conversation

@agehrke
Copy link

@agehrke agehrke commented Jan 19, 2026

Issue describing the changes in this PR

Currently when configuring the function host to use OpenTelemetry it adds Azure Monitor Exporter through UseAzureMonitorExporter(this IOpenTelemetryBuilder builder, Action<AzureMonitorExporterOptions> configureAzureMonitor) extension method. This unfortunately bypasses the nice defaults in DefaultAzureMonitorExporterOptions which configures sampling via the OTEL environment variables OTEL_TRACES_SAMPLER and OTEL_TRACES_SAMPLER_ARG.

Should resolve #11496.

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • Backporting to the in-proc branch is not required
    • Otherwise: Link to backporting PR
  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

@agehrke agehrke requested a review from a team as a code owner January 19, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for OpenTelemetry Trace sampling to the host

1 participant