2023-08-17 18:09:10 +03:00
|
|
|
package instana
|
|
|
|
|
|
|
|
import (
|
2024-03-11 14:03:53 +03:00
|
|
|
instana "github.com/instana/go-sensor"
|
2023-08-17 18:09:10 +03:00
|
|
|
sensor "github.com/instana/go-sensor"
|
2023-08-17 18:12:05 +03:00
|
|
|
"go.unistack.org/micro/v3/tracer"
|
2023-08-17 18:09:10 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type tracerOptionsKey struct{}
|
|
|
|
|
2023-08-17 18:12:05 +03:00
|
|
|
func Options(opts *sensor.Options) tracer.Option {
|
|
|
|
return tracer.SetOption(tracerOptionsKey{}, opts)
|
2023-08-17 18:09:10 +03:00
|
|
|
}
|
2024-03-11 14:03:53 +03:00
|
|
|
|
|
|
|
type recorderKey struct{}
|
|
|
|
|
|
|
|
func Recorder(r instana.SpanRecorder) tracer.Option {
|
|
|
|
return tracer.SetOption(recorderKey{}, r)
|
|
|
|
}
|