Chapter 2. Architecture
pgpro-otel-collector is based on the OpenTelemetry Collector and consists of several components that work together in a pipeline (collection — processing — exporting):
Receivers — the primary components responsible for collecting data. pgpro-otel-collector includes the following receivers:
postgrespro— the central component of the collector, which contains the main implementation (built-in plugins) for collecting data from a database instance.filelog— an auxiliary receiver responsible for collecting information from database logs.hostmetrics— an auxiliary receiver that collects information from the operating system; may require root access.journald— an auxiliary receiver that collects logs from the systemd journal.
Processors receive data from receivers and process it. pgpro-otel-collector includes the following processors:
attributesprocesses specific attributes of log records.resourceadds extra log record attributes.batchbatches data and regulates the data transmission mechanism.transformmodifies the data using the OpenTelemetry Transformation Language (OTTL).
Exporters receive processed data from processors and deliver it to external consumers. pgpro-otel-collector supports the following exporters:
otlphttpexports and sends information over the OTLP protocol (the standard OpenTelemetry protocol used by many monitoring system vendors) with the help of the HTTP protocol.prometheusexports metrics over the built-in HTTP server and publishes them on the/metricspage in the format of the Prometheus monitoring system.prometheusis used by default because it does not require additional configuration.
Following the OpenTelemetry Collector architecture, the pgpro-otel-collector configuration allows using the same component multiple times. For example, you can use several copies of the same receiver to collect data from numerous DBMS instances. Similarly, the same exporter can be used for exporting data to various storages.
For detailed description of each component, see Chapter 7.