Skip to content
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

[FEATURE REQ] Controlling sample rate for specific activities #43985

Open
mortenbock opened this issue May 10, 2024 · 2 comments
Open

[FEATURE REQ] Controlling sample rate for specific activities #43985

mortenbock opened this issue May 10, 2024 · 2 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.

Comments

@mortenbock
Copy link

Library name and version

Azure.Monitor.OpenTelemetry.AspNetCore 1.1.1

Query/Question

Coming from the classic application insights SDK, it was possible to use a telemetry initializer to set the sample rate of a specific telemetry item, based on whatever your criteria might be.

Is there a way to set a custom sampler when using this package?

builder.Services
    .AddOpenTelemetry()
    .UseAzureMonitor();

Or is there a way to set a different sample rate for a specific activity source?

The use case it that we might have certain requests where we want more accuracy in the data, or we might have a background task making a custom activity, where we always want to include the telemetry from that task.

Environment

Using dotnet 8

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. labels May 10, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cijothomas @rajkumar-rangaraj @reyang @TimothyMothra @vishweshbankwar.

@TimothyMothra
Copy link
Contributor

Unfortunately, this isn't supported today.
I'll leave this issue open to collect upvotes.

@TimothyMothra TimothyMothra changed the title Controlling sample rate for specific activities [FEATURE REQ] Controlling sample rate for specific activities May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants