Skip to content

Commit 98d7010

Browse files
authored
Phoenix Otel semconv 1.27 updates (#374)
* Otel semconv 1.26 updates * Test HTTP1 and HTTP2 * Format * bump semconv * otel http tmp * phx format * Only run integration on OTP 27+ * try this * Try disabling retries on most * fmt * Try to sleep * revert * detach handlers in test * update deps * Update deps * Update deps and bandit config * Update deps * Mark release as an rc * Unused alias * Update changelog * formatting
1 parent 2a3f0ff commit 98d7010

File tree

11 files changed

+822
-1647
lines changed

11 files changed

+822
-1647
lines changed

instrumentation/opentelemetry_bandit/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ erl_crash.dump
2626
/tmp/
2727
.DS_Store
2828

29-
/priv/plts/*
29+
/priv/plts/*
Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,92 @@
11
# Changelog
22

3+
## 2.0.0-rc.1
4+
5+
### Features
6+
7+
- Added Bandit instrumentation support
8+
- Semantic Conventions v1.27 support
9+
10+
### Breaking Changes
11+
12+
- Specifying an adapter is now required. Simply add the instrumentation
13+
library as a dep and follow its setup instructions, then specify your
14+
your adapter.
15+
- Various HTTP Semantic Convention changes are included in the cowboy
16+
and bandit libraries. One major change regards span naming. This may
17+
affect your observability tools when keying on span names. The key
18+
change there is the HTTP method is now a prefix, e.g. "GET /users/:user_id"
19+
20+
# Changes
21+
22+
- OpenTelemetry API v1.4 required
23+
324
## 1.2.0
425

526
### Features
627

7-
* Add support for LiveView courtesy of @derekkraan
28+
- Add support for LiveView courtesy of @derekkraan
829

930
### Fixes
1031

11-
* Do not set a span as errored for exceptions, only based on 5xx HTTP status
32+
- Do not set a span as errored for exceptions, only based on 5xx HTTP status
1233

1334
### Changed
1435

15-
* Minimum supported Elixir version changed to 1.11.
36+
- Minimum supported Elixir version changed to 1.11.
1637

1738
## 1.1.1
1839

1940
### Fixes
2041

21-
* [Relax nimble_options
42+
- [Relax nimble_options
2243
requirement](https://github.com/open-telemetry/opentelemetry-erlang-contrib/pull/161)
2344

2445
## 1.1.0
2546

2647
### Features
2748

28-
* Add support for opentelemetry_cowboy to capture the full request lifecycle
49+
- Add support for opentelemetry_cowboy to capture the full request lifecycle
2950
when using the Plug.Cowboy adapter
3051

3152
## 1.0.0
3253

3354
### Fixes
3455

35-
* Prevent attempting to record an exception when no active span present
36-
* Only mark 5xx level status codes as errored
56+
- Prevent attempting to record an exception when no active span present
57+
- Only mark 5xx level status codes as errored
3758

3859
## 1.0.0-rc.7
3960

4061
### Changed
4162

42-
* Opentelemetry 1.0 support
63+
- Opentelemetry 1.0 support
4364

4465
## 1.0.0-rc.6
4566

4667
### Changed
4768

48-
* Opentelemetry 1.0.0-rc.4 support
69+
- Opentelemetry 1.0.0-rc.4 support
4970

5071
### Fixes
5172

52-
* pass attributes on span start for better sampling options
53-
* fix http status attribute to match spec
73+
- pass attributes on span start for better sampling options
74+
- fix http status attribute to match spec
5475

5576
## 1.0.0-rc.4
5677

5778
### Changed
5879

59-
* Opentelemetry dependency is locked to rc2 or lower in prep for breaking changes in rc3
80+
- Opentelemetry dependency is locked to rc2 or lower in prep for breaking changes in rc3
6081

6182
## 1.0.0-rc.3
6283

6384
### Changed
6485

65-
* Update dependencies to allow telemetry 1.0.0
86+
- Update dependencies to allow telemetry 1.0.0
6687

6788
## 0.2.0
6889

6990
### Changed
7091

71-
* Upgraded to Opentelemetry v0.5.0
72-
92+
- Upgraded to Opentelemetry v0.5.0

instrumentation/opentelemetry_phoenix/README.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ After installing, setup the handler in your application behaviour before your
1010
top-level supervisor starts.
1111

1212
```elixir
13-
OpentelemetryPhoenix.setup()
13+
OpentelemetryPhoenix.setup(adapter: :bandit)
1414
```
1515

1616
See the documentation for `OpentelemetryPhoenix.setup/1` for additional options that
@@ -22,30 +22,18 @@ may be supplied.
2222
```elixir
2323
def deps do
2424
[
25-
{:opentelemetry_phoenix, "~> 1.2"}
25+
{:opentelemetry_phoenix, "~> 2.0.0-beta.1"}
2626
]
2727
end
2828
```
2929

30-
It is high recommended to also install [OpentelemetryCowboy](https://hex.pm/packages/opentelemetry_cowboy) to capture the full
30+
31+
[OpentelemetryBandit](https://hex.pm/packages/opentelemetry_bandit) or [OpentelemetryCowboy](https://hex.pm/packages/opentelemetry_cowboy) must be installed to capture the full
3132
request lifecycle. Phoenix only handles part of the request lifecycle which can lead
3233
to incomplete request durations and lost traces for requests terminated at the socket
3334
level or before reaching Phoenix.
3435

35-
## Compatibility Matrix
36-
37-
| OpentelemetryPhoenix Version | Otel Version | Notes |
38-
| :--------------------------- | :----------- | :---- |
39-
| | | |
40-
| v0.1.0 | <= v.0.5.0 | |
41-
| v1.0.0-rc.3 | v1.0.0-rc.1 | |
42-
| | v1.0.0-rc.2 | |
43-
| v1.0.0-rc.4 | v1.0.0-rc.2 | Otel rc.3 will be a breaking change |
44-
| v1.0.0-rc.5 | v1.0.0-rc.3 | |
45-
| v1.0.0-rc.6 | v1.0.0-rc.4 | |
46-
| v1.0 | v1.0 | |
47-
48-
## Note on phoenix integration
36+
## Note on Phoenix integration
4937

5038
`OpentelemetryPhoenix` requires phoenix to use `Plug.Telemetry` in order to correctly trace endpoint calls.
5139

0 commit comments

Comments
 (0)