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.

  • Processors: Receive data from receivers and process it. pgpro-otel-collector includes the following processors:

    • attributes: Processes specific attributes of log records.

    • resource: Adds extra log record attributes.

    • batch: Batches data and regulates the data transmission mechanism.

  • Exporters: Receive processed data from processors and deliver it to external consumers. pgpro-otel-collector supports the following exporters:

    • otlphttp: Exports and sends information over the OTLP protocol (the standard OpenTelemetry protocol used by many monitoring system vendors) with the help of the HTTP protocol.

    • prometheus: Exports metrics over the built-in HTTP server and publishes them on the /metrics page in the format of the Prometheus monitoring system. prometheus is 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.