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

Add exporter ForceFlush #2525

Merged
merged 4 commits into from
Oct 27, 2021

Conversation

reyang
Copy link
Member

@reyang reyang commented Oct 27, 2021

Fixes #2523.

Changes

Added ForceFlush to exporters.

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

@reyang reyang requested a review from a team October 27, 2021 02:13
@codecov
Copy link

codecov bot commented Oct 27, 2021

Codecov Report

Merging #2525 (f839c97) into main (3aab124) will decrease coverage by 0.02%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2525      +/-   ##
==========================================
- Coverage   80.58%   80.55%   -0.03%     
==========================================
  Files         254      254              
  Lines        8507     8515       +8     
==========================================
+ Hits         6855     6859       +4     
- Misses       1652     1656       +4     
Impacted Files Coverage Δ
src/OpenTelemetry/BaseExporter.cs 66.66% <57.14%> (-4.77%) ⬇️
src/OpenTelemetry/BaseExportProcessor.cs 86.36% <100.00%> (+0.64%) ⬆️
...ZPages/Implementation/ZPagesExporterEventSource.cs 56.25% <0.00%> (-6.25%) ⬇️
src/OpenTelemetry/BaseProcessor.cs 60.00% <0.00%> (-4.00%) ⬇️
...ter.ZPages/Implementation/ZPagesActivityTracker.cs 100.00% <0.00%> (+2.85%) ⬆️

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.

Public API files needed.

@reyang
Copy link
Member Author

reyang commented Oct 27, 2021

Public API files needed.

Does it have to be this PR? There are many Metrics APIs not included in the API list. I can do it in a separate PR.

OpenTelemetry.Trace.BatchExportActivityProcessorOptions.BatchExportActivityProcessorOptions() -> void
override OpenTelemetry.BaseExportProcessor<T>.OnForceFlush(int timeoutMilliseconds) -> bool
override OpenTelemetry.BatchExportProcessor<T>.Dispose(bool disposing) -> void
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that the Dispose was added by some previous PR(s).

@cijothomas
Copy link
Member

Public API files needed.

Does it have to be this PR? There are many Metrics APIs not included in the API list. I can do it in a separate PR.

yea we can add entire Metrics API separately. I was only asking since this PR is not related to metrics alone.

@cijothomas cijothomas merged commit 6350288 into open-telemetry:main Oct 27, 2021
@reyang reyang deleted the reyang/exporter-forceflush branch October 27, 2021 03:25
}
catch (Exception ex)
{
OpenTelemetrySdkEventSource.Log.SpanProcessorException(nameof(this.ForceFlush), ex);
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be something generic rather than about spans - also this is an exporter not a processor. A lot of the events in OpenTelemetrySdkEventSource are span-centric right now... a holistic review of the usage of OpenTelemetrySdkEventSource could be useful - I can create an issue.

Copy link
Member

Choose a reason for hiding this comment

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

Yes. this is something we need to tackle surely.
Related to this: #1529 as well

Copy link
Member Author

Choose a reason for hiding this comment

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

This should probably be something generic rather than about spans - also this is an exporter not a processor. A lot of the events in OpenTelemetrySdkEventSource are span-centric right now... a holistic review of the usage of OpenTelemetrySdkEventSource could be useful - I can create an issue.

+1, I also want to solve this problem. The current internal diagnostic logs are misleading and most of them are not actionable.

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.

Support Exporter.ForceFlush
3 participants