zitadel/internal/tracing/log/config.go
2020-03-24 14:15:01 +01:00

22 lines
305 B
Go

package log
import (
"go.opencensus.io/trace"
"github.com/caos/zitadel/internal/tracing"
)
type Config struct {
Fraction float64
}
func (c *Config) NewTracer() error {
if c.Fraction < 1 {
c.Fraction = 1
}
tracing.T = &Tracer{trace.ProbabilitySampler(c.Fraction)}
return tracing.T.Start()
}