Commit Graph

8 Commits

Author SHA1 Message Date
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