-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Expose service's status channel #1042
Expose service's status channel #1042
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1042 +/- ##
==========================================
+ Coverage 86.33% 86.35% +0.02%
==========================================
Files 199 199
Lines 14072 14078 +6
==========================================
+ Hits 12149 12157 +8
+ Misses 1461 1460 -1
+ Partials 462 461 -1
Continue to review full report at Codecov.
|
@pavolloffay can you clarify how this is intended to be used? If you can please show the code that will use it. |
We would like to use this in Jaeger Since the OTEL service listens on multiple terminations signals: // query runs in a separate goroutine.
queryServer, tracerCloser := startQuery(v, logger, storageFactory, svc.ReportFatalError)
for state := range svc.GetStateChannel() {
switch state {
case service.ClosingDown:
queryServer.Close()
tracerCloser.Close()
case service.Closed:
return
}
} |
@tigrannajaryan I will fix the coverage once we agree on the implementation. |
@pavolloffay approach LGTM. |
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
4922414
to
f9989b9
Compare
It should be ready for review. |
Resolves open-telemetry#1033 We would like to use this in Jaeger `all-in-one` component that combines OTEL collector and Jaeger query in a single executable. Since the OTEL service listens on multiple terminations signals: `sigterm` and `asyncErrorChannel` we need an aggregated way to notify our service that shutdown is initiated and when it's done. ```go // query runs in a separate goroutine. queryServer, tracerCloser := startQuery(v, logger, storageFactory, svc.ReportFatalError) for state := range svc.GetStateChannel() { switch state { case service.ClosingDown: queryServer.Close() tracerCloser.Close() case service.Closed: return } } ```
* Renaming OTEL_RESOURCE_LABELS env var As per the specification here open-telemetry/opentelemetry-specification#758 * update changelog
Signed-off-by: Pavol Loffay ploffay@redhat.com
Description:
Resolves #1033
Link to tracking Issue:
Testing: < Describe what testing was performed and which tests were added.>
Documentation: < Describe the documentation added.>