DockerCLI/cli-plugins/manager
Jonathan A. Sternberg 85dcacd78f
plugins: set OTEL_RESOURCE_ATTRIBUTES when invoking a plugin
When a plugin is invoked, the docker cli will now set
`OTEL_RESOURCE_ATTRIBUTES` to pass OTEL resource attribute names to the
plugin as additional resource attributes. At the moment, the only
resource attribute passed is `cobra.command_path`.

All resource attributes passed by the CLI are prepended with the
namespace `docker.cli` to avoid clashing with existing ones the plugin
uses or ones defined by the user.

For aliased commands like the various builder commands, the command path
is overwritten to match with the original name (such as `docker
builder`) instead of the forwarded name (such as `docker buildx build`).

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2024-02-28 12:43:05 -08:00
..
candidate.go remove uses of golang.org/x/sys/execabs 2023-05-26 02:03:45 +02:00
candidate_test.go linting: address else/if/elseif statements found by gocritic 2023-11-20 16:02:16 +01:00
cobra.go plugins: set OTEL_RESOURCE_ATTRIBUTES when invoking a plugin 2024-02-28 12:43:05 -08:00
error.go add //go:build directives to prevent downgrading to go1.16 language 2023-12-14 15:03:46 +01:00
error_test.go cli-plugins/manager: TestPluginError: don't use yaml.Marshal 2022-11-17 13:17:51 +01:00
manager.go plugins: set OTEL_RESOURCE_ATTRIBUTES when invoking a plugin 2024-02-28 12:43:05 -08:00
manager_test.go cli-plugins/manager: getPluginDirs: take ConfigFile as argument 2024-01-11 18:15:30 +01:00
manager_unix.go Revert "plugins: run plugin with new process group ID" 2024-01-15 13:30:01 +00:00
manager_windows.go Revert "plugins: run plugin with new process group ID" 2024-01-15 13:30:01 +00:00
metadata.go cli-plugins: remove deprecated Metadata.Experimental 2023-06-12 14:53:30 +02:00
plugin.go improve plugins listing performance 2023-04-01 16:02:34 +02:00
suffix_unix.go remove pre-go1.17 build-tags 2023-05-05 18:23:03 +02:00
suffix_windows.go Check for `.exe` case insensitively 2019-01-30 13:45:26 +00:00