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

Log dropped telemetry item count on shutdown #2331

Merged
merged 17 commits into from
Sep 21, 2021
Merged

Log dropped telemetry item count on shutdown #2331

merged 17 commits into from
Sep 21, 2021

Conversation

mic-max
Copy link
Contributor

@mic-max mic-max commented Sep 9, 2021

This feature is important as we want to let users know somehow that we are dropping items.

Changes

  • On shutdown, write to an EventSource log with the count of dropped telemetry items since the start
  • We may consider writing to the log the current number of dropped items every N drops. In this case, the first item dropped should write and then every subsequent Nth dropped item will write to the log.
    • i.e., The check of this.droppedCount % N == 0 should happen on the line before Interlocked.Increment(ref this.droppedCount);

No dropped items:
image
Dropped items:
image

Note: I think the extra space at the end is being added by PerfView?

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@mic-max mic-max requested a review from a team September 9, 2021 22:33
Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

Need a changelog entry 😃

@codecov
Copy link

codecov bot commented Sep 9, 2021

Codecov Report

Merging #2331 (c40e300) into main (a538016) will increase coverage by 0.05%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2331      +/-   ##
==========================================
+ Coverage   79.95%   80.01%   +0.05%     
==========================================
  Files         231      231              
  Lines        7453     7464      +11     
==========================================
+ Hits         5959     5972      +13     
+ Misses       1494     1492       -2     
Impacted Files Coverage Δ
...nTelemetry/Internal/OpenTelemetrySdkEventSource.cs 71.56% <80.00%> (+0.91%) ⬆️
src/OpenTelemetry/BatchExportProcessor.cs 93.33% <100.00%> (+0.09%) ⬆️
...ter.ZPages/Implementation/ZPagesActivityTracker.cs 100.00% <0.00%> (+2.85%) ⬆️
...emetry.Api/Internal/OpenTelemetryApiEventSource.cs 82.35% <0.00%> (+8.82%) ⬆️

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

I have left a comment about making this more useful for end user.

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

@cijothomas
Copy link
Member

@mic-max Looks like changelog has conflicts that must be resolved before we can merge. Can you fix them ?

@cijothomas cijothomas merged commit 032f22d into open-telemetry:main Sep 21, 2021
@mic-max mic-max deleted the inform-of-dropped-items branch September 21, 2021 19:53
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