FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add rate limited sampling smoke tests for ingestion sampling by trask · Pull Request #3731 · microsoft/ApplicationInsights-Java · GitHub

Add rate limited sampling smoke tests for ingestion sampling - #3731

Open
Trask Stalnaker (trask) wants to merge 2 commits into
mainfrom
another-rate-limited-smoke-test
Open

Add rate limited sampling smoke tests for ingestion sampling#3731
Trask Stalnaker (trask) wants to merge 2 commits into
mainfrom
another-rate-limited-smoke-test

Conversation

Copy link
Copy Markdown
Member

No description provided.

assertThat(rdEnvelopes.size()).isEqualTo(1000);

for (Envelope rdEnvelope : rdEnvelopes) {
assertThat(rdEnvelope.getSampleRate()).isEqualTo(99.99f);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

When sampling is disabled shouldn't this be 100%?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

IIRC when it's 100 then ingestion sampling will take effect

but then again, I thought ingestion sampling only takes effect when we send no sample rate, so maybe it can be 100, I'll need to re-test this to confirm

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looking at this part of code where sample rate is set to 99.99 when sampler returns 100:

. I do see node.js only setting sample rate attr if the rate returned from sampler isn't 100. Probably for the same reason - service side sampling applies at 100 or empty.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Trask Stalnaker (@trask) you may want to put a comment about why you expect this to be 99.99 in the test so folks don't get confused

assertThat(rdEnvelopes.size()).isEqualTo(1000);

for (Envelope rdEnvelope : rdEnvelopes) {
assertThat(rdEnvelope.getSampleRate()).isNull();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Shouldn't this have a meaningful value when sampling is enabled? Am I missing something here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ah, this is about ingestion (server-side) sampling

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can the name of this test be changed to make this more clear? To my understanding, this test asserts that when rate limited sampler is used, everything is sampled in at 100% & ingestion sampling enabled in json config, then we expect the rate to be null?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL