Skip to content

Commit 21416f7

Browse files
authored
Update tracing README
1 parent 63a0da9 commit 21416f7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Psr/Tracing/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,19 @@ A PSR-22 compatible tracing layer for Relay.
44

55
- https://github.com/php-fig/fig-standards/blob/master/proposed/tracing.md
66
- https://github.com/php-fig/fig-standards/blob/master/proposed/tracing-meta.md
7+
8+
## Usage
9+
10+
```php
11+
// connect to server
12+
$relay = new Relay(host: '127.0.0.1', port: 6379);
13+
14+
// use global trace provider
15+
$client = RelayOpenTelemetry($client);
16+
17+
// use custom trace provider
18+
$client = RelayOpenTelemetry($client, $tracerProvider);
19+
20+
// use as regular
21+
$users = $relay->get('users:count');
22+
```

0 commit comments

Comments
 (0)