createGlobalTracerProvider creates a new TracerProvider from the initialized DockerCli struct with the given options and sets it as the global tracer provider
(ctx context.Context, opts ...sdktrace.TracerProviderOption)
| 128 | // createGlobalTracerProvider creates a new TracerProvider from the initialized DockerCli struct |
| 129 | // with the given options and sets it as the global tracer provider |
| 130 | func (cli *DockerCli) createGlobalTracerProvider(ctx context.Context, opts ...sdktrace.TracerProviderOption) { |
| 131 | allOpts := make([]sdktrace.TracerProviderOption, 0, len(opts)+2) |
| 132 | allOpts = append(allOpts, sdktrace.WithResource(cli.Resource())) |
| 133 | allOpts = append(allOpts, dockerSpanExporter(ctx, cli)...) |
| 134 | allOpts = append(allOpts, opts...) |
| 135 | tp := sdktrace.NewTracerProvider(allOpts...) |
| 136 | otel.SetTracerProvider(tp) |
| 137 | } |
| 138 | |
| 139 | func defaultResourceOptions() []resource.Option { |
| 140 | return []resource.Option{ |
no test coverage detected