OpenTelemetry Log Marshaler (plog/encoding.go)

opentelemetry-collector · pdata/plog/encoding.go · go · Apache-2.0
analytics, infra, lang:go

Interfaces for marshaling and unmarshaling OpenTelemetry log data. Use this when implementing custom log exporters or processors.

// Source: https://github.com/open-telemetry/opentelemetry-collector | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package plog // import "go.opentelemetry.io/collector/pdata/plog"

// MarshalSizer is the interface that groups the basic Marshal and Size methods
type MarshalSizer interface {
	Marshaler
	Sizer
}

// Marshaler marshals Logs into bytes.
type Marshaler interface {
	// MarshalLogs the given Logs into bytes.
	// If the error is not nil, the returned bytes slice cannot be used.
	MarshalLogs(ld Logs) ([]byte, error)
}

// Unmarshaler unmarshalls bytes into Logs.
type Unmarshaler interface {
	/

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key