receiver

package
v0.40.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultArguments = Arguments{
		Server:     DefaultServerArguments,
		SourceMaps: DefaultSourceMapsArguments,
	}

	DefaultServerArguments = ServerArguments{
		Host:                  "127.0.0.1",
		Port:                  12347,
		RateLimiting:          DefaultRateLimitingArguments,
		MaxAllowedPayloadSize: 5 * units.MiB,
	}

	DefaultRateLimitingArguments = RateLimitingArguments{
		Enabled:   true,
		Rate:      50,
		BurstSize: 100,
	}

	DefaultSourceMapsArguments = SourceMapsArguments{
		Download:            true,
		DownloadFromOrigins: []string{"*"},
		DownloadTimeout:     time.Second,
	}
)

Defaults for various arguments.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	LogLabels map[string]string `river:"extra_log_labels,attr,optional"`

	Server     ServerArguments     `river:"server,block,optional"`
	SourceMaps SourceMapsArguments `river:"sourcemaps,block,optional"`
	Output     OutputArguments     `river:"output,block"`
}

Arguments configures the app_agent_receiver component.

func (*Arguments) SetToDefault

func (args *Arguments) SetToDefault()

SetToDefault applies default settings.

type Component

type Component struct {
	// contains filtered or unexported fields
}

func New

func New(o component.Options, args Arguments) (*Component, error)

func (*Component) CurrentHealth

func (c *Component) CurrentHealth() component.Health

CurrentHealth implements component.HealthComponent. It returns an unhealthy status if the server has terminated.

func (*Component) Run

func (c *Component) Run(ctx context.Context) error

func (*Component) Update

func (c *Component) Update(args component.Arguments) error

type LocationArguments

type LocationArguments struct {
	Path               string `river:"path,attr"`
	MinifiedPathPrefix string `river:"minified_path_prefix,attr"`
}

LocationArguments specifies an individual location where source maps will be loaded.

type OutputArguments

type OutputArguments struct {
	Logs   []loki.LogsReceiver `river:"logs,attr,optional"`
	Traces []otelcol.Consumer  `river:"traces,attr,optional"`
}

OutputArguments configures where to send emitted logs and traces. Metrics emitted by app_agent_receiver are exported as targets to be scraped.

type RateLimitingArguments

type RateLimitingArguments struct {
	Enabled   bool    `river:"enabled,attr,optional"`
	Rate      float64 `river:"rate,attr,optional"`
	BurstSize float64 `river:"burst_size,attr,optional"`
}

RateLimitingArguments configures rate limiting for the HTTP server.

type ServerArguments

type ServerArguments struct {
	Host                  string            `river:"listen_address,attr,optional"`
	Port                  int               `river:"listen_port,attr,optional"`
	CORSAllowedOrigins    []string          `river:"cors_allowed_origins,attr,optional"`
	APIKey                rivertypes.Secret `river:"api_key,attr,optional"`
	MaxAllowedPayloadSize units.Base2Bytes  `river:"max_allowed_payload_size,attr,optional"`

	RateLimiting RateLimitingArguments `river:"rate_limiting,block,optional"`
}

ServerArguments configures the HTTP server where telemetry information will be sent from Faro clients.

type SourceMapsArguments

type SourceMapsArguments struct {
	Download            bool                `river:"download,attr,optional"`
	DownloadFromOrigins []string            `river:"download_from_origins,attr,optional"`
	DownloadTimeout     time.Duration       `river:"download_timeout,attr,optional"`
	Locations           []LocationArguments `river:"location,block,optional"`
}

SourceMapsArguments configures how app_agent_receiver will retrieve source maps for transforming stack traces.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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