Skip to content

Commit 6395c15

Browse files
authored
refactor: rename to actix-web-opentelemetry to opentelemetry-instrumentation-actix-web (#240)
1 parent c76b69f commit 6395c15

File tree

17 files changed

+42
-29
lines changed

17 files changed

+42
-29
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[workspace]
22
members = [
3-
"actix-web-opentelemetry",
43
"opentelemetry-aws",
54
"opentelemetry-contrib",
65
"opentelemetry-datadog",
76
"opentelemetry-etw-logs",
87
"opentelemetry-etw-metrics",
8+
"opentelemetry-instrumentation-actix-web",
99
"opentelemetry-resource-detectors",
1010
"opentelemetry-stackdriver",
1111
"opentelemetry-user-events-logs",

deny.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[graph]
22
exclude=[
3-
"protobuf" # actix-web-opentelemetry depends on prometheus should try to remove it
3+
"protobuf" # opentelemetry-instrumentation-actix-web depends on prometheus should try to remove it
44
]
55

66
[licenses]

actix-web-opentelemetry/CHANGELOG.md renamed to opentelemetry-instrumentation-actix-web/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## vNext
4+
5+
### Changed
6+
7+
* **Breaking** Rename crate to `opentelemetry-instrumentation-actix-web`
8+
39
## [v0.22.0](https://github.com/OutThereLabs/actix-web-opentelemetry/compare/v0.22.0..v0.21.0)
410

511
### Changed

actix-web-opentelemetry/Cargo.toml renamed to opentelemetry-instrumentation-actix-web/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2-
name = "actix-web-opentelemetry"
2+
name = "opentelemetry-instrumentation-actix-web"
33
version = "0.22.0"
4-
description = "Deprecated: 0.22.0 is the last release for this crate. Use opentelemetry-instrumentation-actix-web instead"
4+
description = "OpenTelemetry instrumentation for Actix Web apps"
55
homepage = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/actix-web-opentelemetry"
66
repository = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/actix-web-opentelemetry"
77
readme = "README.md"
88
categories = ["api-bindings"]
9-
keywords = ["actix", "actix-web", "opentelemetry", "jaeger", "prometheus"]
9+
keywords = ["actix", "actix-web", "opentelemetry", "prometheus"]
1010
license = "Apache-2.0"
1111
edition = "2021"
1212
rust-version = "1.75.0"
@@ -50,7 +50,7 @@ tracing = { version = "0.1.41", optional = true }
5050

5151
[dev-dependencies]
5252
actix-web = { version = "4.0", features = ["macros"] }
53-
actix-web-opentelemetry = { path = ".", features = [
53+
opentelemetry-instrumentation-actix-web = { path = ".", features = [
5454
"metrics-prometheus",
5555
"sync-middleware",
5656
"awc",
File renamed without changes.

actix-web-opentelemetry/README.md renamed to opentelemetry-instrumentation-actix-web/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
# Actix Web OpenTelemetry
1+
# OpenTelemetry Actix Web Instrumentation
2+
3+
![OpenTelemetry — An observability framework for cloud-native software.][splash]
4+
5+
[splash]: https://raw.githubusercontent.com/open-telemetry/opentelemetry-rust/main/assets/logo-text.png
6+
7+
[OpenTelemetry](https://opentelemetry.io/) instrumentation for [Actix Web](https://actix.rs/).
28

39
[![Crates.io: actix-web-opentelemetry](https://img.shields.io/crates/v/actix-web-opentelemetry.svg)](https://crates.io/crates/actix-web-opentelemetry)
410
[![Documentation](https://docs.rs/actix-web-opentelemetry/badge.svg)](https://docs.rs/actix-web-opentelemetry)
511
[![LICENSE](https://img.shields.io/crates/l/actix-web-opentelemetry)](./LICENSE)
12+
[![GitHub Actions CI](https://github.com/open-telemetry/opentelemetry-rust-contrib/workflows/CI/badge.svg)](https://github.com/open-telemetry/opentelemetry-rust-contrib/actions?query=workflow%3ACI+branch%3Amain)
613
[![Slack](https://img.shields.io/badge/slack-@cncf/otel/rust-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C03GDP0H023)
714

8-
[OpenTelemetry](https://opentelemetry.io/) integration for [Actix Web](https://actix.rs/).
9-
1015
### Exporter configuration
1116

1217
[`actix-web`] uses [`tokio`] as the underlying executor, so exporters should be
@@ -20,7 +25,7 @@ opentelemetry-jaeger = { version = "..", features = ["rt-tokio-current-thread"]
2025
# if exporting to zipkin, use the `tokio` based `reqwest-client` feature.
2126
opentelemetry-zipkin = { version = "..", features = ["reqwest-client"], default-features = false }
2227

23-
# ... ensure the same same for any other exporters
28+
# ... ensure the same for any other exporters
2429
```
2530

2631
[`actix-web`]: https://crates.io/crates/actix-web
@@ -41,7 +46,7 @@ $ cargo run --example client --features awc
4146
$ firefox http://localhost:16686/
4247
```
4348

44-
![Jaeger UI](actix-web-opentelemetry/trace.png)
49+
![Jaeger UI](opentelemetry-instrumentation-actix-web/trace.png)
4550

4651
### Features
4752

actix-web-opentelemetry/examples/client.rs renamed to opentelemetry-instrumentation-actix-web/examples/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use actix_web_opentelemetry::ClientExt;
21
use opentelemetry::{global, KeyValue};
2+
use opentelemetry_instrumentation_actix_web::ClientExt;
33
use opentelemetry_sdk::propagation::TraceContextPropagator;
44
use opentelemetry_sdk::trace::SdkTracerProvider;
55
use opentelemetry_sdk::Resource;

actix-web-opentelemetry/examples/server.rs renamed to opentelemetry-instrumentation-actix-web/examples/server.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use actix_web::{web, App, HttpRequest, HttpServer};
2-
use actix_web_opentelemetry::{PrometheusMetricsHandler, RequestMetrics, RequestTracing};
32
use opentelemetry::{global, KeyValue};
3+
use opentelemetry_instrumentation_actix_web::{
4+
PrometheusMetricsHandler, RequestMetrics, RequestTracing,
5+
};
46
use opentelemetry_otlp::WithExportConfig;
57
use opentelemetry_sdk::{
68
metrics::{Aggregation, Instrument, SdkMeterProvider, Stream},

actix-web-opentelemetry/src/client.rs renamed to opentelemetry-instrumentation-actix-web/src/client.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ pub trait ClientExt {
7272
///
7373
/// Example:
7474
/// ```no_run
75-
/// use actix_web_opentelemetry::ClientExt;
7675
/// use awc::{Client, error::SendRequestError};
76+
/// use opentelemetry_instrumentation_actix_web::ClientExt;
7777
///
7878
/// async fn execute_request(client: &Client) -> Result<(), SendRequestError> {
7979
/// let res = client.get("http://localhost:8080")
@@ -97,9 +97,9 @@ pub trait ClientExt {
9797
///
9898
/// Example:
9999
/// ```no_run
100-
/// use actix_web_opentelemetry::ClientExt;
101100
/// use awc::{Client, error::SendRequestError};
102101
/// use opentelemetry::Context;
102+
/// use opentelemetry_instrumentation_actix_web::ClientExt;
103103
///
104104
/// async fn execute_request(client: &Client) -> Result<(), SendRequestError> {
105105
/// let res = client.get("http://localhost:8080")
@@ -243,9 +243,9 @@ impl InstrumentedClientRequest {
243243
///
244244
/// Example:
245245
/// ```
246-
/// use actix_web_opentelemetry::ClientExt;
247246
/// use awc::{Client, error::SendRequestError};
248247
/// use opentelemetry::KeyValue;
248+
/// use opentelemetry_instrumentation_actix_web::ClientExt;
249249
///
250250
/// async fn execute_request(client: &Client) -> Result<(), SendRequestError> {
251251
/// let attrs = [KeyValue::new("dye-key", "dye-value")];
@@ -272,8 +272,8 @@ impl InstrumentedClientRequest {
272272
///
273273
/// Example:
274274
/// ```
275-
/// use actix_web_opentelemetry::ClientExt;
276275
/// use awc::{Client, error::SendRequestError};
276+
/// use opentelemetry_instrumentation_actix_web::ClientExt;
277277
///
278278
/// async fn execute_request(client: &Client) -> Result<(), SendRequestError> {
279279
/// let res = client.get("http://localhost:8080")

actix-web-opentelemetry/src/lib.rs renamed to opentelemetry-instrumentation-actix-web/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! [OpenTelemetry] integration for [Actix Web].
1+
//! [OpenTelemetry] instrumentation for [Actix Web].
22
//!
33
//! This crate allows you to easily instrument client and server requests.
44
//!
@@ -25,7 +25,7 @@
2525
//! # #[cfg(feature="awc")]
2626
//! # {
2727
//! use awc::{Client, error::SendRequestError};
28-
//! use actix_web_opentelemetry::ClientExt;
28+
//! use opentelemetry_instrumentation_actix_web::ClientExt;
2929
//!
3030
//! async fn execute_request(client: &Client) -> Result<(), SendRequestError> {
3131
//! let res = client
@@ -49,8 +49,8 @@
4949
//!
5050
//! ```no_run
5151
//! use actix_web::{web, App, HttpServer};
52-
//! use actix_web_opentelemetry::RequestTracing;
5352
//! use opentelemetry::global;
53+
//! use opentelemetry_instrumentation_actix_web::RequestTracing;
5454
//! use opentelemetry_sdk::trace::SdkTracerProvider;
5555
//!
5656
//! async fn index() -> &'static str {
@@ -86,9 +86,9 @@
8686
//!
8787
//! ```no_run
8888
//! use actix_web::{dev, http, web, App, HttpRequest, HttpServer};
89-
//! # #[cfg(feature = "metrics-prometheus")]
90-
//! use actix_web_opentelemetry::{PrometheusMetricsHandler, RequestMetrics, RequestTracing};
9189
//! use opentelemetry::global;
90+
//! # #[cfg(feature = "metrics-prometheus")]
91+
//! use opentelemetry_instrumentation_actix_web::{PrometheusMetricsHandler, RequestMetrics, RequestTracing};
9292
//! use opentelemetry_sdk::metrics::SdkMeterProvider;
9393
//!
9494
//! # #[cfg(feature = "metrics-prometheus")]

0 commit comments

Comments
 (0)