Skip to content

Commit a545847

Browse files
authored
Merge branch 'main' into copilot/fix-3045
2 parents 7a84eed + 34d6d50 commit a545847

File tree

7 files changed

+28
-20
lines changed

7 files changed

+28
-20
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ tonic = { version = "0.13", default-features = false }
4545
tonic-build = "0.13"
4646
tokio = { version = "1", default-features = false }
4747
tokio-stream = "0.1"
48-
# Using `tracing 0.1.40` because 0.1.39 (which is yanked) introduces the ability to set event names in macros,
48+
# Using `tracing 0.1.40` because 0.1.39 (which is yanked) introduces the ability to set event names in macros,
4949
# required for OpenTelemetry's internal logging macros.
5050
tracing = { version = ">=0.1.40", default-features = false }
5151
# `tracing-core >=0.1.33` is required for compatibility with `tracing >=0.1.40`.
52-
tracing-core = { version = ">=0.1.33", default-features = false }
52+
tracing-core = { version = ">=0.1.33", default-features = false }
5353
tracing-subscriber = { version = "0.3", default-features = false }
5454
url = { version = "2.5", default-features = false }
5555
anyhow = "1.0.94"
@@ -59,7 +59,7 @@ ctor = "0.2.9"
5959
ctrlc = "3.2.5"
6060
futures-channel = "0.3"
6161
futures-sink = "0.3"
62-
hex = "0.4.3"
62+
const-hex = "1.14.1"
6363
lazy_static = "1.4.0"
6464
num-format = "0.4.4"
6565
num_cpus = "1.15.0"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,17 @@ For more information about the maintainer role, see the [community repository](h
192192

193193
* [Anton Grübel](https://github.com/gruebel), Baz
194194
* [Björn Antonsson](https://github.com/bantonsson), Datadog
195-
* [Shaun Cox](https://github.com/shaun-cox), Microsoft
196195
* [Scott Gerring](https://github.com/scottgerring), Datadog
196+
* [Shaun Cox](https://github.com/shaun-cox), Microsoft
197197

198198
For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
199199

200200
### Emeritus
201201

202202
* [Dirkjan Ochtman](https://github.com/djc)
203+
* [Isobel Redelmeier](https://github.com/iredelmeier)
203204
* [Jan Kühle](https://github.com/frigus02)
204205
* [Julian Tescher](https://github.com/jtescher)
205-
* [Isobel Redelmeier](https://github.com/iredelmeier)
206206
* [Mike Goldsmith](https://github.com/MikeGoldsmith)
207207

208208
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).

opentelemetry-http/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## vNext
44

55
- Implementation of `Extractor::get_all` for `HeaderExtractor`
6+
- Support `HttpClient` implementation for `HyperClient<C>` with custom connectors beyond `HttpConnector`, enabling Unix Domain Socket connections and other custom transports
67

78
## 0.30.0
89

opentelemetry-http/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,11 @@ pub mod hyper {
179179
}
180180

181181
#[async_trait]
182-
impl HttpClient for HyperClient {
182+
impl<C> HttpClient for HyperClient<C>
183+
where
184+
C: Connect + Clone + Send + Sync + 'static,
185+
HyperClient<C>: Debug,
186+
{
183187
async fn send_bytes(&self, request: Request<Bytes>) -> Result<Response<Bytes>, HttpError> {
184188
otel_debug!(name: "HyperClient.Send");
185189
let (parts, body) = request.into_parts();

opentelemetry-proto/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ testing = ["opentelemetry/testing"]
4848
# add ons
4949
internal-logs = ["opentelemetry/internal-logs"]
5050
with-schemars = ["schemars"]
51-
with-serde = ["serde", "hex", "base64"]
51+
with-serde = ["serde", "const-hex", "base64"]
5252

5353
[dependencies]
5454
tonic = { workspace = true, optional = true, features = ["codegen", "prost"] }
5555
prost = { workspace = true, optional = true }
5656
opentelemetry = { version = "0.30", default-features = false, path = "../opentelemetry" }
5757
schemars = { workspace = true, optional = true }
5858
serde = { workspace = true, optional = true, features = ["serde_derive", "std"] }
59-
hex = { workspace = true, optional = true }
59+
const-hex = { workspace = true, optional = true }
6060
base64 = { workspace = true, optional = true }
6161

6262
[dev-dependencies]

opentelemetry-proto/src/proto.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub(crate) mod serializers {
1616
where
1717
S: Serializer,
1818
{
19-
let hex_string = hex::encode(bytes);
19+
let hex_string = const_hex::encode(bytes);
2020
serializer.serialize_str(&hex_string)
2121
}
2222

@@ -37,7 +37,7 @@ pub(crate) mod serializers {
3737
where
3838
E: de::Error,
3939
{
40-
hex::decode(value).map_err(E::custom)
40+
const_hex::decode(value).map_err(E::custom)
4141
}
4242
}
4343

opentelemetry-proto/tests/json_serde.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ mod json_serde {
6161
dropped_attributes_count: 0,
6262
}),
6363
spans: vec![Span {
64-
trace_id: hex::decode("5b8efff798038103d269b633813fc60c").unwrap(),
65-
span_id: hex::decode("eee19b7ec3c1b174").unwrap(),
64+
trace_id: const_hex::decode("5b8efff798038103d269b633813fc60c")
65+
.unwrap(),
66+
span_id: const_hex::decode("eee19b7ec3c1b174").unwrap(),
6667
trace_state: String::new(),
67-
parent_span_id: hex::decode("eee19b7ec3c1b173").unwrap(),
68+
parent_span_id: const_hex::decode("eee19b7ec3c1b173").unwrap(),
6869
flags: 0,
6970
name: String::from("I'm a server span"),
7071
kind: 2,
@@ -267,10 +268,11 @@ mod json_serde {
267268
dropped_attributes_count: 1,
268269
}),
269270
spans: vec![Span {
270-
trace_id: hex::decode("5b8efff798038103d269b633813fc60c").unwrap(),
271-
span_id: hex::decode("eee19b7ec3c1b174").unwrap(),
271+
trace_id: const_hex::decode("5b8efff798038103d269b633813fc60c")
272+
.unwrap(),
273+
span_id: const_hex::decode("eee19b7ec3c1b174").unwrap(),
272274
trace_state: String::from("browser=firefox,os=linux"),
273-
parent_span_id: hex::decode("eee19b7ec3c1b173").unwrap(),
275+
parent_span_id: const_hex::decode("eee19b7ec3c1b173").unwrap(),
274276
flags: 1,
275277
name: String::from("I'm a server span"),
276278
kind: 2,
@@ -308,9 +310,9 @@ mod json_serde {
308310
}],
309311
dropped_events_count: 1,
310312
links: vec![Link {
311-
trace_id: hex::decode("5b8efff798038103d269b633813fc60b")
313+
trace_id: const_hex::decode("5b8efff798038103d269b633813fc60b")
312314
.unwrap(),
313-
span_id: hex::decode("eee19b7ec3c1b172").unwrap(),
315+
span_id: const_hex::decode("eee19b7ec3c1b172").unwrap(),
314316
trace_state: String::from("food=pizza,color=red"),
315317
attributes: vec![KeyValue {
316318
key: String::from("my.link.attr"),
@@ -1272,8 +1274,9 @@ mod json_serde {
12721274
],
12731275
dropped_attributes_count: 0,
12741276
flags: 0,
1275-
trace_id: hex::decode("5b8efff798038103d269b633813fc60c").unwrap(),
1276-
span_id: hex::decode("eee19b7ec3c1b174").unwrap(),
1277+
trace_id: const_hex::decode("5b8efff798038103d269b633813fc60c")
1278+
.unwrap(),
1279+
span_id: const_hex::decode("eee19b7ec3c1b174").unwrap(),
12771280
}],
12781281
schema_url: String::new(),
12791282
}],

0 commit comments

Comments
 (0)