Repository navigation
v0.4.1
The current contrib bridge (go.opentelemetry.io/contrib/bridges/otelzap) requires manual extraction of trace_id/span_id in middleware. The uptrace library (github.com/uptrace/opentelemetry-go-extra/otelzap) provides automatic OTel span correlation via Ctx(ctx) — span context is attached to OTel log records at emit time without manual extraction. Additionally:
sdklog.LoggerProviderhas no resource, so Kafka records lack service identity- The same OTel
resourceused for TracerProvider should also be passed to the LoggerProvider logger.FromContext(which returns*zap.Logger) is replaced bylogger.Ctx(ctx)(returns*otelzap.Loggerwith span context) across all services