-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5188 from thaJeztah/tracer_meter_optional
cli: make initializing the global meter- and tracing providers optional
- Loading branch information
Showing
4 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package command | ||
|
||
// WithEnableGlobalMeterProvider configures the DockerCli to create a new | ||
// MeterProvider from the initialized DockerCli struct, and set it as | ||
// the global meter provider. | ||
// | ||
// WARNING: For internal use, don't depend on this. | ||
func WithEnableGlobalMeterProvider() CLIOption { | ||
return func(cli *DockerCli) error { | ||
cli.enableGlobalMeter = true | ||
return nil | ||
} | ||
} | ||
|
||
// WithEnableGlobalTracerProvider configures the DockerCli to create a new | ||
// TracerProvider from the initialized DockerCli struct, and set it as | ||
// the global tracer provider. | ||
// | ||
// WARNING: For internal use, don't depend on this. | ||
func WithEnableGlobalTracerProvider() CLIOption { | ||
return func(cli *DockerCli) error { | ||
cli.enableGlobalTracer = true | ||
return nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters