telemetry

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL