loadgenreceiver

package module
v0.0.0-...-1492674 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

README

Loadgen receiver

Status
Stability development: metrics, logs, traces
Distributions []
Issues Open issues Closed issues

The Loadgen receiver is a specialized OpenTelemetry receiver designed to generate metrics, logs, and traces for testing, benchmarking, and validation purposes.

How Telemetry Is Generated

The receiver utilizes pre-captured telemetry data from a typical OpenTelemetry Demo execution, which represents a diverse set of application scenarios and workloads. When generating telemetry, the receiver uses this base data, dynamically adjusting timestamps to match the current time. This approach ensures the generated telemetry retains the structure and content of authentic OpenTelemetry Demo data while appearing as though it were generated in real-time. The pre-captured telemetry is embedded in the receiver and can be found in testdata directory.

Rate limiting

The receiver generates telemetry as quickly as possible. Any rate limiting should be done via backpressure using processor/ratelimitprocessor.

Telemetry cardinality

The receiver only rewrites timestamps to Now, and does not modify any other fields. Therefore, it will have the same cardinality as the original canned data. To simulate higher cardinality (e.g. trace ID, service name), use transform processor with OTTL to rewrite fields.

Sample configuration

receivers:
  loadgen:

processors:

exporters:
  debug:
    verbosity: detailed

service:
  telemetry:
    logs:
      level: debug
  pipelines:
    metrics:
      receivers: [loadgen]
      processors:
      exporters: [debug]
    logs:
      receivers: [loadgen]
      processors:
      exporters: [debug]
    traces:
      receivers: [loadgen]
      processors:
      exporters: [debug]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

Types

type Config

type Config struct {
	Metrics MetricsConfig `mapstructure:"metrics"`
	Logs    LogsConfig    `mapstructure:"logs"`
	Traces  TracesConfig  `mapstructure:"traces"`
}

Config defines configuration for HostMetrics receiver.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks the receiver configuration is valid

type JsonlFile

type JsonlFile string

type LogsConfig

type LogsConfig struct {
	// JsonlFile is an optional configuration option to specify the path to
	// get the base generated signals from.
	JsonlFile `mapstructure:"jsonl_file"`
}

type MetricsConfig

type MetricsConfig struct {
	// JsonlFile is an optional configuration option to specify the path to
	// get the base generated signals from.
	JsonlFile `mapstructure:"jsonl_file"`
}

type TracesConfig

type TracesConfig struct {
	// JsonlFile is an optional configuration option to specify the path to
	// get the base generated signals from.
	JsonlFile `mapstructure:"jsonl_file"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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