Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OTELConfig ¶
type OTELConfig struct {
// GitHub configuration for API authentication
GitHub struct {
Token string `json:"token" yaml:"token"` // GitHub personal access token
} `json:"github" yaml:"github"`
// Service metadata
ServiceName string `json:"service_name" yaml:"service_name"`
ServiceVersion string `json:"service_version" yaml:"service_version"`
Environment string `json:"environment" yaml:"environment"`
ResourceAttrs map[string]string `json:"resource_attributes" yaml:"resource_attributes"`
// Instrumentations to enable (per language these map to specific packages)
Instrumentations []string `json:"instrumentations" yaml:"instrumentations"`
// Context propagation
Propagators []string `json:"propagators" yaml:"propagators"`
// Sampling configuration
Sampler struct {
Type string `json:"type" yaml:"type"` // e.g., always_on, always_off, traceidratio
Ratio float64 `json:"ratio" yaml:"ratio"` // used for ratio-based samplers
Parent string `json:"parent" yaml:"parent"` // reserved for parentbased variants
Rules []string `json:"rules" yaml:"rules"` // reserved for advanced/language-specific
} `json:"sampler" yaml:"sampler"`
// Exporters and endpoints
Exporters struct {
Traces struct {
Type string `json:"type" yaml:"type"` // e.g., otlp, console, jaeger (only otlp supported in templates for now)
Protocol string `json:"protocol" yaml:"protocol"` // http/http+protobuf, grpc
Endpoint string `json:"endpoint" yaml:"endpoint"`
Headers map[string]string `json:"headers" yaml:"headers"`
Insecure bool `json:"insecure" yaml:"insecure"`
TimeoutMs int `json:"timeout_ms" yaml:"timeout_ms"`
} `json:"traces" yaml:"traces"`
Metrics struct {
Type string `json:"type" yaml:"type"`
Protocol string `json:"protocol" yaml:"protocol"`
Endpoint string `json:"endpoint" yaml:"endpoint"`
Insecure bool `json:"insecure" yaml:"insecure"`
} `json:"metrics" yaml:"metrics"`
Logs struct {
Type string `json:"type" yaml:"type"`
Protocol string `json:"protocol" yaml:"protocol"`
Endpoint string `json:"endpoint" yaml:"endpoint"`
Insecure bool `json:"insecure" yaml:"insecure"`
} `json:"logs" yaml:"logs"`
} `json:"exporters" yaml:"exporters"`
// Span processors and additional SDK knobs
SpanProcessors []string `json:"span_processors" yaml:"span_processors"`
SDK map[string]string `json:"sdk" yaml:"sdk"`
}
OTELConfig represents advanced OpenTelemetry configuration that can be provided via a YAML file and applied across languages.
func LoadOTELConfig ¶
func LoadOTELConfig(yamlContent []byte) (*OTELConfig, error)
LoadOTELConfig parses YAML content into an OTELConfig.
func (*OTELConfig) Validate ¶
func (c *OTELConfig) Validate() error
Validate checks the configuration for common mistakes and unsupported values.
Click to show internal directories.
Click to hide internal directories.