gocommon/tracing/exporter/zipkin/exporter.go
Matthieu 'JP' DERASSE c040c1fc78
All checks were successful
continuous-integration/drone/push Build is passing
feat(tracing): Continue on tracing implmentation
2022-12-27 15:40:28 +00:00

22 lines
380 B
Go

package zipkin
import (
"github.com/juju/errors"
"go.opentelemetry.io/otel/exporters/zipkin"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)
// NewExporter will create a Zipkin exporter for tracing.
func NewExporter(c *ConfigStruct) (sdktrace.SpanExporter, error) {
err := c.IsValid()
if err != nil {
return nil, errors.Trace(err)
}
return zipkin.New(
c.URL,
)
}