createGlobalMeterProvider creates a new MeterProvider from the initialized DockerCli struct with the given options and sets it as the global meter provider
(ctx context.Context, opts ...sdkmetric.Option)
| 117 | // createGlobalMeterProvider creates a new MeterProvider from the initialized DockerCli struct |
| 118 | // with the given options and sets it as the global meter provider |
| 119 | func (cli *DockerCli) createGlobalMeterProvider(ctx context.Context, opts ...sdkmetric.Option) { |
| 120 | allOpts := make([]sdkmetric.Option, 0, len(opts)+2) |
| 121 | allOpts = append(allOpts, sdkmetric.WithResource(cli.Resource())) |
| 122 | allOpts = append(allOpts, dockerMetricExporter(ctx, cli)...) |
| 123 | allOpts = append(allOpts, opts...) |
| 124 | mp := sdkmetric.NewMeterProvider(allOpts...) |
| 125 | otel.SetMeterProvider(mp) |
| 126 | } |
| 127 | |
| 128 | // createGlobalTracerProvider creates a new TracerProvider from the initialized DockerCli struct |
| 129 | // with the given options and sets it as the global tracer provider |
no test coverage detected