Skip to content

Commit 7f999ac

Browse files
committed
Added readme
1 parent b179bea commit 7f999ac

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/open-telemetry/opentelemetry-php-contrib/releases)
2+
[![Issues](https://img.shields.io/badge/issues-pink)](https://github.com/open-telemetry/opentelemetry-php/issues)
3+
[![Source](https://img.shields.io/badge/source-contrib-green)](https://github.com/open-telemetry/opentelemetry-php-contrib/tree/main/src/Instrumentation/PostgreSql)
4+
[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php--contrib-blue)](https://github.com/open-telemetry/opentelemetry-php-contrib)
5+
[![Latest Version](http://poser.pugx.org/open-telemetry/opentelemetry-auto-postgresql/v/unstable)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-postgresql/)
6+
[![Stable](http://poser.pugx.org/open-telemetry/opentelemetry-auto-postgresql/v/stable)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-postgresql/)
7+
8+
> This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
9+
10+
# OpenTelemetry PostgreSQL auto-instrumentation
11+
12+
Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to
13+
install and configure the extension and SDK.
14+
15+
## Overview
16+
17+
This package provides auto-instrumentation for the PostgreSQL native PHP extension (`ext-pgsql`).
18+
Hooks are registered via Composer, and client spans are automatically created for key database operations.
19+
20+
Supported functions include:
21+
22+
### Connection
23+
- `pg_connect`
24+
- `pg_pconnect`
25+
26+
### Queries
27+
- `pg_query`
28+
- `pg_query_params`
29+
- `pg_send_query`
30+
- `pg_send_query_params`
31+
- `pg_get_result`
32+
33+
### Prepared Statements
34+
- `pg_prepare`
35+
- `pg_send_prepare`
36+
- `pg_execute`
37+
- `pg_send_execute`
38+
39+
### Table/Row Operations
40+
- `pg_insert`
41+
- `pg_select`
42+
- `pg_update`
43+
- `pg_delete`
44+
45+
### COPY
46+
- `pg_copy_from`
47+
- `pg_copy_to`
48+
49+
### Large Objects (LOB)
50+
- `pg_lo_create`
51+
- `pg_lo_open`
52+
- `pg_lo_write`
53+
- `pg_lo_read`
54+
- `pg_lo_read_all`
55+
- `pg_lo_unlink`
56+
- `pg_lo_import`
57+
- `pg_lo_export`
58+
59+
60+
## Configuration
61+
62+
### Disabling PostgreSQL instrumentation
63+
64+
The extension can be disabled via [runtime configuration](https://opentelemetry.io/docs/instrumentation/php/sdk/#configuration):
65+
66+
```shell
67+
OTEL_PHP_DISABLED_INSTRUMENTATIONS=postgresql
68+
```
69+
70+
## Compatibility
71+
72+
PHP 8.2 or newer is required

0 commit comments

Comments
 (0)