Commit Graph

146 Commits

Author SHA1 Message Date
renovate[bot] f3c25630a6
chore(deps): update actions/cache action to v3 (#236)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-09 21:33:23 -07:00
renovate[bot] f87d07990f
chore(deps): update dependency finch to ~> 0.16 (#234)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-09 21:30:02 -07:00
Bryan Naegele 9fd5f14e2a
Update elixir-test-matrix.json (#228)
* Update elixir-test-matrix.json

* Update erlang-test-matrix.json
2023-11-09 19:56:35 -07:00
renovate[bot] c4f07a24a9
Configure Renovate (#223)
* Add renovate.json

* Update renovate.json

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bryan Naegele <bryannaegele@users.noreply.github.com>
2023-11-09 19:02:23 -07:00
Bryan Naegele 7d50d86b95
Revert "chore: run propagator dialyzer on CI (#202)" (#224)
This reverts commit 97d13c39b7.
2023-11-09 18:28:51 -07:00
Derek Kraan 5caf10ae82
Add tests to cover new liveview integration (#221) 2023-11-09 18:20:07 -07:00
rlopzc 66326e7f42
Update Oban's README.md (#222)
The published version is 1.0.0

https://hex.pm/packages/opentelemetry_oban
2023-11-09 16:53:32 -07:00
João Thallis 97d13c39b7
chore: run propagator dialyzer on CI (#202)
* chore: run propagator dialyzer on CI

* Format using Elixir 1.15.6

* Support only Elixir ~> 1.12

It is necessary because :dialyxir requires Elixir ">= 1.12.0"

---------

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-11-09 02:26:29 -07:00
Bryan Naegele 5be23037ce
Update Req deps (#216) 2023-11-04 12:34:53 -06:00
Bryan Naegele 5b5f80ee41
Create repository-settings.md 2023-11-04 11:54:08 -06:00
Marc Delagrammatikas c7edb8a48c
Dice game example (#173)
* generate a phoenix API only project

* adds /api/rolldice endpoint and opentelemetry configuration

* change span attribute name to match implementations in other langs

---------

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-10-27 13:23:07 -06:00
Bernardo Amorim e62612fca1
Fix documentation example for OpentelemetryProcessPropagator (#220)
The example calling `OpentelemetryProcessPropagator.fetch_parent_ctx` was passing the key to the `/1` arity function, which is not the argument it expects. To specify the key you also need to specify the depth first, using the `/2` arity function: `OpentelemetryProcessPropagator.fetch_parent_ctx(depth, key)`
2023-10-24 19:32:44 -06:00
Dave Lucia 652d06bfce
Fix tiny typos (#219) 2023-10-17 20:42:12 -06:00
Bryan Naegele 91928b3486
Forgot the paths don't support globs (#215) 2023-10-16 15:12:41 -06:00
Wojtek Mach e1f4a02d5e
opentelemetry_req: Don't assume `request.headers` shape (#193)
* opentelemetry_req: Don't assume `request.headers` shape

* Update instrumentation/opentelemetry_req/test/opentelemetry_req_test.exs

---------

Co-authored-by: Bryan Naegele <bryannaegele@users.noreply.github.com>
2023-10-16 14:40:01 -06:00
Bryan Naegele 24e823cd23
Revert span name change to pre-1.18 spec (#214) 2023-10-16 14:16:40 -06:00
Bryan Naegele 318c68d63d
Tesla 2.3.0 (#213) 2023-10-16 13:30:40 -06:00
Artem Solomatin 4250e0b99f
Fixup doc version and typo (#211) 2023-10-03 07:39:45 -06:00
Tristan Sloughter bcf5f600d5
add roll dice example in Erlang with Elli (#177)
* add roll dice example in Erlang with Elli

* cleanup index page template formatting

* fix index/1 type spec

* remove index.js which gets compiled by npm

* roll dice: use 127.0.0.1 for node name to work for everyone
2023-10-02 08:00:45 -06:00
Rich Morin 5c2c6906ca
Update README.md (#209)
fix typo
2023-09-28 12:57:30 -06:00
Tom Taylor 8068002c17
Include `db.system` attribute in `opentelemetry_ecto` (#187)
* Run mix format

* Upgrade dependencies to build on OTP 26

* Add db.system attribute

* Add support for mssql and fallback to other_sql

* Fallback to not including db_system if adapter is unrecognised

---------

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-09-23 05:56:42 -06:00
Bryan Naegele 98d0bab4a9
Remove telemetry registry, fix broken log, update tests (#207)
* Remove telemetry registry, fix broken log, update tests

* Fix rebar and otp versions

* Specific rebar3

* Roll back dialyxir
2023-09-16 09:51:50 -06:00
Bryan Naegele 02202fb780
Add strict version type for setup-beam (#206) 2023-09-16 09:17:35 -06:00
Bryan Naegele 596fcbc2cb
Handle empty stack (#205)
* Update otel_telemetry.erl

* Add debug log (#204)
2023-09-12 19:28:53 -06:00
Bryan Naegele 6a143eeccf
Update release-drafter.yml (#203) 2023-09-06 03:59:09 -06:00
Bryan Naegele 018efed93a
Release drafting (#200) 2023-09-05 09:38:49 -06: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
Bryan Naegele 0b6ccafab5
Relax Req's elixir version (#196)
Failing on the test matrix update PR.
2023-08-22 10:13:32 -06:00
Wojtek Mach 5380a94bc9
opentelemetry_req: Don't assume `request.options` is a map (#192) 2023-08-18 16:29:00 -06:00
Alberto Sartori e2faad163c
Add codeowner for utilities/opentelemetry_instrumentation_http (#191)
* Add codeowner for utilities/opentelemetry_instrumentation_http

* Update CODEOWNERS

---------

Co-authored-by: Bryan Naegele <bryannaegele@users.noreply.github.com>
2023-08-18 15:32:03 -06:00
Alberto Sartori 26c68a0f88
Opentelemetry instrumentation http (#186)
* Add opentelemetry_instrumentation_http utility library

* Update utilities/opentelemetry_instrumentation_http/src/opentelemetry_instrumentation_http.erl

Co-authored-by: Tristan Sloughter <t@crashfast.com>

* Fix dialyzer

* Update changelog

---------

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-07-16 14:04:13 -06:00
Tom Taylor cd2a6cca91
Redis: propagate the span context if available (#180)
Behave in a similar way to Ecto, which is to attach the context of the
connection, falling back to the calling process context if available.

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-07-13 17:15:26 -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
Josh Lee b85420afed
Don't record DB statements without sanitizaiton (#166)
* Don't record DB statements without sanitizaiton

This adds an option to OpentelemetryEcto.setup/1 that allows a query
sanitization function to be provided. If it is not provided, queries
are not captured (this is the default).

* test that db.statement isnt present unless query sanitizer is configured

* rename option to `:db_statement`

* run mix format
2023-06-13 05:13:01 -06:00
Cristiano Piemontese 12532e5ff5
Post-PR opentelemetry_httpoison fixup (#178)
* Update opentelemetry_httpoison CODEOWNERS

Add Shared Services team as a CODEOWNER for opentelemetry_httpoison

* add CHANGELOG & fix license
2023-06-05 19:26:31 -06:00
Cristiano Piemontese 0cc8c760d0
Add telepoison (#148)
* add telepoison

* rename

* rename file too, duh

* rename test file

* port updates

* add standard workflow
2023-06-04 08:23:03 -06:00
Guilherme de Maio 901b571b07
[opentelemetry_tesla] Conditionally override propagator (#176)
* Optionally disable trace propagation for Tesla

While we always want spans being produced, trace progation is not
desirable in all cases - namely, when calling external parties, as that
may leak sensitive information, like one present on Baggage.

This patch introduces a new option `:propagate`, that defaults to
`true`.

Some tweaks are made to existing propagation test, fixing how options
are used. The approach here is closer to what we see in some middleware
tests of Tesla itself.

* change to propagator override

* change propagator to it uses global default

* mix format

* improve docs

---------

Co-authored-by: Andrew Rosa <dev@andrewhr.io>
2023-05-29 04:53:21 -06:00
Cedric Ziel 6a5fc4c884
Bump version to 1.1.1 (#175) 2023-05-23 05:04:01 -06:00
Cedric Ziel 8292870b66
Add db.name to ecto spans (#172)
* Add db.name to ecto spans

As per the spec, the db.name attribute is required on database spans. This changes adds it.

Ref: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md#call-level-attributes

* Add db.name attribute to tests

* Changelog update

* Update instrumentation/opentelemetry_ecto/test/opentelemetry_ecto_test.exs

* Update instrumentation/opentelemetry_ecto/test/opentelemetry_ecto_test.exs
2023-05-23 04:49:29 -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
Andrey Chernykh 1230271580
[Tesla middleware] `non_error_statuses` option (#154)
* [Tesla middleware] `non_error_statuses` option

* :mark_status_ok option instead of :non_error_statuses

---------

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-04-21 10:07:21 -06:00
Romario López 19a44fbd68
Improve Req with OTel http spec (#163)
* Improve span_name

Use span_name if provided. Fallback to url.path if there is no
path_params.

* Add unreleased changelog

* Update examples and module description

* Change span_name and http.url to follow OTEL spec

* Remove unused function

* Improve changelog

* Fix reading span_name from request.options

* Don't use URI.path

* address changelog
2023-04-20 05:04:18 -06:00
Maarten van Vliet 1de26cce1a
Add Dataloader instrumentation library (#137)
* Add Dataloader instrumentation library

* Move call to set context to @run_start event

---------

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-04-05 10:34:49 -06:00
Bryan Naegele de17c31194
OpentelemetryReq plugin (#160)
* OpentelemetryReq plugin

* Split span handling

* version bump

* Remove set

* Unused var

* Set parent ctx back on completion
2023-03-31 09:51:27 -06:00
Ty Bekiares a59f399155
[grpcbox] bump version (#156)
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2023-03-31 05:35:27 -06:00
Damir Vandic 7db602b9d7
Relax nimble_options (#161) 2023-03-21 06:45:01 -06:00
Bryan Naegele 760ba56809
propagator v0.2.2 (#158)
* propagator v0.2.2

* update changelog

* Publish cowboy
2023-03-17 10:36:26 -06:00
Antonio 3f26975ae9
Allow start_link/1 to be delegated (#157) 2023-03-13 10:14:37 -06:00