{"id":"55bf588c0991e7df","repo":"go-redis/redis","slug":"redisotel-t-not-supported-55bf58","errorCode":null,"errorMessage":"redisotel: %T not supported","messagePattern":"redisotel: %T not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"extra/redisotel/tracing.go","lineNumber":49,"sourceCode":"\t\treturn nil\n\tcase *redis.ClusterClient:\n\t\trdb.OnNewNode(func(rdb *redis.Client) {\n\t\t\topt := rdb.Options()\n\t\t\topts = addServerAttributes(opts, opt.Addr)\n\t\t\tconnString := formatDBConnString(opt.Network, opt.Addr)\n\t\t\trdb.AddHook(newTracingHook(connString, opts...))\n\t\t})\n\t\treturn nil\n\tcase *redis.Ring:\n\t\trdb.OnNewNode(func(rdb *redis.Client) {\n\t\t\topt := rdb.Options()\n\t\t\topts = addServerAttributes(opts, opt.Addr)\n\t\t\tconnString := formatDBConnString(opt.Network, opt.Addr)\n\t\t\trdb.AddHook(newTracingHook(connString, opts...))\n\t\t})\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"redisotel: %T not supported\", rdb)\n\t}\n}\n\ntype tracingHook struct {\n\tconf *config\n\n\tspanOpts []trace.SpanStartOption\n}\n\nvar _ redis.Hook = (*tracingHook)(nil)\n\nfunc newTracingHook(connString string, opts ...TracingOption) *tracingHook {\n\tbaseOpts := make([]baseOption, len(opts))\n\tfor i, opt := range opts {\n\t\tbaseOpts[i] = opt\n\t}\n\tconf := newConfig(baseOpts...)\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/extra/redisotel/tracing.go#L31-L67","documentation":"Error \"redisotel: %T not supported\" thrown in go-redis/redis.","triggerScenarios":"Thrown at extra/redisotel/tracing.go:49 when the library encounters an invalid state.","commonSituations":"Assert the concrete client type before instrumenting and fail during setup, not at first trace.","solutions":["Pass a *redis.Client (or a type implementing the traced interface) to redisotel tracing instrumentation","For ClusterClient/Ring, use the instrumentation constructor that accepts those types"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}