Add otel support

This uses otel standard environment variables to configure tracing in
the daemon.
It also adds support for propagating trace contexts in the client and
reading those from the API server.

See
https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
for details on otel environment variables.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2023-07-14 17:59:45 +00:00
parent 791549508a
commit 642e9917ff
18 changed files with 389 additions and 74 deletions

View File

@@ -101,9 +101,9 @@ func TestNewClientWithOpsFromEnv(t *testing.T) {
if tc.envs["DOCKER_TLS_VERIFY"] != "" {
// pedantic checking that this is handled correctly
tr := client.client.Transport.(*http.Transport)
assert.Assert(t, tr.TLSClientConfig != nil)
assert.Check(t, is.Equal(tr.TLSClientConfig.InsecureSkipVerify, false))
tlsConfig := client.tlsConfig()
assert.Assert(t, tlsConfig != nil)
assert.Check(t, is.Equal(tlsConfig.InsecureSkipVerify, false))
}
})
}