json

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// LogTypeDefault is the default log type
	LogTypeDefault = logtypes.LogTypeDefault
	// LogTypePII is the PII log type
	LogTypePII = logtypes.LogTypePII
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONLogGenerator

type JSONLogGenerator struct {
	embed.ProducerMarker
	// contains filtered or unexported fields
}

JSONLogGenerator generates JSON log data with configurable workers

func New

func New(logger *zap.Logger, workers int, rate time.Duration, logType string, consumer embed.LogConsumer) (*JSONLogGenerator, error)

New creates a new JSON log generator. The consumer receives each generated record as a size-1 batch via ConsumeLogs.

func (*JSONLogGenerator) Name added in v0.16.0

func (g *JSONLogGenerator) Name() string

Name returns the module identifier.

func (*JSONLogGenerator) SetCountTracker added in v0.13.0

func (g *JSONLogGenerator) SetCountTracker(t *count.Tracker)

SetCountTracker sets the finite generation count tracker.

func (*JSONLogGenerator) Start

func (g *JSONLogGenerator) Start(_ context.Context) error

Start launches the worker goroutines that push generated records to the configured consumer.

func (*JSONLogGenerator) Stop

func (g *JSONLogGenerator) Stop(ctx context.Context) error

Stop stops the JSON log generator. This function expects to be called exactly once.

func (*JSONLogGenerator) SupportedTelemetry added in v0.16.0

func (g *JSONLogGenerator) SupportedTelemetry() []telemetry.Type

SupportedTelemetry returns the telemetry types this generator produces.

Jump to

Keyboard shortcuts

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