Extension to provide integrations from local files
This extension allows to provide integrations installed on local files.
These integrations can be then used with other components such as the
integration receiver or the integration processor.
Configuration
path
Path to the directory containing integrations. Other components can use the name
of each file, without extension, to reference them as integrations.
Example
Integrations are defined in YAML format, with a structure similar to the
collector configuration. They can define receivers, processors, and pipelines.
For example the following integration would define a logs receiver based on the
filelog
receiver and the transform
processor:
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
If this template would be installed for example in the /etc/opentelemetry/integrations/somelog.yaml
file, it could be used with the following configuration, that creates two
pipelines, one uses the integration as receiver, and another one uses it as a
processor.
extensions:
file_integrations:
path: "/etc/opentelemetry/integrations"
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: ...