You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently spans are not flushed on process exit, especially notable when instrumenting a CLI type of command rather than server. I could confirm adding a time.Sleep at the end fixes it, as well as getting the provider to shut it down manually
func main() {
ctx := context.Background()
tp := otel.GetTracerProvider()
if sdktp, ok := tp.(*trace.TracerProvider); ok {
defer sdktp.Shutdown(ctx)
}
...
Describe the solution you'd like
For application to be instrumented automatically to shutdown on exit - this behavior matches javaagent.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently spans are not flushed on process exit, especially notable when instrumenting a CLI type of command rather than server. I could confirm adding a
time.Sleep
at the end fixes it, as well as getting the provider to shut it down manuallyDescribe the solution you'd like
For application to be instrumented automatically to shutdown on exit - this behavior matches javaagent.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: