plogutiltest

package
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogRecord added in v0.114.0

func LogRecord(id string) plog.LogRecord

func NewLogs

func NewLogs(resourceIDs, scopeIDs, logRecordIDs string) plog.Logs

NewLogs returns a plog.Logs with a uniform structure where resources, scopes, and log records are identical across all instances, except for one identifying field.

Identifying fields: - Resources have an attribute called "resourceName" with a value of "resourceN". - Scopes have a name with a value of "scopeN". - LogRecords have a body with a value of "logN".

Example: NewLogs("AB", "XYZ", "1234") returns:

resourceA, resourceB
    each with scopeX, scopeY, scopeZ
        each with log1, log2, log3, log4

Each byte in the input string is a unique ID for the corresponding element.

func NewLogsFromOpts

func NewLogsFromOpts(resources ...plog.ResourceLogs) plog.Logs

func Resource

func Resource(id string, scopes ...plog.ScopeLogs) plog.ResourceLogs

func Scope

func Scope(id string, logs ...plog.LogRecord) plog.ScopeLogs

Types

This section is empty.

Jump to

Keyboard shortcuts

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