22 lines
380 B
Go
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,
|
||
|
)
|
||
|
}
|