otel

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package otel carries W3C trace context across fabriq's async hop: the command executor stamps the active traceparent into the event envelope and the outbox row. The relay and the projection consumers start their own root spans and LINK them to that stored context (core/telemetry), because the request that wrote the command has usually ended by the time its event is published or applied.

Wire it as fabriq.WithTraceparent(otel.TraceparentFromContext).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithTraceparent

func ContextWithTraceparent(ctx context.Context, traceparent string) context.Context

ContextWithTraceparent restores a traceparent (from an event envelope) onto a context as its remote parent. Invalid values are ignored. fabriq's own consumers no longer use it: they link to the stored context with telemetry.StartConsumer instead of parenting on it.

func TraceparentFromContext

func TraceparentFromContext(ctx context.Context) string

TraceparentFromContext renders the active span as a W3C traceparent header value, or "" when no span is recording.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL