Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COLIB-530: Bump to otel 0.27 #177

Merged
merged 7 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ and this project adheres to

---

## [0.20.0] - 2024-12-02

### Added

- Support for opentelemetry 0.27, now the default version.

---

## [0.19.0] - 2024-11-25

### Added
Expand Down Expand Up @@ -487,8 +495,8 @@ Request::rest(&bridge).send()

The old API is still available but deprecated. It will be removed soon.


[Unreleased]: https://github.com/primait/bridge.rs/compare/0.19.0...HEAD
[Unreleased]: https://github.com/primait/bridge.rs/compare/0.20.0...HEAD
[0.20.0]: https://github.com/primait/bridge.rs/compare/0.19.0...0.20.0
[0.19.0]: https://github.com/primait/bridge.rs/compare/0.18.0...0.19.0
[0.18.0]: https://github.com/primait/bridge.rs/compare/0.17.0...0.18.0
[0.17.0]: https://github.com/primait/bridge.rs/compare/0.16.6...0.17.0
Expand Down
18 changes: 13 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "MIT"
name = "prima_bridge"
readme = "README.md"
repository = "https://github.com/primait/bridge.rs"
version = "0.19.0"
version = "0.20.0"
# See https://github.com/rust-lang/rust/issues/107557
rust-version = "1.72"

Expand All @@ -24,7 +24,7 @@ auth0 = [
]
gzip = ["reqwest/gzip"]
redis-tls = ["redis/tls", "redis/tokio-native-tls-comp"]
tracing_opentelemetry = ["tracing_opentelemetry_0_26"]
tracing_opentelemetry = ["tracing_opentelemetry_0_27"]

