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

Convenience functions NewExportPipeline and InstallNewPipeline can not be flushed. #1725

Closed
MadVikingGod opened this issue Mar 24, 2021 · 7 comments · Fixed by #1822
Closed
Assignees
Labels
pkg:exporter:jaeger Related to the Jaeger exporter package pkg:exporter:stdout Related to the stdout exporter package pkg:exporter:zipkin Related to the Zipkin exporter package
Milestone

Comments

@MadVikingGod
Copy link
Contributor

Currently, the exporters stdout, jaeger, and zipkin offer convenience functions for getting started quickly exporting data in these formats. When using these functions there isn't a direct or obvious way to flush or shutdown the TracerProviders that are created.

A workaround I've found is to cast the global TracerProvider to a *sdktrace.TracerProvider, eg. otel.GetTracerProvider().(*sdktrace.TracerProvider)

Possible solutions:

  • standardize the convenience functions to expose the concrete type they return. This would let users of those functions manage the shutdown/flush logic as they see fit.
  • provide a global Shutdown(). These should iterate over *Provider and call the associated shutdown. We would also need to define the signature of the shutdown that will be called.
@MrAlias MrAlias added pkg:exporter:jaeger Related to the Jaeger exporter package pkg:exporter:stdout Related to the stdout exporter package pkg:exporter:zipkin Related to the Zipkin exporter package release:1.0.0-rc.1 labels Apr 6, 2021
@MrAlias MrAlias added this to the RC1 milestone Apr 6, 2021
@MadVikingGod
Copy link
Contributor Author

One thing that I noticed while working this is that Jaeger's exporter has a built-in batcher. This will probably lead to odd behavior when using Jaeger + the batching span processor.

@MrAlias
Copy link
Contributor

MrAlias commented Apr 9, 2021

One thing that I noticed while working this is that Jaeger's exporter has a built-in batcher. This will probably lead to odd behavior when using Jaeger + the batching span processor.

I found this as well while working on #1380. I'm still thinking it through, but I think we need to rip the bundler out of the Jaeger exporter for just this reason.

@MrAlias
Copy link
Contributor

MrAlias commented Apr 12, 2021

Tracking with #1799

@MadVikingGod
Copy link
Contributor Author

Would it make sense to have these same convenience functions as part of otlpgrpc and otlphttp?

We could have a similar one in the exporter/otlp module, but because the grpc and HTTP are modules we can't have as simple of a InstallNewPipeline because users would have to provide the driver.

@MrAlias
Copy link
Contributor

MrAlias commented Apr 13, 2021

Would it make sense to have these same convenience functions as part of otlpgrpc and otlphttp?

We could have a similar one in the exporter/otlp module, but because the grpc and HTTP are modules we can't have as simple of a InstallNewPipeline because users would have to provide the driver.

This sounds like something we could add after an RC. I'd be interested to get some user feedback on how to solve this before we implement a solution here.

@MadVikingGod
Copy link
Contributor Author

The only outstanding exporter is Jaeger. I was going to let the bundler work finish if it doesn't take care of it for me.

@MrAlias
Copy link
Contributor

MrAlias commented Apr 15, 2021

We need #1806 to merge before we can update the Jaeger convenience functions. Otherwise, we are returning either a default SDK or a No-Op SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:exporter:jaeger Related to the Jaeger exporter package pkg:exporter:stdout Related to the stdout exporter package pkg:exporter:zipkin Related to the Zipkin exporter package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants