feat(tracing): Continue on tracing implmentation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
23
tracing/exporter/jaeger/exporter.go
Normal file
23
tracing/exporter/jaeger/exporter.go
Normal file
@ -0,0 +1,23 @@
|
||||
package jaeger
|
||||
|
||||
import (
|
||||
"github.com/juju/errors"
|
||||
"go.opentelemetry.io/otel/exporters/jaeger"
|
||||
|
||||
sdktrace "go.opentelemetry.io/otel/sdk/trace"
|
||||
)
|
||||
|
||||
// NewExporter will create a Jaeger exporter for tracing.
|
||||
func NewExporter(c *ConfigStruct) (sdktrace.SpanExporter, error) {
|
||||
|
||||
err := c.IsValid()
|
||||
if err != nil {
|
||||
return nil, errors.Trace(err)
|
||||
}
|
||||
|
||||
return jaeger.New(
|
||||
jaeger.WithCollectorEndpoint(
|
||||
jaeger.WithEndpoint(c.URL),
|
||||
),
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user