Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetricsToReceiverIDs ¶
MetricsToReceiverIDs extracts the identifiers receiver creator created receivers will embed in their attributes
func NewZapCoreEncoder ¶ added in v0.61.0
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.