Introduce trace verbosity config and produce less spans by default
This commit is contained in:
parent
77ef7fe490
commit
8c23eb6833
93 changed files with 1005 additions and 524 deletions
|
|
@ -23,6 +23,22 @@ import (
|
|||
"google.golang.org/grpc/encoding/gzip"
|
||||
)
|
||||
|
||||
type TracingVerbosity string
|
||||
|
||||
const (
|
||||
MinimalVerbosity TracingVerbosity = "minimal"
|
||||
DetailedVerbosity TracingVerbosity = "detailed"
|
||||
)
|
||||
|
||||
func (v TracingVerbosity) Allows(verbosity TracingVerbosity) bool {
|
||||
switch v {
|
||||
case DetailedVerbosity:
|
||||
return verbosity == DetailedVerbosity || verbosity == MinimalVerbosity
|
||||
default:
|
||||
return verbosity == MinimalVerbosity
|
||||
}
|
||||
}
|
||||
|
||||
// OTelTracing provides configuration settings for the open-telemetry tracer.
|
||||
type OTelTracing struct {
|
||||
GRPC *OTelGRPC `description:"gRPC configuration for the OpenTelemetry collector." json:"grpc,omitempty" toml:"grpc,omitempty" yaml:"grpc,omitempty" label:"allowEmpty" file:"allowEmpty" export:"true"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue