138
139
// WithNamespace sets the namespace name to be used in Registry metrics and logs.
140
>
func WithNamespace(ns string) Option {
registry.go
141
>
return func(r *registry) {
142
>
r.instrumentation.namespace = ns
143
>
}
144
}
145
146
// WithLogger sets the log.Logger to be used by Registry and its Updates.
147
>
func WithLogger(l log.Logger) Option {
registry.go
148
>
return func(r *registry) {
149
>
r.instrumentation.log = l
150
>
}
151
}
152
153
// WithMetrics sets the metrics.Handler to be used by Registry and its Updates.
154
>
func WithMetrics(m metrics.Handler) Option {
registry.go
155
>
return func(r *registry) {
156
>
r.instrumentation.metrics = m
157
>
}
158
}
159
160
// WithTracerProvider sets the trace.TracerProvider (and by extension the
161
// trace.Tracer) to be used by Registry and its Updates.
162
>
func WithTracerProvider(t trace.TracerProvider) Option {
registry.go
163
>
return func(r *registry) {
164
>
r.instrumentation.tracer = t.Tracer(telemetry.ComponentUpdateRegistry)
165
>
}
166
}
167