-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
docs(component): improves the documentation #2504
docs(component): improves the documentation #2504
Conversation
…s should not accept anymore data on shutdown (open-telemetry#2481).
Codecov Report
@@ Coverage Diff @@
## main #2504 +/- ##
=======================================
Coverage 91.76% 91.76%
=======================================
Files 266 266
Lines 15111 15111
=======================================
Hits 13866 13866
- Misses 866 867 +1
+ Partials 379 378 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @tigrannajaryan
@@ -37,7 +37,8 @@ type Component interface { | |||
// Create a new context from the context.Background() for long-running operations. | |||
Start(ctx context.Context, host Host) error | |||
|
|||
// Shutdown is invoked during service shutdown. | |||
// Shutdown is invoked during service shutdown. After Shutdown() is called, if the component accept data in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shutdown signals the component to stop accepting data and to clean up the resources in use, as the collector is being stopped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to clarify this we also need to tell that any internally stored pdata must be drained, propagated further to the pipeline to the next consumer (or exported out of the Collector if the component is exporter) before Shutdown returns.
"Clean up the resources" hints to that but I think it is not sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpkrohling I would remove the "as the collector is being stopped" that sounds to me too much information from upstream. How about saying "as the processor is being decommissioned"?
@tigrannajaryan this is outlined in https://github.com/open-telemetry/opentelemetry-collector/pull/2504/files#diff-6f065ffd54f98081ffd548c200264f761067d883b72b315c01ac28ef5a8fce47R45-R46 but I like the "before Shutdown returns" part. I think I should add it.
Clarifies that components should not accept anymore data on shutdown
Ping @bogdandrutu
Closes #2481