Skip to content

Commit 5ea1f98

Browse files
feat(data-pipeline): put https under a feature fate (#1179)
# What does this PR do? Put https enablement behind a feature gate in the data-pipeline, ddtelemetry and trace-utils crate. This feature is enabled by default so this should not change anything for current users of the crates. # Motivation SInce https support is there to support a very small number of cases (cluster of agents mostly), this would allow us to not ship it by default in dd-trace-rs, reducing the number of dependencies and overall footprint of the library
1 parent e27a038 commit 5ea1f98

File tree

4 files changed

+32
-17
lines changed

4 files changed

+32
-17
lines changed

data-pipeline/Cargo.toml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ tokio = { version = "1.23", features = [
2828
"test-util",
2929
"time",
3030
], default-features = false }
31+
uuid = { version = "1.10.0", features = ["v4"] }
32+
tokio-util = "0.7.11"
3133

32-
ddcommon = { path = "../ddcommon" }
33-
ddtelemetry = { path = "../ddtelemetry" }
34+
ddcommon = { path = "../ddcommon", default-features = false }
35+
ddtelemetry = { path = "../ddtelemetry", default-features = false }
3436
datadog-trace-protobuf = { path = "../datadog-trace-protobuf" }
35-
datadog-trace-utils = { path = "../datadog-trace-utils" }
37+
datadog-trace-utils = { path = "../datadog-trace-utils", default-features = false }
3638
datadog-ddsketch = { path = "../ddsketch" }
37-
dogstatsd-client = { path = "../dogstatsd-client" }
38-
uuid = { version = "1.10.0", features = ["v4"] }
39-
tokio-util = "0.7.11"
39+
dogstatsd-client = { path = "../dogstatsd-client", default-features = false }
4040
tinybytes = { path = "../tinybytes", features = [
4141
"bytes_string",
4242
"serialization",
@@ -52,7 +52,9 @@ path = "benches/main.rs"
5252

5353
[dev-dependencies]
5454
criterion = "0.5.1"
55-
datadog-trace-utils = { path = "../datadog-trace-utils", features = ["test-utils"] }
55+
datadog-trace-utils = { path = "../datadog-trace-utils", features = [
56+
"test-utils",
57+
] }
5658
httpmock = "0.7.0"
5759
rand = "0.8.5"
5860
regex = "1.5"
@@ -64,4 +66,11 @@ tokio = { version = "1.23", features = [
6466
], default-features = false }
6567

6668
[features]
69+
default = ["https"]
70+
https = [
71+
"ddcommon/https",
72+
"ddtelemetry/https",
73+
"datadog-trace-utils/https",
74+
"dogstatsd-client/https",
75+
]
6776
test-utils = []

datadog-trace-utils/Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ path = "benches/main.rs"
1818
anyhow = "1.0"
1919
hyper = { version = "1.6", features = ["http1", "client"] }
2020
http-body-util = "0.1"
21-
2221
serde = { version = "1.0.145", features = ["derive"] }
2322
prost = "0.13.5"
2423
rmp-serde = "1.1.1"
2524
tracing = { version = "0.1", default-features = false }
2625
serde_json = "1.0"
2726
futures = { version = "0.3", default-features = false }
28-
ddcommon = { path = "../ddcommon" }
29-
datadog-trace-protobuf = { path = "../datadog-trace-protobuf" }
30-
datadog-trace-normalization = { path = "../datadog-trace-normalization" }
3127
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
3228
rand = "0.8.5"
3329
bytes = "1.6.0"
3430
rmpv = { version = "1.3.0", default-features = false }
3531
rmp = { version = "0.8.14", default-features = false }
32+
33+
ddcommon = { path = "../ddcommon", default-features = false }
34+
datadog-trace-protobuf = { path = "../datadog-trace-protobuf" }
35+
datadog-trace-normalization = { path = "../datadog-trace-normalization" }
3636
tinybytes = { path = "../tinybytes", features = [
3737
"bytes_string",
3838
"serialization",
@@ -51,7 +51,7 @@ zstd = { version = "0.13.3", default-features = false, optional = true }
5151
cargo_metadata = { version = "0.18.1", optional = true }
5252
# Dependency of cargo metadata, but 0.1.8 requires too new of a rust version.
5353
cargo-platform = { version = "=0.1.7", optional = true }
54-
testcontainers = { version = "0.22",features=["http_wait"], optional = true }
54+
testcontainers = { version = "0.22", features = ["http_wait"], optional = true }
5555
httpmock = { version = "0.7.0", optional = true }
5656
urlencoding = { version = "2.1.3", optional = true }
5757

@@ -65,6 +65,8 @@ datadog-trace-utils = { path = ".", features = ["test-utils"] }
6565
tempfile = "3.3.0"
6666

6767
[features]
68+
default = ["https"]
69+
https = ["ddcommon/https"]
6870
mini_agent = ["proxy", "compression", "ddcommon/use_webpki_roots"]
6971
test-utils = [
7072
"hyper/server",

ddtelemetry/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ bench = false
1212
[features]
1313
default = []
1414
tracing = ["tracing/std"]
15+
https = ["ddcommon/https"]
1516

1617
[dependencies]
1718
anyhow = { version = "1.0" }
18-
ddcommon = { path = "../ddcommon" }
19-
datadog-ddsketch = { path = "../ddsketch" }
2019
base64 = "0.22"
2120
futures = { version = "0.3", default-features = false }
2221
hyper = { version = "1.6", features = ["http1", "client"] }
2322
hyper-util = { version = "0.1", features = ["http1", "client", "client-legacy"] }
2423
http-body-util = "0.1"
2524
http = "1.0"
26-
2725
serde = { version = "1.0", features = ["derive"] }
2826
serde_json = { version = "1.0" }
2927
sys-info = { version = "0.9.0" }
3028
tokio = { version = "1.23", features = ["sync", "io-util"] }
3129
tokio-util = { version = "0.7", features = ["codec"] }
32-
3330
tracing = { version = "0.1", default-features = false }
3431
uuid = { version = "1.3", features = ["v4"] }
3532
hashbrown = "0.15"
3633

34+
ddcommon = { path = "../ddcommon", default-features = false}
35+
datadog-ddsketch = { path = "../ddsketch" }
36+
3737
[dev-dependencies]
3838
tracing-subscriber = "0.3.18"
3939
tokio = { version = "1.23", features = ["sync", "io-util", "rt-multi-thread"] }

dogstatsd-client/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ license.workspace = true
1010
bench = false
1111

1212
[dependencies]
13-
ddcommon = { path = "../ddcommon" }
13+
ddcommon = { path = "../ddcommon", default-features = false}
1414
cadence = "1.3.0"
1515
serde = { version = "1.0", features = ["derive", "rc"] }
1616
tracing = { version = "0.1", default-features = false }
1717
anyhow = { version = "1.0" }
1818
http = "1.0"
1919

20+
[features]
21+
default = ["https"]
22+
https = ["ddcommon/https"]
23+
2024

2125
[dev-dependencies]
2226
tokio = {version = "1.23", features = ["rt", "time", "test-util", "rt-multi-thread"], default-features = false}

0 commit comments

Comments
 (0)