app_agent_receiver

package
v1.4.0-rc.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DefaultRateLimitingRPS is the default value of Requests Per Second
	// for ratelimiting
	DefaultRateLimitingRPS = 100
	// DefaultRateLimitingBurstiness is the default burstiness factor of the
	// token bucket algorithm
	DefaultRateLimitingBurstiness = 50
	// DefaultMaxPayloadSize is the max payload size in bytes
	DefaultMaxPayloadSize = 5e6
)

Variables

View Source
var DefaultConfig = Config{

	Server: ServerConfig{
		Host: "127.0.0.1",
		Port: 12347,
		RateLimiting: RateLimitingConfig{
			Enabled:    true,
			RPS:        DefaultRateLimitingRPS,
			Burstiness: DefaultRateLimitingBurstiness,
		},
		MaxAllowedPayloadSize: DefaultMaxPayloadSize,
	},
	LogsLabels:      map[string]string{},
	LogsSendTimeout: time.Second * 2,
	SourceMaps: SourceMapConfig{
		DownloadFromOrigins: []string{"*"},
		DownloadTimeout:     time.Second,
	},
}

DefaultConfig holds the default configuration of the receiver

View Source
var IntegrationName = "app_agent_receiver"

IntegrationName is the name of this integration

Functions

This section is empty.

Types

type Config

type Config struct {
	Common          common.MetricsConfig `yaml:",inline"`
	Server          ServerConfig         `yaml:"server,omitempty"`
	TracesInstance  string               `yaml:"traces_instance,omitempty"`
	LogsInstance    string               `yaml:"logs_instance,omitempty"`
	LogsLabels      map[string]string    `yaml:"logs_labels,omitempty"`
	LogsSendTimeout time.Duration        `yaml:"logs_send_timeout,omitempty"`
	SourceMaps      SourceMapConfig      `yaml:"sourcemaps,omitempty"`
}

Config is the configuration struct of the integration

func (*Config) ApplyDefaults

func (c *Config) ApplyDefaults(globals integrations.Globals) error

ApplyDefaults applies runtime-specific defaults to c.

func (*Config) Identifier

func (c *Config) Identifier(globals integrations.Globals) (string, error)

Identifier uniquely identifies the app agent receiver integration

func (*Config) Name

func (c *Config) Name() string

Name returns the name of the integration that this config represents

func (*Config) NewIntegration

func (c *Config) NewIntegration(l log.Logger, globals integrations.Globals) (integrations.Integration, error)

NewIntegration converts this config into an instance of an integration

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaler interface

type RateLimitingConfig

type RateLimitingConfig struct {
	Enabled    bool    `yaml:"enabled,omitempty"`
	RPS        float64 `yaml:"rps,omitempty"`
	Burstiness int     `yaml:"burstiness,omitempty"`
}

RateLimitingConfig holds the configuration of the rate limiter

type ServerConfig

type ServerConfig struct {
	Host                  string             `yaml:"host,omitempty"`
	Port                  int                `yaml:"port,omitempty"`
	CORSAllowedOrigins    []string           `yaml:"cors_allowed_origins,omitempty"`
	RateLimiting          RateLimitingConfig `yaml:"rate_limiting,omitempty"`
	APIKey                string             `yaml:"api_key,omitempty"`
	MaxAllowedPayloadSize int64              `yaml:"max_allowed_payload_size,omitempty"`
}

ServerConfig holds the receiver http server configuration

type SourceMapConfig

type SourceMapConfig struct {
	Download            bool                    `yaml:"download"`
	DownloadFromOrigins []string                `yaml:"download_origins,omitempty"`
	DownloadTimeout     time.Duration           `yaml:"download_timeout,omitempty"`
	FileSystem          []SourceMapFileLocation `yaml:"filesystem,omitempty"`
}

SourceMapConfig configure source map locations

type SourceMapFileLocation

type SourceMapFileLocation struct {
	Path               string `yaml:"path"`
	MinifiedPathPrefix string `yaml:"minified_path_prefix,omitempty"`
}

SourceMapFileLocation holds sourcemap location on file system

Jump to

Keyboard shortcuts

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