Documentation ¶
Index ¶
- Constants
- Variables
- func AddConfigSchema(c interface{ ... }) error
- func NewHandler(handler http.Handler, operation string) http.Handler
- func SetupJaeger(t *Tracer, tracerName string) (trace.Tracer, error)
- func SetupOTLP(t *Tracer, tracerName string) (trace.Tracer, error)
- func SetupZipkin(t *Tracer, tracerName string) (trace.Tracer, error)
- func StringAttrs(attrs map[string]string) []attribute.KeyValue
- type Config
- type JaegerConfig
- type JaegerSampling
- type OTLPConfig
- type OTLPSampling
- type ProvidersConfig
- type Tracer
- type ZipkinConfig
- type ZipkinSampling
Constants ¶
View Source
const ConfigSchemaID = "ory://tracing-config"
Variables ¶
View Source
var ConfigSchema string
Functions ¶
func AddConfigSchema ¶
AddConfigSchema adds the tracing schema to the compiler. The interface is specified instead of `jsonschema.Compiler` to allow the use of any jsonschema library fork or version.
func SetupJaeger ¶
Optionally, Config.Providers.Jaeger.LocalAgentAddress can be set. NOTE: If Config.Providers.Jaeger.Sampling.ServerURL is not specfied, AlwaysSample is used.
func SetupZipkin ¶ added in v0.0.381
Types ¶
type Config ¶
type Config struct { ServiceName string `json:"service_name"` Provider string `json:"provider"` Providers ProvidersConfig `json:"providers"` }
type JaegerConfig ¶
type JaegerConfig struct { LocalAgentAddress string `json:"local_agent_address"` Sampling JaegerSampling `json:"sampling"` }
type JaegerSampling ¶
type JaegerSampling struct {
ServerURL string `json:"server_url"`
}
type OTLPConfig ¶ added in v0.0.381
type OTLPConfig struct { ServerURL string `json:"server_url"` Insecure bool `json:"insecure"` Sampling OTLPSampling `json:"sampling"` }
type OTLPSampling ¶ added in v0.0.381
type OTLPSampling struct {
SamplingRatio float64 `json:"sampling_ratio"`
}
type ProvidersConfig ¶
type ProvidersConfig struct { Jaeger JaegerConfig `json:"jaeger"` Zipkin ZipkinConfig `json:"zipkin"` OTLP OTLPConfig `json:"otlp"` }
type Tracer ¶
type Tracer struct { Config *Config // contains filtered or unexported fields }
func New ¶
Creates a new tracer. If name is empty, a default tracer name is used instead. See: https://godocs.io/go.opentelemetry.io/otel/sdk/trace#TracerProvider.Tracer
type ZipkinConfig ¶ added in v0.0.381
type ZipkinConfig struct { ServerURL string `json:"server_url"` Sampling ZipkinSampling `json:"sampling"` }
type ZipkinSampling ¶ added in v0.0.381
type ZipkinSampling struct {
SamplingRatio float64 `json:"sampling_ratio"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.