Commit Graph

37 Commits

Author SHA1 Message Date
Artem Solomatin 5658c54eb9
Add bandit telemetry support for opentelemetry-phoenix (#249)
* Add bandit telemetry support for opentelemetry-phoenix

---------

Co-authored-by: Bryan Naegele <bryannaegele@users.noreply.github.com>
2024-02-18 15:36:01 -07:00
Bryan Naegele 102b61349c
Update all library deps (#286)
* Update all library deps

* Add postgrex for oban test env
2024-02-13 22:24:49 -07:00
renovate[bot] c5753b4f52
Update dependency opentelemetry_process_propagator to ~> 0.3 (#280)
* Update dependency opentelemetry_process_propagator to ~> 0.3

* Pin dataloader version

* Update opentelemetry to 1.3.1

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bryan Naegele <bryan@fourthtime.com>
2024-02-13 10:43:02 -07:00
Bryan Naegele 54c297f4ce
Update opentelemetry (#283) 2024-02-13 10:42:04 -07:00
Bryan Naegele 385ee4843a
Phoenix 1.2.0 release prep (#248) 2024-02-04 21:44:37 -07:00
Bryan Naegele bf6adb78e8
Hex publishing workflow (#250)
* Add Hex publishing manual workflow
2024-02-04 17:18:14 -07:00
renovate[bot] 45b66d5f50
chore(deps): update dependency ex_doc to v0.31.1 (#233)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-17 11:27:19 -07:00
Derek Kraan 5caf10ae82
Add tests to cover new liveview integration (#221) 2023-11-09 18:20:07 -07:00
Tom Taylor 17d31cc594
Improve test matrix and add support for Elixir 1.15 and OTP 26 (#188)
* Use test matrix from file

* Only check formatting on specific Elixir version

* Use latest patch version of each Elixir/OTP release in test matrix

* Test on Elixir 1.15 and OTP 26

* Run formatter on opentelemetry_httpoison

* Run formatter on opentelemetry_phoenix

* Run formatter on opentelemetry_tesla

* Fix building opentelemetry_ecto on Elixir 1.15

Upgraded deps to fix ssl_verify_fun not compiling

* Fix building opentelemetry_dataloader on Elixir 1.15

Upgraded deps to fix ssl_verify_fun and ecto_sql not compiling

* Upgrade opentelemetry_finch to build on Elixir 1.15

* Upgrade opentelemetry_httpoison deps to build on 1.15

* Upgrade opentelemetry_nebulex to build on Elixir 1.15

* Upgrade opentelemetry_oban to build on Elixir 1.15

* Upgrade opentelemetry_phoenix deps to build on 1.15

* Upgrade opentelemetry_redix deps to build on 1.15

* Fix warning about <> being ambiguous

* Fix assertion on attributes keys

These are always atoms, not strings.

* Upgrade ssl_verify_fun in opentelemetry_telemetry

* Deterministically sort keys before asserting in tests

* Upgrade opentelemetry_process_propogator to build on Elixir 1.15

* Run mix format on opentelemetry_process_propogator

* Assert keys are atoms, not strings

* Use matrix.os to define runs-on parameter

* Pin test matrix to specific OTP + Elixir versions

* Run formatter on telemetry and process_propagator

* Run formatter over opentelemetry_phoenix

---------

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-08-25 14:11:23 -06:00
Derek Kraan 79aae558fe
Add the ability to trace Liveviews to the Phoenix instrumentation (#198) 2023-08-23 05:35:31 -06:00
Derek Kraan 7119c4bd42
Record an exception as an error only when Plug.Exception.status/1 (#165)
returns 500..599.

It is encouraged in the Phoenix docs to use `Plug.Exception` with
custom exceptions to generate for example 404 responses at certain
places. These 404s should not be marked as error, since simple "route
not found" 404s are also not marked as error.

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-07-06 13:44:16 -06:00
Tristan Sloughter 4dfda22cef
bump opentelemetry_phoenix to 1.1.1 (#181) 2023-06-20 08:39:50 -06:00
Patrik Stenmark ddf0706bf1
Make exdocs settings a bit more similar between different packages (#168)
* Add source_url_pattern to be able to use the "link to source" button
* Add README.md as an "extra" where it wasn't already
* Add a `main` setting. They all have a very obvious main module. Set
  that as `main`, so a user is shown this immediately instead of a list
  of usually only this module.
2023-04-30 12:10:03 -06:00
Damir Vandic 7db602b9d7
Relax nimble_options (#161) 2023-03-21 06:45:01 -06:00
Bryan Naegele 8897400d4e
Phoenix 1.1.0 (#145)
* Phoenix 1.1.0

* Fix docs

* Publish tesla with updated sem conventions
2023-01-13 14:38:05 -07:00
Bryan Naegele e6c8cc6289
Phoenix Plug.Cowboy adapter support (#144)
* wip

* Cowboy adapter support

* Use path deps to keep things updated

* fix doc

* Fix example project
2023-01-06 13:46:06 -07:00
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
Bryan Naegele 4d39f47b03
update elixir package deps (#126)
* update elixir package deps

* Oban test updates
2022-11-15 17:48:50 -07:00
Bryan Naegele 6591b28166
Publish updates for Phoenix, Ecto, and Cowboy (#79)
* Publish 1.0 for Phoenix, Ecto, and Cowboy

* Missed version in changelog
2022-06-03 10:54:37 -06:00
Greg Mefford 0939fe2de8
Relax requirement on telemetry library (#77) 2022-04-13 09:57:45 -06: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 9446fe6a99
Otel 1.0 support (#57) 2022-01-04 18:58:06 -07:00
Aaron Renner 50775c881e
Make plug dependency explicit (#53) 2022-01-04 13:47:21 -07: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
matthijsqd 9446655797
set phoenix attributes on span creation (#52) 2021-12-17 09:16:26 -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
Seth Archer Brown f083f3d7e7
Remove outdate setup example (#30)
Co-authored-by: Bryan Naegele <bryannaegele@users.noreply.github.com>
2021-10-15 14:11:28 -06:00
Bryan Naegele 27727e40cd
Publish packages (#28) 2021-10-15 14:01:11 -06:00
Bryan Naegele 2f2b31c1ce
Otel 1.0.0-rc.3 support (#27) 2021-10-13 21:11:26 -06:00
Bryan Naegele aece932faf
Lock Otel versions and publish updates (#22) 2021-10-08 16:27:42 -06:00
Manu 18aa2eca97
Update github URL for Hex.pm (#21) 2021-10-06 12:36:16 -06:00
Marco "Efesto" Polita 3334b07b9d
Adds readme entry on Plug.Telemetry (#20)
* adds entry about Plug.Telemetry

* Adds reference to phoenix endpoint template
2021-10-01 10:30:49 -06:00
Bryan Naegele 401d05041f
opentelemetry-phoenix 1.0.0-rc3 (#15) 2021-09-19 18:17:51 -06: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