Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides OpenTelemetry metrics with configurable exporters.
type Config ¶
type Config struct {
ServiceName string `hcl:"service-name" help:"Service name for metrics." default:"cachew"`
Port int `hcl:"port" help:"Port for Prometheus metrics server." default:"9102"`
EnablePrometheus bool `hcl:"enable-prometheus" help:"Enable Prometheus exporter." default:"true"`
EnableOTLP bool `hcl:"enable-otlp" help:"Enable OTLP exporter." default:"false"`
OTLPEndpoint string `hcl:"otlp-endpoint" help:"OTLP endpoint URL." default:"http://localhost:4318"`
OTLPInsecure bool `hcl:"otlp-insecure" help:"Use insecure connection for OTLP." default:"false"`
OTLPExportInterval int `hcl:"otlp-export-interval" help:"OTLP export interval in seconds." default:"60"`
}
Config holds metrics configuration.
Click to show internal directories.
Click to hide internal directories.