Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveServiceName ¶ added in v1.11.5
ResolveServiceName determines the OpenTelemetry service name.
Priority:
- explicit tracing service name (if set and not an IP)
- configured instance name (if set and not an IP)
- hostname (if available and not an IP)
- fallbackName
Types ¶
type ConnMonitor ¶ added in v1.2.0
type ConnMonitor struct {
// contains filtered or unexported fields
}
ConnMonitor is a struct that implements monitoring of backend server connections by checking their availability.
func (*ConnMonitor) CheckBackendConnection ¶ added in v1.2.0
func (cm *ConnMonitor) CheckBackendConnection(server *config.BackendServer) error
CheckBackendConnection attempts to establish a connection to a backend server to verify its availability. It returns an error if the connection cannot be established, using the specified configuration parameters.
type Monitor ¶ added in v1.2.0
type Monitor interface {
// CheckBackendConnection checks the backend connection of a server based on the provided Host address, port number, whether the server runs with HAProxy V2 protocol, and whether TLS should be used. It returns an error if the connection fails.
CheckBackendConnection(server *config.BackendServer) error
}
Monitor defines an interface for monitoring and checking backend server connections. It provides a method to verify connectivity using specified configurations.
type Telemetry ¶ added in v1.11.5
type Telemetry struct {
// contains filtered or unexported fields
}
Telemetry provides lifecycle management for OpenTelemetry tracing.
func GetTelemetry ¶ added in v1.11.5
func GetTelemetry() *Telemetry
GetTelemetry returns the Telemetry singleton.
func (*Telemetry) SetProvider ¶ added in v1.11.5
func (t *Telemetry) SetProvider(p TelemetryConfigProvider)
SetProvider allows injecting a custom configuration provider (primarily for tests). In production the default provider is used, which reads from the global config.
type TelemetryConfigProvider ¶ added in v1.11.5
TelemetryConfigProvider abstracts access to configuration used by telemetry. This allows unit tests to inject a lightweight mock without depending on the full global config.File implementation.