Documentation ¶
Overview ¶
Package lokiexporter implements an exporter that sends log data to Loki.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
func NewFactory() component.ExporterFactory
NewFactory creates a factory for the legacy Loki exporter.
Types ¶
type Config ¶
type Config struct { config.ExporterSettings `mapstructure:",squash"` confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` // TenantID defines the tenant ID to associate log streams with. // Deprecated: [v0.57.0] use the attribute processor to add a `loki.tenant` hint. // See this component's documentation for more information on how to specify the hint. TenantID *string `mapstructure:"tenant_id"` // Labels defines how labels should be applied to log streams sent to Loki. // Deprecated: [v0.57.0] use the attribute processor to add a `loki.attribute.labels` hint. // See this component's documentation for more information on how to specify the hint. Labels *LabelsConfig `mapstructure:"labels"` // Allows you to choose the entry format in the exporter. // Deprecated: [v0.57.0] Only the JSON format will be supported in the future. If you rely on the // "body" format and can't change to JSON, let us know before v0.59.0 by opening a GitHub issue // and we'll work with you to find a solution. Format *string `mapstructure:"format"` // Tenant defines how to obtain the tenant ID // Deprecated: [v0.57.0] use the attribute processor to add a `loki.tenant` hint. // See this component's documentation for more information on how to specify the hint. Tenant *Tenant `mapstructure:"tenant"` }
Config defines configuration for Loki exporter.
type LabelsConfig ¶ added in v0.21.0
type LabelsConfig struct { // Attributes are the log record attributes that are allowed to be added as labels on a log stream. Attributes map[string]string `mapstructure:"attributes"` // ResourceAttributes are the resource attributes that are allowed to be added as labels on a log stream. ResourceAttributes map[string]string `mapstructure:"resource"` // RecordAttributes are the attributes from the record that are allowed to be added as labels on a log stream. Possible keys: // traceID, spanID, severity, severityN. RecordAttributes map[string]string `mapstructure:"record"` }
LabelsConfig defines the labels-related configuration Deprecated: [v0.57.0] will be removed without replacement by v0.61.0. See the Config#Labels for alternatives.
type Tenant
deprecated
added in
v0.56.0
type Tenant struct { // Source defines where to obtain the tenant ID. Possible values: static, context, attribute. Source string `mapstruct:"source"` // Value will be used by the tenant source provider to lookup the value. For instance, // when the source=static, the value is a static value. When the source=context, value // should be the context key that holds the tenant information. Value string `mapstruct:"value"` }
Deprecated: [v0.57.0] will be removed without replacement by v0.61.0. See the Config#Tenant for alternatives.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.