This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/collector/components/contrib/postgresqlreceiver.md.

PostgreSQL Receiver

OpenTelemetry Collector receiver · contrib distribution

This receiver queries the PostgreSQL statistics collector.

  • Component ID: contrib-postgresqlreceiver
  • Name: postgresqlreceiver
  • Type: receiver
  • Distribution: contrib
  • Repository: opentelemetry-collector-contrib

Stability

LevelSignals
betametrics
developmentlogs

Attributes

AttributeTypeDescription
bg_buffer_sourcestringThe source of a buffer write.
bg_checkpoint_typestringThe type of checkpoint state.
bg_duration_typestringThe type of time spent during the checkpoint.
db.namespacestringThe namespace or schema of the database where the query is executed.
db.query.textstringThe text of the database query being executed.
db.system.namestringThe database management system (DBMS) product as identified by the client instrumentation.
functionstringThe name of the function.
lock_typestringType of the lockable object.
modestringName of the lock mode held or desired by the process.
network.peer.addressstringIP address of the client connected to this backend.
network.peer.portintTCP port number that the client is using for communication with this backend.
operationstringThe database operation.
postgresql.application_namestringName of the application that is connected to this backend.
postgresql.blocking.lock.modestringThe lock mode being requested by the blocked session (e.g. RowExclusiveLock, AccessExclusiveLock). Empty string when not blocked.
postgresql.blocking.lock.relationstringThe name of the relation (table) being waited on. Empty string when not blocked or when lock is not on a relation.
postgresql.blocking.lock.typestringThe type of lock resource being waited on (e.g. relation, transactionid, tuple). Empty string when not blocked.
postgresql.blocking.pidsstringArray of PIDs of sessions blocking this session (from pg_blocking_pids). Empty array when not blocked.
postgresql.blocking.start_timestringUTC timestamp (RFC3339) when the current lock wait began, derived from pg_locks.waitstart. Empty string when not blocked.
postgresql.blocking.transaction.start_timestringUTC timestamp (RFC3339) when the current transaction started. Empty string when no active transaction.
postgresql.blocking.wait_durationintWhole seconds this session has been waiting for a lock, measured from pg_locks.waitstart. 0 when not blocked.
postgresql.callsintNumber of times the statement was executed, reported in delta value.
postgresql.client_hostnamestringHost name of the connected client, as reported by a reverse DNS lookup of client_addr.
postgresql.pidintProcess ID of this backend.
postgresql.query_idstringIdentifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed.
postgresql.query_planstringThe execution plan used by PostgreSQL for the query.
postgresql.query_startstringTime when the currently active query was started, or if state is not active, when the last query was started.
postgresql.queryidstringHash code to identify identical normalized queries.
postgresql.rolnamestringThe name of the PostgreSQL role that executed the query.
postgresql.rowsintTotal number of rows retrieved or affected by the statement, reported in delta value.
postgresql.shared_blks_dirtiedintTotal number of shared blocks dirtied by the statement, reported in delta value.
postgresql.shared_blks_hitintTotal number of shared block cache hits by the statement, reported in delta value.
postgresql.shared_blks_readintTotal number of shared blocks read by the statement, reported in delta value.
postgresql.shared_blks_writtenintTotal number of shared blocks written by the statement, reported in delta value.
postgresql.statestringCurrent overall state of this backend
postgresql.temp_blks_readintTotal number of temp blocks read by the statement, reported in delta value.
postgresql.temp_blks_writtenintTotal number of temp blocks written by the statement, reported in delta value.
postgresql.total_exec_timedoubleTotal time spent executing the statement, in delta milliseconds.
postgresql.total_plan_timedoubleTotal time spent planning the statement, in delta milliseconds.
postgresql.wait_eventstringWait event name if backend is currently waiting, otherwise NULL.
postgresql.wait_event_typestringThe type of event for which the backend is waiting, if any; otherwise NULL.
relationstringOID of the relation targeted by the lock, or null if the target is not a relation or part of a relation.
replication_clientstringThe IP address of the client connected to this backend. If this field is "unix", it indicates either that the client is connected via a Unix socket.
sourcestringThe block read source type.
statestringThe tuple (row) state.
user.namestringName of the user logged into this backend.
wal_operation_lagstringThe operation which is responsible for the lag.

Data

  • JSON: /data/collector/components/contrib-postgresqlreceiver/contrib-postgresqlreceiver-a6832fef00e9.json
  • Explore: /collector/components/contrib/postgresqlreceiver