feat(servicekit): OpenTelemetry tracer provider and RPC propagation
This commit is contained in:
1 parent
b30cb0b1db
commit
bc41094b14
23 files changed
+288
-29
No files matched your search
@@ -408,6 +408,7 @@ type Config struct {
|
||||
Web Web `toml:"web" yaml:"web"`
|
||||
Health Health `toml:"health" yaml:"health"`
|
||||
Log Log `toml:"log" yaml:"log"`
|
||||
Telemetry Telemetry `toml:"telemetry" yaml:"telemetry"`
|
||||
Notify Notify `toml:"notify" yaml:"notify"`
|
||||
NATS NATSConfig `toml:"nats" yaml:"nats"`
|
||||
Containers ContainerConfig `toml:"containers" yaml:"containers"`
|
||||
@@ -884,6 +885,23 @@ type Log struct {
|
||||
Quiet bool `toml:"quiet" yaml:"quiet"`
|
||||
}
|
||||
|
||||
// Telemetry configures OTLP trace export. An empty Endpoint disables tracing:
|
||||
// nothing is exported and no tracer provider is installed.
|
||||
type Telemetry struct {
|
||||
// Endpoint is the OTLP/gRPC collector address, host:port.
|
||||
Endpoint string `toml:"endpoint" yaml:"endpoint"`
|
||||
// Headers are sent with every export, for collector authentication.
|
||||
Headers map[string]string `toml:"headers" yaml:"headers"`
|
||||
// Insecure exports over plaintext gRPC instead of TLS.
|
||||
Insecure bool `toml:"insecure" yaml:"insecure"`
|
||||
// CAFile is the PEM bundle that verifies the collector. Empty uses the
|
||||
// system roots.
|
||||
CAFile string `toml:"ca_file" yaml:"ca_file"`
|
||||
// SampleRatio is the fraction of new traces recorded, 0 to 1. A trace
|
||||
// started by a caller keeps its caller's decision. Defaulted to 1.
|
||||
SampleRatio float64 `toml:"sample_ratio" yaml:"sample_ratio"`
|
||||
}
|
||||
|
||||
// ChatConfig configures conversational front-ends. Empty (Telegram.Token.Key ==
|
||||
// "") disables chat entirely.
|
||||
type ChatConfig struct {
|
||||
|
||||
Reference in new issue
Block a user