Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

proxy.golang.org : github.com/vincentfree/opentelemetry/otellogrus

Package otellogrus provides a function to extend structured logs using logrus with the Open Telemetry trace related context. The github.com/sirupsen/logrus logrus logs are decorated with standard metadata extracted from the trace.SpanContext, a traceID, spanID and additional information is injected into a log. The initialization uses file level configuration to set defaults for the function to use. SetLogOptions can overwrite the defaults. When the configuration is done AddTracingContext and AddTracingContextWithAttributes decorate logrus logs with data from the trace context. Adding trace context ata to logs can be achieved by using logrus.WithFields(AddTracingContext(span)).Info("test") for example. Functions Types Structs import "github.com/vincentfree/opentelemetry/otellogrus"

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/vincentfree/opentelemetry/otellogrus
Keywords: logging, logs, middleware, opentelemetry, opentelemetry-go, traces, tracing
License: Apache-2.0
Latest release: 10 months ago
First release: 10 months ago
Namespace: github.com/vincentfree/opentelemetry
Stars: 2 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 18 days ago

    Loading...
    Readme
    Loading...