Commit Graph

8 Commits

Author SHA1 Message Date
Yordis Prieto d1ec189362
chore: add semantic conventions to phoenix (#121)
* fix: redix missing dep

* chore: add sc dep

* chore: use semantic conventions in phoenix
2022-12-12 13:51:54 -07:00
Andrew Rosa 3faa246d02
Remove exporter race-condition on tests (#44)
Default exporter immediately attempts on start connect to
`:otel-collector` default port. As we don't have any collector running
on our test environment, this results in a few warnings. That's not an
issue in itself, as code immediately switches to another export, but
creates a lot of noise.

This patch moves the exporter setup to `config/test.exs`, essentially
removing the need to restart opentelemetry applicationn for each test
case. The only work setup blocks do is update the exporter's target pid.

The processor was changed to simple mode, available now, which also remove
another vector of (unlikely but theoretically possible) race-conditions.
2022-03-24 11:48:59 -06:00
Derek Kraan ddb2d3b963
Only attempt to record an exception if there is an active span. (#37)
There is an edge case, if you use `forward/4` and use Plug.ErrorHandler,
then when an exception reaches the outer router, then Plug.send_resp
will be called, triggering `[:phoenix, :endpoint, :stop]`, and the span
will be gone by the time the outer router gets the exception. This
causes this telemetry handler to crash and be detached.

Sequence of events:
- [:phoenix, :endpoint, :start]
- [:phoenix, :router_dispatch, :exception] (inner router)
- [:phoenix, :endpoint, :stop]
- [:phoenix, :router_dispatch, :exception] (outer router) ** here there is no span, crashes
2022-03-18 05:21:26 -06:00
Bryan Naegele 1d52d88e42
Otel 1.0.0-rc.4 updates (#54)
* Otel 1.0.0-rc.4 updates

* Unused module attribute

* Missed oban test
2021-12-28 16:39:06 -07:00
Ho-Yon Mak 3f43f8dd9f
opentelemetry_phoenix http.status -> http_status_code (#42) 2021-11-19 07:15:43 -07:00
Timmo Verlaan f21b315e3e
inspect terms that otherwise can't be serialized by exporter (#40) 2021-11-18 18:02:36 -07:00
Bryan Naegele 70825304a6
Update otel-phoenix deps (#9)
* Update otel-phoenix deps

* CI not triggering

* Remove deprecated plug conn property

* Retry shared matrix with 1.11 include fix

* Try reading the file again

* Still can't get file reading right

* Update source links
2021-09-19 17:51:51 -06:00
Bryan Naegele a216f6ce20
Otel phoenix migration (#4)
* Otel phoenix migration

* Abandon dynamic matrix for now

* Add project-level codeowners

* Add examples and phoenix

* Typo
2021-09-12 13:49:24 -06:00