mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
chore: instrumentation name and version (#2012)
This commit is contained in:
@ -14,8 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// todo: consider using the full module path "github.com/go-redis/redis/extra/redisotel"
|
defaultTracerName = "github.com/go-redis/redis/extra/redisotel"
|
||||||
defaultTracerName = "github.com/go-redis/redis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type TracingHook struct {
|
type TracingHook struct {
|
||||||
@ -32,8 +31,7 @@ func NewTracingHook(opts ...Option) *TracingHook {
|
|||||||
|
|
||||||
tracer := cfg.tp.Tracer(
|
tracer := cfg.tp.Tracer(
|
||||||
defaultTracerName,
|
defaultTracerName,
|
||||||
// todo: consider adding a version
|
trace.WithInstrumentationVersion("semver:"+redis.Version()),
|
||||||
// trace.WithInstrumentationVersion("semver:8.11.4"),
|
|
||||||
)
|
)
|
||||||
return &TracingHook{tracer: tracer}
|
return &TracingHook{tracer: tracer}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user