tracing_opentelemetry_0_21 = [
"_any_otel_version",
Expand Down Expand Up @@ -68,6 +68,13 @@ tracing_opentelemetry_0_26 = [
"opentelemetry_0_26_pkg",
"opentelemetry_sdk_0_26_pkg",
]
tracing_opentelemetry_0_27 = [
"_any_otel_version",
"tracing",
"tracing-opentelemetry_0_28_pkg",
"opentelemetry_0_27_pkg",
"opentelemetry_sdk_0_27_pkg",
]

_any_otel_version = []

Expand All @@ -88,7 +95,7 @@ redis = { version = "0.27", features = ["tokio-comp"], optional = true }
reqwest = { version = "0.12", features = ["json", "multipart", "stream"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
thiserror = "2"
tokio = { version = "1.16", features = ["macros", "rt-multi-thread", "fs"] }
tracing = { version = "0.1", optional = true }
uuid = { version = ">=0.7.0, <2.0.0", features = ["serde", "v4"] }
Expand All @@ -103,25 +110,26 @@ opentelemetry_0_23_pkg = { package = "opentelemetry", version = "0.23", optional
opentelemetry_0_24_pkg = { package = "opentelemetry", version = "0.24", optional = true }
opentelemetry_0_25_pkg = { package = "opentelemetry", version = "0.25", optional = true }
opentelemetry_0_26_pkg = { package = "opentelemetry", version = "0.26", optional = true }
opentelemetry_0_27_pkg = { package = "opentelemetry", version = "0.27", optional = true }
opentelemetry_sdk_0_21_pkg = { package = "opentelemetry_sdk", version = "0.21", optional = true }
opentelemetry_sdk_0_22_pkg = { package = "opentelemetry_sdk", version = "0.22", optional = true }
opentelemetry_sdk_0_23_pkg = { package = "opentelemetry_sdk", version = "0.23", optional = true }
opentelemetry_sdk_0_24_pkg = { package = "opentelemetry_sdk", version = "0.24", optional = true }
opentelemetry_sdk_0_25_pkg = { package = "opentelemetry_sdk", version = "0.25", optional = true }
opentelemetry_sdk_0_26_pkg = { package = "opentelemetry_sdk", version = "0.26", optional = true }
tracing-opentelemetry_0_21_pkg = { package = "tracing-opentelemetry", version = "0.21", optional = true }
opentelemetry_sdk_0_27_pkg = { package = "opentelemetry_sdk", version = "0.27", optional = true }
tracing-opentelemetry_0_22_pkg = { package = "tracing-opentelemetry", version = "0.22", optional = true }
tracing-opentelemetry_0_23_pkg = { package = "tracing-opentelemetry", version = "0.23", optional = true }
tracing-opentelemetry_0_24_pkg = { package = "tracing-opentelemetry", version = "0.24", optional = true }
tracing-opentelemetry_0_25_pkg = { package = "tracing-opentelemetry", version = "0.25", optional = true }
tracing-opentelemetry_0_26_pkg = { package = "tracing-opentelemetry", version = "0.26", optional = true }
tracing-opentelemetry_0_27_pkg = { package = "tracing-opentelemetry", version = "0.27", optional = true }
tracing-opentelemetry_0_28_pkg = { package = "tracing-opentelemetry", version = "0.28", optional = true }

[dev-dependencies]
flate2 = "1.0"
mockito = "1.0"
tokio = { version = "1.16", features = ["macros", "rt-multi-thread"] }
tokio-test = "0.4"

[profile.release]
codegen-units = 1
Expand Down
229 changes: 45 additions & 184 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
[config]
skip_core_tasks = true

[env]
AVAILABLE_OTEL_FEATURES = [
"tracing_opentelemetry_0_21",
"tracing_opentelemetry_0_22",
"tracing_opentelemetry_0_23",
"tracing_opentelemetry_0_24",
"tracing_opentelemetry_0_25",
"tracing_opentelemetry_0_26",
"tracing_opentelemetry_0_27",
]

[tasks.build]
description = "Runs the rust compiler."
category = "Build"
Expand All @@ -21,12 +32,7 @@ args = ["fmt", "--", "--check"]
dependencies = [
"test-base",
"test-auth0",
"test-otel-0_21",
"test-otel-0_22",
"test-otel-0_23",
"test-otel-0_24",
"test-otel-0_25",
"test-otel-0_26",
"test-all-otel-versions",
]

[tasks.test-base]
Expand All @@ -39,70 +45,30 @@ command = "cargo"
args = ["test", "--features=auth0,gzip", "${@}"]
dependencies = ["build"]

[tasks.test-otel-0_21]
command = "cargo"
args = [
"test",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_21",
]

[tasks.test-otel-0_22]
command = "cargo"
args = [
"test",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_22",
]
[tasks.test-all-otel-versions]
script = """#!@duckscript

[tasks.test-otel-0_23]
command = "cargo"
args = [
"test",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_23",
]
available_otel_features = split ${AVAILABLE_OTEL_FEATURES} ";"
for otel_feature in ${available_otel_features}
set_env otel_feature ${otel_feature}
cm_run_task "test-otel-version-from-env"
end
"""

[tasks.test-otel-0_24]
[tasks.test-otel-version-from-env]
command = "cargo"
args = [
"test",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_24",
]

[tasks.test-otel-0_25]
command = "cargo"
args = [
"test",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_25",
]

[tasks.test-otel-0_26]
command = "cargo"
args = [
"test",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_26",
"${otel_feature}",
]

[tasks.clippy]
dependencies = [
"clippy-base",
"clippy-auth0",
"clippy-otel-0_21",
"clippy-otel-0_22",
"clippy-otel-0_23",
"clippy-otel-0_24",
"clippy-otel-0_25",
"clippy-otel-0_26",
"clippy-all-otel-versions",
]

[tasks.clippy-base]
Expand All @@ -122,78 +88,23 @@ args = [
]
dependencies = ["build"]

[tasks.clippy-otel-0_21]
command = "cargo"
args = [
"clippy",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_21",
"--all-targets",
"--",
"-D",
"warnings",
]

[tasks.clippy-otel-0_22]
command = "cargo"
args = [
"clippy",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_22",
"--all-targets",
"--",
"-D",
"warnings",
]

[tasks.clippy-otel-0_23]
command = "cargo"
args = [
"clippy",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_23",
"--all-targets",
"--",
"-D",
"warnings",
]

[tasks.clippy-otel-0_24]
command = "cargo"
args = [
"clippy",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_24",
"--all-targets",
"--",
"-D",
"warnings",
]
[tasks.clippy-all-otel-versions]
script = """#!@duckscript

[tasks.clippy-otel-0_25]
command = "cargo"
args = [
"clippy",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_25",
"--all-targets",
"--",
"-D",
"warnings",
]
available_otel_features = split ${AVAILABLE_OTEL_FEATURES} ";"
for otel_feature in ${available_otel_features}
set_env otel_feature ${otel_feature}
cm_run_task "clippy-otel-version-from-env"
end
"""

[tasks.clippy-otel-0_26]
[tasks.clippy-otel-version-from-env]
command = "cargo"
args = [
"clippy",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_26",
"${otel_feature}",
"--all-targets",
"--",
"-D",
Expand All @@ -202,79 +113,29 @@ args = [

[tasks.deny-check]
dependencies = [
"deny-check-otel-0_21",
"deny-check-otel-0_22",
"deny-check-otel-0_23",
"deny-check-otel-0_24",
"deny-check-otel-0_25",
"deny-check-otel-0_26",
"deny-check-all-otel-versions",
]

[tasks.deny-check-otel-0_21]
args = [
"deny",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_21",
"check",
]
command = "cargo"
description = "Run cargo-deny with tracing_opentelemetry_0_21 feature"
[tasks.deny-check-all-otel-versions]
script = """#!@duckscript

[tasks.deny-check-otel-0_22]
args = [
"deny",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_22",
"check",
]
command = "cargo"
description = "Run cargo-deny with tracing_opentelemetry_0_22 feature"
available_otel_features = split ${AVAILABLE_OTEL_FEATURES} ";"
for otel_feature in ${available_otel_features}
set_env otel_feature ${otel_feature}
cm_run_task "deny-check-otel-version-from-env"
end
"""

[tasks.deny-check-otel-0_23]
args = [
"deny",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_23",
"check",
]
[tasks.deny-check-otel-version-from-env]
description = "Run cargo-deny with ${otel_feature} feature"
command = "cargo"
description = "Run cargo-deny with tracing_opentelemetry_0_23 feature"

[tasks.deny-check-otel-0_24]
args = [
"deny",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_24",
"${otel_feature}",
"check",
]
command = "cargo"
description = "Run cargo-deny with tracing_opentelemetry_0_24 feature"

[tasks.deny-check-otel-0_25]
args = [
"deny",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_25",
"check",
]
command = "cargo"
description = "Run cargo-deny with tracing_opentelemetry_0_25 feature"

[tasks.deny-check-otel-0_26]
args = [
"deny",
"--no-default-features",
"--features",
"tracing_opentelemetry_0_26",
"check",
]
command = "cargo"
description = "Run cargo-deny with tracing_opentelemetry_0_26 feature"

[tasks.docs]
description = "Build docs as they are rendered on docs.rs"
Expand Down
Loading