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

Exporter is shutdown before controller finishes pushing metric events in otel-collector example #1499

Closed
kit494way opened this issue Jan 29, 2021 · 1 comment · Fixed by #1678
Labels
bug Something isn't working documentation Provides helpful information question Further information is requested
Projects

Comments

@kit494way
Copy link

// Shutdown will flush any remaining spans.
handleErr(tracerProvider.Shutdown(ctx), "failed to shutdown TracerProvider")
// Push any last metric events to the exporter.
handleErr(cont.Stop(context.Background()), "failed to stop controller")

As I understand it, calling tracerProvider.Shutdown() eventually invokes Shotdown() of exporter which is shared with a controller.
As commented, cont.Stop() tries to push metric events to the exporter.
So, cont.Stop() should be called before tracerProvider.Shutdown(), or it may cause same issue with #1437 .
Is it right?

@MrAlias MrAlias added bug Something isn't working documentation Provides helpful information question Further information is requested labels Feb 4, 2021
@MrAlias MrAlias added this to Needs triage in Bugs via automation Feb 12, 2021
@MrAlias MrAlias moved this from Needs triage to High priority in Bugs Feb 12, 2021
@kobim
Copy link

kobim commented Feb 16, 2021

This probably relates to #1443 - when using NewBatchSpanProcessor the underlying exporter is also closed.
Calling cont.Stop before shutting down the exporter should resolve this.

@MrAlias MrAlias moved this from High priority to Low priority in Bugs Mar 8, 2021
Bugs automation moved this from Low priority to Closed Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Provides helpful information question Further information is requested
Projects
Archived in project
Bugs
  
Closed
Development

Successfully merging a pull request may close this issue.

3 participants