Commit Graph

10 Commits

Author SHA1 Message Date
Swagat Bora
83c26962c2 Remove extra span created in the instrumented service layer
Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-08-05 02:34:27 +00:00
Swagat Bora
c0cdcb34f1 Add spans to CRI runtime service and related client methods
This adds otel spans to CRI service mainly targeting mutating apis which includes:
* Sandbox apis - RunPodSandbox, StopPodSandbox, RemovePodSandbox
* Container apis - CreateContainer, StartContainer, StopContainer, RemoveContainer
* Attach, Exec and Exec Sync
* Containerd client methods: container.go, client.go, process.go and task.go

Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-08-05 02:34:20 +00:00
Sebastiaan van Stijn
587ee80f61
pkg/tracing: LogrusHook.Fire: micro-optimisation
Check span.IsRecording first, as it's a more lightweight check than
span.SpanContext().IsValid()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-14 12:12:22 +02:00
Sebastiaan van Stijn
ccf7938126
pkg/tracing: remove direct use of github.com/sirupsen/logrus
While the hook is intended to be used with logrus, we don't need to have
the direct import; use the aliases provided by the containerd/log module
instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-14 12:08:51 +02:00
Sebastiaan van Stijn
4203e2de8d
pkg/tracing/plugin: rename var that collided with import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-14 11:57:27 +02:00
Sebastiaan van Stijn
e2e09b384a
pkg/tracing: rename func that shadowed builtin, rm makeSpanName
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-14 11:56:06 +02:00
Brian Goff
4fbc9842d5 Changes to configuring otel from env only
These are standard environment variables described by the otel spec in
https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/.

The old config options are removed

Also since otel will by default try to connect to https://localhost:4318
if no endpoint is set, this will also just disable the otlp plugin when
there is no endpoint so we don't have otel continuously trying to
connect to the default endpoint, littering the logs with connection
failure messages and collecting traces that won't go anywhere.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-02-20 21:59:45 +00:00
Brian Goff
753a525b3b Deprecate otel configs
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-02-20 21:59:42 +00:00
Derek McGowan
fb9b59a843
Switch to new errdefs package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-25 22:18:45 -08:00
Derek McGowan
8f0eb26311
Move tracing to pkg/tracing
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:56:25 -08:00