Skip to content

Commit 2e7ac4b

Browse files
jteschercijothomas
andauthored
feat: Move actix-web-opentelemetry to contrib (#202)
Co-authored-by: Cijo Thomas <cijo.thomas@gmail.com>
1 parent daa3b5e commit 2e7ac4b

File tree

14 files changed

+2049
-0
lines changed

14 files changed

+2049
-0
lines changed

actix-web-opentelemetry/CHANGELOG.md

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
# Changelog
2+
3+
## [v0.21.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.21.0..v0.20.1)
4+
5+
### changed
6+
7+
* update opentelemetry packages to 0.28 (#190)
8+
9+
## [v0.20.1](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.20.0..v0.20.1)
10+
11+
### Added
12+
13+
* add `RequestMetricsBuilder::with_metric_attrs_from_req` (#179)
14+
15+
## [v0.20.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.19.0..v0.20.0)
16+
17+
### Changed
18+
19+
* Update opentelemetry packages to 0.27 (#180)
20+
21+
## [v0.19.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.18.0..v0.19.0)
22+
23+
### Changed
24+
25+
* Update opentelemetry packages to 0.24 (#172)
26+
27+
## [v0.18.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.17.0..v0.18.0)
28+
29+
### Changed
30+
31+
* Update to otel v0.23 (#157)
32+
33+
## [v0.17.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.16.0..v0.17.0)
34+
35+
### Changed
36+
37+
* Update to otel v0.22 (#147)
38+
39+
### Fixed
40+
41+
* Fix typo for http_server_response_size metric (#139)
42+
* Fix http_server_response_size metric (#140)
43+
44+
## [v0.16.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.15.0..v0.16.0)
45+
46+
### Changed
47+
48+
* Update to otel v0.21 (#135)
49+
* Remove active request units until bug is resolved (#136)
50+
51+
## [v0.15.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.14.0..v0.15.0)
52+
53+
### Changed
54+
55+
* Update to otel v0.20 (#131)
56+
* Update to semantic conventions spec v1.21 (#131)
57+
58+
See the [semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/README.md)
59+
documentation for details about instrument and span updates.
60+
61+
## [v0.14.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.13.0..v0.14.0)
62+
63+
### Changed
64+
65+
* Update to otel v0.19 (#126)
66+
67+
## [v0.13.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.13.0-alpha.1..v0.13.0)
68+
69+
### Changed
70+
71+
* Update to otel v0.18 (#115)
72+
73+
## [v0.13.0-alpha.1](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.12.0..v0.13.0-alpha.1)
74+
75+
### Added
76+
77+
* Export RequestTracingMiddleware (#106)
78+
* Allow customisation of client span names (#111)
79+
80+
### Changed
81+
82+
* Update semantic conventions for client and server traces (#113)
83+
* Reduce default span namer cardinality (#112)
84+
* Remove http.client_ip from metrics (#110)
85+
* Use proper metric semantic conventions (#109)
86+
* Use Otel semantic conventions for metrics (#105)
87+
* Simplify PrometheusMetricsHandler (#104)
88+
* Refactor to make Prometheus optional (#103)
89+
90+
## [v0.12.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.11.0-beta.8..v0.12.0)
91+
92+
### Changed
93+
94+
* Update to 2021 edition (#99)
95+
* Update to actix-web v4 (#97)
96+
97+
## [v0.11.0-beta.8](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.11.0-beta.7..v0.11.0-beta.8)
98+
99+
### Changed
100+
101+
- Update to opentelemetry v0.17.x (#94)
102+
- Fix metric names to be aligned with prometheus standards (#95)
103+
104+
## [v0.11.0-beta.7](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.11.0-beta.6..v0.11.0-beta.7)
105+
106+
### Added
107+
108+
- Add `with_attributes` method to client extension (#91)
109+
110+
### Changed
111+
112+
- Add http status code handling for client (#88)
113+
- Update to actix-http beta.17, actix-web beta.16, awc beta.15 (#89)
114+
- Make `awc` client tracing an optional feature (#92)
115+
116+
## [v0.11.0-beta.6](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.11.0-beta.5..v0.11.0-beta.6)
117+
118+
### Changed
119+
120+
- Update actix-web and actix-http requirements to beta.13 (#84)
121+
122+
## [v0.11.0-beta.5](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.11.0-beta.4..v0.11.0-beta.5)
123+
124+
### Changed
125+
126+
- Update to opentelemetry v0.16.x #77
127+
128+
## [v0.11.0-beta.4](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.11.0-beta.3..v0.11.0-beta.4)
129+
130+
### Changed
131+
132+
- Update to opentelemetry v0.15.x and actix-web 4.0.0-beta.8 #76
133+
134+
## [v0.11.0-beta.3](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.11.0-beta.2..v0.11.0-beta.3)
135+
136+
### Changed
137+
138+
- Update to opentelemetry v0.13.x #64
139+
140+
## [v0.11.0-beta.2](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.11.0-beta.1..v0.11.0-beta.2)
141+
142+
### Changed
143+
144+
- Update to actix-web `4.0.0-beta.4` and awc `3.0.0-beta.3` (#57)
145+
146+
## [v0.11.0-beta.1](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.10.0...v0.11.0-beta.1)
147+
148+
### Changed
149+
150+
- Update to tokio `1.0` and actix-web `4.0.0-beta.3` (#51)
151+
152+
## [v0.10.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.9.0...v0.10.0)
153+
154+
### Changed
155+
156+
Note: optentelemetry `v0.12.x` uses tokio 1.0. See the
157+
[updated examples](https://github.com/OutThereLabs/actix-web-opentelemetry/blob/e29c77312d6a906571286f78cc26ca72cf3a0b6f/examples/server.rs#L17-L40)
158+
for compatible setup until actix-web supports tokio 1.0.
159+
160+
- Update to OpenTelemetry v0.12.x #48
161+
162+
## [v0.9.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.8.0...v0.9.0)
163+
164+
### Changed
165+
166+
- Update to OpenTelemetry v0.11.x #41
167+
168+
## [v0.8.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.7.0...v0.8.0)
169+
170+
Be sure to set a trace propagator via [`global::set_text_map_propagator`](https://docs.rs/opentelemetry/0.10.0/opentelemetry/global/fn.set_text_map_propagator.html)
171+
as the default is now a no-op.
172+
173+
### Changed
174+
175+
- Update to OpenTelemetry v0.10.x #38
176+
177+
## [v0.7.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.6.0...v0.7.0)
178+
179+
### Changed
180+
181+
- Remove default features from actix-web #30
182+
- Update to OpenTelemetry v0.9.x #30
183+
- Move metrics behind a feature flag #30
184+
- Change default route name from unmatched to default #30
185+
186+
### Removed
187+
188+
- Remove deprecated `with_tracing` function. #30
189+
190+
## [v0.6.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.5.0...v0.6.0)
191+
192+
### Changed
193+
194+
- Upgrade `actix-web` to version 3 #24
195+
- `RequestMetrics` constructor longer accept a route_formatter. Can be added via `with_route_formatter` #24
196+
197+
### Removed
198+
199+
- Remove obsolute `UuidWildcardFormatter` as actix 3 supports match patterns #24
200+
201+
### Fixed
202+
203+
- Client will now properly inject context using the globally configured
204+
propagator.
205+
206+
## [v0.5.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.4.0...v0.5.0)
207+
208+
### Added
209+
210+
- Trace actix client requests with `ClientExt::trace_request` or
211+
`ClientExt::trace_request_with_context`. #17
212+
213+
### Changed
214+
215+
- Update to OpenTelemetry v0.8.0 #18
216+
- Deprecated `with_tracing` fn. Use `ClientExt` instead. #17
217+
218+
## [v0.4.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.3.0...v0.4.0)
219+
220+
### Changed
221+
222+
- Update to OpenTelemetry v0.7.0 #11
223+
224+
## [v0.3.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.2.0...v0.3.0)
225+
226+
### Changed
227+
228+
- Update to OpenTelemetry v0.6.0 #10
229+
230+
## [v0.2.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.1.2...v0.2.0)
231+
232+
### Changed
233+
234+
- Update to OpenTelemetry v0.2.0 #6
235+
236+
## [v0.1.2](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.1.1...v0.1.2)
237+
238+
### Changed
239+
240+
- Make client span name match otel spec #3
241+
242+
## [v0.1.1](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.1.0...v0.1.1)
243+
244+
### Added
245+
246+
- Add option for route formatter #1
247+
- Add metrics middleware #2
248+
249+
## [v0.1.0](https://github.com/OutThereLabs/actix-web-opentelemetry/tree/v0.1.0)
250+
251+
Initial debug alpha

actix-web-opentelemetry/Cargo.toml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
[package]
2+
name = "actix-web-opentelemetry"
3+
version = "0.21.0"
4+
description = "OpenTelemetry integration for Actix Web apps"
5+
homepage = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/actix-web-opentelemetry"
6+
repository = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/actix-web-opentelemetry"
7+
readme = "README.md"
8+
categories = ["api-bindings"]
9+
keywords = ["actix", "actix-web", "opentelemetry", "jaeger", "prometheus"]
10+
license = "Apache-2.0"
11+
edition = "2021"
12+
rust-version = "1.75.0"
13+
14+
[features]
15+
metrics = ["opentelemetry/metrics"]
16+
metrics-prometheus = [
17+
"metrics",
18+
"opentelemetry-prometheus",
19+
"prometheus",
20+
"dep:opentelemetry_sdk",
21+
"dep:tracing",
22+
]
23+
sync-middleware = []
24+
25+
[dependencies]
26+
actix-http = { version = "3.0", default-features = false, features = [
27+
"compress-zstd",
28+
] }
29+
actix-web = { version = "4.0", default-features = false, features = [
30+
"compress-zstd",
31+
] }
32+
awc = { version = "3.0", optional = true, default-features = false, features = [
33+
"compress-zstd",
34+
] }
35+
futures-util = { version = "0.3", default-features = false, features = [
36+
"alloc",
37+
] }
38+
opentelemetry = { version = "0.28", default-features = false, features = [
39+
"trace",
40+
] }
41+
opentelemetry-prometheus = { version = "0.28", optional = true }
42+
opentelemetry-semantic-conventions = { version = "0.28", features = [
43+
"semconv_experimental",
44+
] }
45+
opentelemetry_sdk = { version = "0.28", optional = true, features = [
46+
"metrics",
47+
"rt-tokio-current-thread",
48+
] }
49+
prometheus = { version = "0.13", default-features = false, optional = true }
50+
serde = "1.0"
51+
tracing = { version = "0.1.41", optional = true }
52+
53+
[dev-dependencies]
54+
actix-web = { version = "4.0", features = ["macros"] }
55+
actix-web-opentelemetry = { path = ".", features = [
56+
"metrics-prometheus",
57+
"sync-middleware",
58+
"awc",
59+
] }
60+
opentelemetry_sdk = { version = "0.28", features = [
61+
"spec_unstable_metrics_views",
62+
"metrics",
63+
"rt-tokio-current-thread",
64+
] }
65+
opentelemetry-otlp = { version = "0.28", features = ["grpc-tonic"] }
66+
opentelemetry-stdout = { version = "0.28", features = ["trace", "metrics"] }
67+
68+
[package.metadata.docs.rs]
69+
all-features = true
70+
rustdoc-args = ["--cfg", "docsrs"]

0 commit comments

Comments
 (0)