Documentation ¶
Index ¶
- type ObsReport
- func (rec *ObsReport) EndLogsOp(receiverCtx context.Context, format string, numReceivedLogRecords int, ...)
- func (rec *ObsReport) EndMetricsOp(receiverCtx context.Context, format string, numReceivedPoints int, err error)
- func (rec *ObsReport) EndTracesOp(receiverCtx context.Context, format string, numReceivedSpans int, err error)
- func (rec *ObsReport) StartLogsOp(operationCtx context.Context) context.Context
- func (rec *ObsReport) StartMetricsOp(operationCtx context.Context) context.Context
- func (rec *ObsReport) StartTracesOp(operationCtx context.Context) context.Context
- type ObsReportSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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) 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 ¶
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 ¶
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) StartTracesOp ¶
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.CreateSettings }
ObsReportSettings are settings for creating an ObsReport.