Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- func (c *Config) ApplyDefaults(globals integrations.Globals) error
- func (c *Config) Identifier(globals integrations.Globals) (string, error)
- func (c *Config) Name() string
- func (c *Config) NewIntegration(l log.Logger, globals integrations.Globals) (integrations.Integration, error)
- func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error
- type RateLimitingConfig
- type ServerConfig
- type SourceMapConfig
- type SourceMapFileLocation
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 ¶
ApplyDefaults applies runtime-specific defaults to c.
func (*Config) Identifier ¶
Identifier uniquely identifies the app agent receiver integration
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 ¶
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
Click to show internal directories.
Click to hide internal directories.