configintegrationextension

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

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

README

Extension to provide integrations embedded in the configuration file

Status
Stability development
Distributions []
Issues Open issues Closed issues
Code coverage codecov
Code Owners @jsoriano

This extension allows to define integrations embedded in the collector configuration file. These integrations can be then used with the integration receiver or the integration processor.

Configuration

integrations

Map with the embedded definition of integrations. The key of the map is the name of the integration, that can be referenced by other components using integrations. The value is a string with YAML content defining an integration. Variables in the integration use the same syntax as other variables, but they need to be escaped with a double $$ so they are resolved when the integration is instantiated.

Example

The following configuration defines an integration called "somelog" that is reused in two pipelines, using the integration receiver and the integration processor.

extensions:
  config_integrations:
    integrations:
      somelog: |
        receivers:
          filelog:
            include: $${var:paths}
            start_at: beginning

        processors:
          transform/resource:
            log_statements:
              - set(log.attributes["resource"], "$${var:resource}")

        pipelines:
          logs:
            receiver: filelog
            processors:
              - transform/resource

receivers:
  integration:
    name: "somelog"
    pipelines: "logs"
    parameters:
      paths: "/var/log/somelog-*.log"
      resource: "example"

  filelog:
    include: "/var/log/otherlog-*.log"

processors:
  integration:
    name: "somelog"
    pipelines: "logs"
    parameters:
      resource: "other"

exporters: ...

service:
  extensions: [file_integrations]
  pipelines:
    logs/somelog:
      receivers: [integration]
      exporters: ...
    logs/otherlog:
      receivers: [filelog]
      processors: [integration]
      exporters: ...

Documentation

Overview

Package configintegrationextension provides a source of integrations that obtain them from a local directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() extension.Factory

NewFactory creates a factory for ack extension.

Types

type Config

type Config struct {
	// Integrations is a map with the embedded definition of integrations.
	Integrations map[string]string `mapstructure:"integrations"`
}

Config is the structured configuration of the extension.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks that the embedded integrations are syntactically valid.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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