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:
21
tracing/exporter/zipkin/exporter.go
Normal file
21
tracing/exporter/zipkin/exporter.go
Normal file
@ -0,0 +1,21 @@
|
||||
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,
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user