telemetry

package
v2.679.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package telemetry exposes selected Redis OpenTelemetry helpers through the go-service cache import tree.

This package is the cache-side wrapper boundary for Redis OpenTelemetry instrumentation. It keeps cache code on a go-service import path while preserving the behavior of the upstream github.com/redis/go-redis/extra/redisotel/v9 helpers used to instrument Redis clients for tracing and metrics.

Use this package when instrumenting github.com/redis/go-redis/v9 clients that back the go-service cache subsystem. Higher-level cache code should generally prefer github.com/alexfalkowski/go-service/v2/cache/driver.NewDriver, which applies this instrumentation automatically for the built-in Redis backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstrumentMetrics

func InstrumentMetrics(client redis.UniversalClient, closeChan chan struct{}) error

InstrumentMetrics instruments a Redis client for OpenTelemetry metrics.

This is a thin wrapper around redisotel.InstrumentMetrics that unregisters observable callbacks when closeChan is closed.

The provided client is modified in place to emit Redis client metrics. The wrapper does not change upstream behavior or error semantics.

func InstrumentTracing

func InstrumentTracing(client redis.UniversalClient) error

InstrumentTracing instruments a Redis client for OpenTelemetry tracing.

This is a thin wrapper around redisotel.InstrumentTracing with raw command statement capture disabled.

The provided client is modified in place to emit tracing data for supported Redis operations. The wrapper does not change upstream behavior or error semantics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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