receiverhelper

package module
v0.159.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 12 Imported by: 119

Documentation

Index

Constants

This section is empty.

Variables

NewReceiverMetricsGate is the feature gate that controls whether to distinguish downstream errors from internal errors in pipeline telemetry. This feature gate is used in OTLP receiver tests, and therefore needs to be public.

Functions

This section is empty.

Types

type ObsReport

type ObsReport struct {
	// contains filtered or unexported fields
}

ObsReport is a helper to add observability to a receiver.

func NewObsReport

func NewObsReport(cfg ObsReportSettings) (*ObsReport, error)

NewObsReport creates a new ObsReport.

func (*ObsReport) EndLogsOp

func (rec *ObsReport) EndLogsOp(
	receiverCtx context.Context,
	format string,
	numReceivedLogRecords int,
	err error,
)

EndLogsOp completes the receive operation that was started with StartLogsOp.

func (*ObsReport) EndMetricsOp

func (rec *ObsReport) EndMetricsOp(
	receiverCtx context.Context,
	format string,
	numReceivedPoints int,
	err error,
)

EndMetricsOp completes the receive operation that was started with StartMetricsOp.

func (*ObsReport) EndProfilesOp added in v0.144.0

func (rec *ObsReport) EndProfilesOp(
	receiverCtx context.Context,
	format string,
	numReceivedProfileSamples int,
	err error,
)

EndProfilesOp completes the receive operation that was started with StartProfilesOp.

func (*ObsReport) EndTracesOp

func (rec *ObsReport) EndTracesOp(
	receiverCtx context.Context,
	format string,
	numReceivedSpans int,
	err error,
)

EndTracesOp completes the receive operation that was started with StartTracesOp.

func (*ObsReport) StartLogsOp

func (rec *ObsReport) StartLogsOp(operationCtx context.Context) context.Context

StartLogsOp is called when a request is received from a client. The returned context should be used in other calls to the obsreport functions dealing with the same receive operation.

func (*ObsReport) StartMetricsOp

func (rec *ObsReport) StartMetricsOp(operationCtx context.Context) context.Context

StartMetricsOp is called when a request is received from a client. The returned context should be used in other calls to the obsreport functions dealing with the same receive operation.

func (*ObsReport) StartProfilesOp added in v0.144.0

func (rec *ObsReport) StartProfilesOp(operationCtx context.Context) context.Context

StartProfilesOp is called when a request is received from a client. The returned context should be used in other calls to the obsreport functions dealing with the same receive operation.

func (*ObsReport) StartTracesOp

func (rec *ObsReport) StartTracesOp(operationCtx context.Context) context.Context

StartTracesOp is called when a request is received from a client. The returned context should be used in other calls to the obsreport functions dealing with the same receive operation.

type ObsReportSettings

type ObsReportSettings struct {
	ReceiverID component.ID
	Transport  string
	// LongLivedCtx when true indicates that the context passed in the call
	// outlives the individual receive operation.
	// Typically the long lived context is associated to a connection,
	// eg.: a gRPC stream, for which many batches of data are received in individual
	// operations without a corresponding new context per operation.
	LongLivedCtx           bool
	ReceiverCreateSettings receiver.Settings
	// contains filtered or unexported fields
}

ObsReportSettings are settings for creating an ObsReport.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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