Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // NilShutdown is a no-op shutdown function that does nothing. NilShutdown = func(ctx context.Context) error { return nil } )
Functions ¶
func ExportRoleCertMetric ¶
func ExportRoleCertMetric(cert *x509.Certificate)
ExportRoleCertMetric exports the role certificate expiry metric.
func ExportServiceCertMetric ¶
func ExportServiceCertMetric(cert *x509.Certificate)
ExportServiceCertMetric exports the service certificate expiry metric.
func HttpTransport ¶
func HttpTransport(base http.RoundTripper, opts ...otelhttp.Option) http.RoundTripper
HttpTransport returns a http.RoundTripper that is instrumented with OpenTelemetry if oTelEnabled is true.
func RecordAgentCommandResult ¶
RecordAgentCommandResult records the result of an agent command execution.
Types ¶
type ShutdownFn ¶
ShutdownFn is a function type that defines oTel provider shutting down.
func StartOTelProvider ¶
func StartOTelProvider(oTelCfg config.OTel) ShutdownFn
StartOTelProvider starts the OpenTelemetry provider, and returns a shutdown function. It first checks if the collector endpoint is configured and if the TLS file is ready. If not ready, it will start a goroutine waiting for the TLS files to be ready before initializing the OTel SDK.