Documentation ¶
Overview ¶
Package otel provides an OpenTelemetry surfacer for Cloudprober. It can export metrics to OpenTelemetry Collector over gRPC or HTTP.
This surfacer holds the incoming EventMetrics in memory and periodically (default: 10s) exports them the configured HTTP or gRPC endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OtelSurfacer ¶
type OtelSurfacer struct {
// contains filtered or unexported fields
}
OtelSurfacer implements OpenTelemetry surfacer for Cloudprober.
func New ¶
func New(ctx context.Context, config *configpb.SurfacerConf, opts *options.Options, l *logger.Logger) (*OtelSurfacer, error)
New returns a prometheus surfacer based on the config provided. It sets up a goroutine to process both the incoming EventMetrics and the web requests for the URL handler /metrics.
func (*OtelSurfacer) Produce ¶
func (os *OtelSurfacer) Produce(_ context.Context) ([]metricdata.ScopeMetrics, error)
func (*OtelSurfacer) Write ¶
func (os *OtelSurfacer) Write(_ context.Context, em *metrics.EventMetrics)
record processes the incoming EventMetrics and updates the in-memory otel metrics database.
Click to show internal directories.
Click to hide internal directories.