Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMetrics ¶
func InitMetrics() (err error)
func RecordPackageRevisionResourcesSize ¶
func RecordPackageRevisionResourcesSize(ctx context.Context, prKey repository.PackageRevisionKey, resourcesSize int64)
Porch server and function runner metric recording functions
Types ¶
type OTelResources ¶
type OTelResources struct {
// contains filtered or unexported fields
}
OTelResources holds all OpenTelemetry resources that need lifecycle management. Use Shutdown() to cleanly release all resources.
func SetupOpenTelemetry ¶
func SetupOpenTelemetry(ctx context.Context) (*OTelResources, error)
SetupOpenTelemetry is the single entry point for all OpenTelemetry setup. It configures tracing, metrics (including the Prometheus HTTP server if OTEL_EXPORTER_PROMETHEUS_HOST and OTEL_EXPORTER_PROMETHEUS_PORT are set), and initializes all Porch metric instruments. Returns OTelResources for lifecycle management.
func (*OTelResources) Shutdown ¶
func (r *OTelResources) Shutdown(ctx context.Context) error
Shutdown gracefully shuts down all OpenTelemetry resources.
func (*OTelResources) ShutdownWithTimeout ¶
func (r *OTelResources) ShutdownWithTimeout(timeout time.Duration) error
ShutdownWithTimeout is a convenience wrapper around Shutdown with a timeout.
Click to show internal directories.
Click to hide internal directories.