statussources

package
v0.112.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetricsToReceiverIDs

func MetricsToReceiverIDs(md pmetric.Metrics) (component.ID, observer.EndpointID)

MetricsToReceiverIDs extracts the identifiers receiver creator created receivers will embed in their attributes

func NewZapCoreEncoder added in v0.61.0

func NewZapCoreEncoder() zapcore.Encoder

func ReceiverNameToIDs added in v0.61.0

func ReceiverNameToIDs(statement *Statement) (component.ID, observer.EndpointID)

ReceiverNameToIDs parses the zap "name" field value according to outcome of https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/12670 where receiver creator receiver names are of the form `<receiver.type>/<receiver.name>/receiver_creator/<receiver-creator.name>{endpoint="<Endpoint.Target>"}/<Endpoint.ID>`. If receiverName argument is not of this form empty Component and Endpoint IDs are returned.

Types

type Statement added in v0.61.0

type Statement struct {
	Message    string
	Fields     map[string]any
	Time       time.Time
	LoggerName string
	Caller     zapcore.EntryCaller
	Stack      string
}

Statement models a zapcore.Entry but defined here for usability/maintainability

func StatementFromZapCoreEntry added in v0.61.0

func StatementFromZapCoreEntry(encoder zapcore.Encoder, entry zapcore.Entry, fields []zapcore.Field) (*Statement, error)

StatementFromZapCoreEntry converts the Entry to a Statement using the provided encoder, which is assumed to be a JSONEncoder (unexpected from zapcore) to obtain the target Fields.

Jump to

Keyboard shortcuts

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