Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OTelSQLOpenPostgres ¶
OTelSQLOpen is database/sql.Open, with instrumentation.
func OtelRedisInstrumentMetrics ¶
func OtelRedisInstrumentMetrics(client *redis.Client) error
InstrumentMetrics is based on https://github.com/redis/go-redis/blob/v9.7.0/extra/redisotel/metrics.go With the following modifications
1. Added the ability to get extra attributes from context. 2. Convert some metric to use the semconv v1.28.0
func SetupOTelSDKGlobally ¶
func SetupOTelSDKGlobally(ctx context.Context) (outCtx context.Context, shutdown func(context.Context) error, err error)
SetupOTelSDKGlobally sets up the global propagator and the global meter provider. Setting these globally allows us to define metric globally. Additionally, it returns a context that MUST BE used as the background context. The returned context contains a *sdkresource.Resource. The returned context contains a *otelhttp.Labeler.
Types ¶
This section is empty.