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

SampleRate should not be applied for metrics telemetry #351

Closed
OsvaldoRosado opened this issue Nov 17, 2017 · 0 comments
Closed

SampleRate should not be applied for metrics telemetry #351

OsvaldoRosado opened this issue Nov 17, 2017 · 0 comments
Labels
Milestone

Comments

@OsvaldoRosado
Copy link
Member

In https://github.com/Microsoft/ApplicationInsights-node.js/blob/develop/Library/EnvelopeFactory.ts#L85
we apply the configured sample rate to all telemetry items.

In https://github.com/Microsoft/ApplicationInsights-node.js/blob/develop/TelemetryProcessors/SamplingTelemetryProcessor.ts#L13
we refuse to sample out data for metrics, but we don't reset the sample rate to 1.

We should either never apply the configured sample rate to metrics items, or reset it in the SamplingTelemetryProcessor. Never setting the configured sample rate within EnvelopeFactory sounds cleanest, as it doesn't override actions users might take themselves in their own telemetry processors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant