Skip to content

Commit d8fef8d

Browse files
committed
chore: update readme instructions for getting telemetry data
1 parent 5863f5e commit d8fef8d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,14 @@ decode_option() :: return_rows_as_maps | {return_rows_as_maps, boolean()} |
134134

135135
## Telemetry and Tracing
136136

137-
A [Telemetry](https://github.com/beam-telemetry/telemetry) event `[pgo, query]` can be attached to for receiving the time a query takes as well as other metadata for each query.
138-
139-
[OpenCensus](https://opencensus.io/) spans can be enabled for queries and transactions by either setting the `trace_default` to `true` for the pool:
137+
[OpenTelemetry](https://opentelemetry.io/) spans can be enabled for queries and transactions by either setting the `trace` to `true` for the pool:
140138

141139
``` erlang
142140
> pgo:start_pool(default, #{host => "127.0.0.1",
143141
database => "test",
144142
user => "test",
145143
pool_size => 5,
146-
trace_default => true}]).
144+
trace => true}]).
147145
```
148146

149147
Or by passing `#{trace => true}` in the options for a query or transaction:
@@ -158,7 +156,11 @@ Or by passing `#{trace => true}` in the options for a query or transaction:
158156
#{command => insert,num_rows => 1,rows => []}
159157
```
160158

161-
Note that since this is optional the `opencensus` application is not included as a dependency of `pgo`. So it must be included as a `rebar3` dependency and runtime dependency (listed in your application's `.app.src` `applications` or the list of applications for `relx` to include in a release).
159+
Note that since this is optional the `opentelemetry` application is not included
160+
as a dependency of `pgo` -- only `opentelemetry_api` is included by default. So
161+
it must be included as a `rebar3` dependency and runtime dependency (listed in
162+
your application's `.app.src` `applications` or the list of applications for
163+
`relx` to include in a release).
162164

163165
## Running Tests
164166

0 commit comments

Comments
 (0)