Commit graph

5 commits

Author SHA1 Message Date
Wesley Aptekar-Cassels 61453d48e6 Add automatic instrumentation to Postgres queries
This enables automatic instrumentation of Postgres queries when
OpenTelemetry instrumentation is enabled, which will help with debugging
performance problems.
2023-04-07 01:58:49 -04:00
Wesley Aptekar-Cassels 7efbdb1865 Add more detailed telemetry for get_audience
This is still slow in some cases, despite #2723, so this information
should give useful data about how it could be optimized more.

This also adds some abstraction around getting the tracer, just to
follow the advice in the OpenTelemetry documentation not to use __name__
directly to set the tracer name. The advice is ignored in most of their
examples, so it probably doesn't matter, but IDK, seems reasonable to
try to follow it.

Related: #2720
2023-03-20 20:51:20 -04:00
Wesley Aptekar-Cassels ef64fedbd9 Only enable OTLP exporter when configured
This wasn't a problem in the past, since we only enabled automatic
instrumentation when this was set up, but it does cause errors when
trying to add manual instrumentation.
2023-03-20 20:51:20 -04:00
Wesley Aptekar-Cassels 63ab3abe67 Add setting for OpenTelemetry console exporter
This is primarily useful for debugging changes to the OpenTelemetry
setup.
2023-03-18 15:47:30 -04:00
Mouse Reeve 7811a9920e Copy config from prod branch to main 2022-02-04 18:36:12 -08:00