Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Integrate GoRedis with Atatus Go Agent to monitor Redis in Go apps. Track query spans and performance metrics for improved observability.
go get go.atatus.com/agent go get go.atatus.com/agent/module/atgoredis
import ( "github.com/go-redis/redis" "go.atatus.com/agent" "go.atatus.com/agent/module/atgoredis" ) var redisClient *redis.Client func main() { // Initialize Atatus tracer with values from environment tracer := atatus.DefaultTracer tracer.Service.LicenseKey = os.Getenv("ATATUS_LICENSE_KEY") tracer.Service.AppName = os.Getenv("ATATUS_APP_NAME") tracer.Service.Tracing = os.Getenv("ATATUS_TRACING") tracer.Service.Analytics = os.Getenv("ATATUS_ANALYTICS") // Set up base Redis client redisClient = atgoredis.Wrap(redis.NewClient(&redis.Options{})) } func handleRequest(w http.ResponseWriter, req *http.Request) { // Add request context dynamically here client := redisClient.WithContext(req.Context()) err := client.Set("key", "value", 0).Err() }
go mod tidy
go run main.go