You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
140
138
141
139
```erlang
142
140
>pgo:start_pool(default, #{host=>"127.0.0.1",
143
141
database=>"test",
144
142
user=>"test",
145
143
pool_size=>5,
146
-
trace_default=>true}]).
144
+
trace=>true}]).
147
145
```
148
146
149
147
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:
158
156
#{command=>insert,num_rows=>1,rows=> []}
159
157
```
160
158
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
0 commit comments