Skip to content

Commit f7786e1

Browse files
authored
Merge branch 'main' into set-resource-optimize
2 parents 38e1bf4 + 7a51e75 commit f7786e1

File tree

52 files changed

+735
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+735
-201
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ jobs:
141141
- name: Upload to codecov.io
142142
uses: codecov/codecov-action@v3
143143
with:
144-
fail_ci_if_error: true
144+
fail_ci_if_error: false

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright The OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ For GitHub groups see the [code owners](CODEOWNERS) file.
192192
* [Cijo Thomas](https://github.com/cijothomas)
193193
* [Harold Dost](https://github.com/hdost)
194194
* [Julian Tescher](https://github.com/jtescher)
195+
* [Lalit Kumar Bhasin](https://github.com/lalitb)
195196
* [Zhongyang Wu](https://github.com/TommyCpp)
196197

197198
### Approvers
198199

199-
* [Lalit Kumar Bhasin](https://github.com/lalitb)
200200
* [Shaun Cox](https://github.com/shaun-cox)
201201

202202
### Emeritus

opentelemetry-appender-log/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2023 The OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

opentelemetry-appender-log/src/lib.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ where
4949
{
5050
pub fn new(provider: &P) -> Self {
5151
OpenTelemetryLogBridge {
52-
logger: provider.versioned_logger(
53-
"opentelemetry-log-appender",
54-
Some(Cow::Borrowed(env!("CARGO_PKG_VERSION"))),
55-
None,
56-
None,
57-
),
52+
logger: provider
53+
.logger_builder("opentelemetry-log-appender")
54+
.with_version(Cow::Borrowed(env!("CARGO_PKG_VERSION")))
55+
.build(),
5856
_phantom: Default::default(),
5957
}
6058
}

opentelemetry-appender-tracing/src/layer.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,10 @@ where
138138
{
139139
pub fn new(provider: &P) -> Self {
140140
OpenTelemetryTracingBridge {
141-
logger: provider.versioned_logger(
142-
INSTRUMENTATION_LIBRARY_NAME,
143-
Some(Cow::Borrowed(env!("CARGO_PKG_VERSION"))),
144-
None,
145-
None,
146-
),
141+
logger: provider
142+
.logger_builder(INSTRUMENTATION_LIBRARY_NAME)
143+
.with_version(Cow::Borrowed(env!("CARGO_PKG_VERSION")))
144+
.build(),
147145
_phantom: Default::default(),
148146
}
149147
}

opentelemetry-http/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## vNext
44

5+
- Add `reqwest-rustls-webkpi-roots` feature flag to configure [`reqwest`](https://docs.rs/reqwest/0.11.27/reqwest/index.html#optional-features) to use embedded `webkpi-roots`.
6+
57
## v0.11.1
68

79
- Add feature flag enabling users to configure `reqwest` usage to use rustls via

opentelemetry-http/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rust-version = "1.65"
1111

1212
[features]
1313
reqwest-rustls = ["reqwest", "reqwest/rustls-tls-native-roots"]
14+
reqwest-rustls-webkpi-roots = ["reqwest", "reqwest/rustls-tls-webpki-roots"]
1415

1516
[dependencies]
1617
async-trait = { workspace = true }

opentelemetry-http/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2023 The OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

opentelemetry-jaeger-propagator/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2023 The OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

opentelemetry-jaeger/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2023 The OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

opentelemetry-jaeger/src/exporter/config/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ fn build_config_and_process(
8585
pub(crate) fn install_tracer_provider_and_get_tracer(
8686
tracer_provider: TracerProvider,
8787
) -> Result<Tracer, TraceError> {
88-
let tracer = opentelemetry::trace::TracerProvider::versioned_tracer(
88+
let tracer = opentelemetry::trace::TracerProvider::tracer_builder(
8989
&tracer_provider,
9090
"opentelemetry-jaeger",
91-
Some(env!("CARGO_PKG_VERSION")),
92-
Some(semcov::SCHEMA_URL),
93-
None,
94-
);
91+
)
92+
.with_version(env!("CARGO_PKG_VERSION"))
93+
.with_schema_url(semcov::SCHEMA_URL)
94+
.build();
9595
let _ = global::set_tracer_provider(tracer_provider);
9696
Ok(tracer)
9797
}

opentelemetry-otlp/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Added
1010

1111
- Added `DeltaTemporalitySelector` ([#1568])
12+
- Add `webkpi-roots` features to `reqwest` and `tonic` backends
1213

1314
[#1568]: https://github.com/open-telemetry/opentelemetry-rust/pull/1568
1415

opentelemetry-otlp/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ grpc-tonic = ["tonic", "prost", "http", "tokio", "opentelemetry-proto/gen-tonic"
6767
gzip-tonic = ["tonic/gzip"]
6868
tls = ["tonic/tls"]
6969
tls-roots = ["tls", "tonic/tls-roots"]
70+
tls-webkpi-roots = ["tls", "tonic/tls-webpki-roots"]
7071

7172
# http binary
7273
http-proto = ["prost", "opentelemetry-http", "opentelemetry-proto/gen-tonic-messages", "http", "trace", "metrics"]
7374
reqwest-blocking-client = ["reqwest/blocking", "opentelemetry-http/reqwest"]
7475
reqwest-client = ["reqwest", "opentelemetry-http/reqwest"]
75-
reqwest-rustls = ["reqwest", "reqwest/rustls-tls-native-roots"]
76+
reqwest-rustls = ["reqwest", "opentelemetry-http/reqwest-rustls"]
77+
reqwest-rustls-webkpi-roots = ["reqwest", "opentelemetry-http/reqwest-rustls-webkpi-roots"]
7678

7779
# test
7880
integration-testing = ["tonic", "prost", "tokio/full", "trace"]

opentelemetry-otlp/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2023 The OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

opentelemetry-otlp/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@
9797
//! * `gzip-tonic`: Use gzip compression for `tonic` grpc layer.
9898
//! * `tls-tonic`: Enable TLS.
9999
//! * `tls-roots`: Adds system trust roots to rustls-based gRPC clients using the rustls-native-certs crate
100+
//! * `tls-webkpi-roots`: Embeds Mozilla's trust roots to rustls-based gRPC clients using the webkpi-roots crate
100101
//!
101102
//! The following feature flags offer additional configurations on http:
102103
//!
103104
//! * `http-proto`: Use http as transport layer, protobuf as body format.
104105
//! * `reqwest-blocking-client`: Use reqwest blocking http client.
105106
//! * `reqwest-client`: Use reqwest http client.
106-
//! * `reqwest-rustls`: Use reqwest with TLS.
107+
//! * `reqwest-rustls`: Use reqwest with TLS with system trust roots via `rustls-native-certs` crate.
108+
//! * `reqwest-rustls-webkpi-roots`: Use reqwest with TLS with Mozilla's trust roots via `webkpi-roots` crate.
107109
//!
108110
//! # Kitchen Sink Full Configuration
109111
//!

opentelemetry-otlp/src/logs.rs

+8-12
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,10 @@ fn build_simple_with_exporter(
187187
provider_builder = provider_builder.with_config(config);
188188
}
189189
let provider = provider_builder.build();
190-
let logger = provider.versioned_logger(
191-
Cow::Borrowed("opentelemetry-otlp"),
192-
Some(Cow::Borrowed(env!("CARGO_PKG_VERSION"))),
193-
None,
194-
None,
195-
);
190+
let logger = provider
191+
.logger_builder(Cow::Borrowed("opentelemetry-otlp"))
192+
.with_version(Cow::Borrowed(env!("CARGO_PKG_VERSION")))
193+
.build();
196194
let _ = global::set_logger_provider(provider);
197195
logger
198196
}
@@ -213,12 +211,10 @@ fn build_batch_with_exporter<R: RuntimeChannel>(
213211
provider_builder = provider_builder.with_config(config);
214212
}
215213
let provider = provider_builder.build();
216-
let logger = provider.versioned_logger(
217-
Cow::Borrowed("opentelemetry-otlp"),
218-
Some(Cow::Borrowed(env!("CARGO_PKG_VERSION"))),
219-
None,
220-
None,
221-
);
214+
let logger = provider
215+
.logger_builder(Cow::Borrowed("opentelemetry-otlp"))
216+
.with_version(Cow::Borrowed(env!("CARGO_PKG_VERSION")))
217+
.build();
222218
let _ = global::set_logger_provider(provider);
223219
logger
224220
}

opentelemetry-otlp/src/span.rs

+10-12
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,11 @@ fn build_simple_with_exporter(
140140
provider_builder = provider_builder.with_config(config);
141141
}
142142
let provider = provider_builder.build();
143-
let tracer = provider.versioned_tracer(
144-
"opentelemetry-otlp",
145-
Some(env!("CARGO_PKG_VERSION")),
146-
Some(SCHEMA_URL),
147-
None,
148-
);
143+
let tracer = provider
144+
.tracer_builder("opentelemetry-otlp")
145+
.with_version(env!("CARGO_PKG_VERSION"))
146+
.with_schema_url(SCHEMA_URL)
147+
.build();
149148
let _ = global::set_tracer_provider(provider);
150149
tracer
151150
}
@@ -166,12 +165,11 @@ fn build_batch_with_exporter<R: RuntimeChannel>(
166165
provider_builder = provider_builder.with_config(config);
167166
}
168167
let provider = provider_builder.build();
169-
let tracer = provider.versioned_tracer(
170-
"opentelemetry-otlp",
171-
Some(env!("CARGO_PKG_VERSION")),
172-
Some(SCHEMA_URL),
173-
None,
174-
);
168+
let tracer = provider
169+
.tracer_builder("opentelemetry-otlp")
170+
.with_version(env!("CARGO_PKG_VERSION"))
171+
.with_schema_url(SCHEMA_URL)
172+
.build();
175173
let _ = global::set_tracer_provider(provider);
176174
tracer
177175
}

opentelemetry-otlp/tests/integration_test/expected/failed_traces.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"parentSpanId": "",
2424
"name": "Sub operation...",
2525
"kind": 1,
26-
"startTimeUnixNano": 1703985537070566698,
27-
"endTimeUnixNano": 1703985537070572718,
26+
"startTimeUnixNano": "1703985537070566698",
27+
"endTimeUnixNano": "1703985537070572718",
2828
"attributes": [
2929
{
3030
"key": "lemons",
@@ -35,7 +35,7 @@
3535
],
3636
"events": [
3737
{
38-
"timeUnixNano": 1703985537070567697,
38+
"timeUnixNano": "1703985537070567697",
3939
"name": "Sub span event"
4040
}
4141
],
@@ -68,8 +68,8 @@
6868
"parentSpanId": "cd7cf7bf939930b7",
6969
"name": "operation",
7070
"kind": 1,
71-
"startTimeUnixNano": 1703985537070558635,
72-
"endTimeUnixNano": 1703985537070580454,
71+
"startTimeUnixNano": "1703985537070558635",
72+
"endTimeUnixNano": "1703985537070580454",
7373
"attributes": [
7474
{
7575
"key": "ex.com/another",
@@ -80,7 +80,7 @@
8080
],
8181
"events": [
8282
{
83-
"timeUnixNano": 1703985537070563326,
83+
"timeUnixNano": "1703985537070563326",
8484
"name": "Nice operation!",
8585
"attributes": [
8686
{

opentelemetry-otlp/tests/integration_test/expected/traces.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"parentSpanId": "d58cf2d702a061e0",
2424
"name": "Sub operation...",
2525
"kind": 1,
26-
"startTimeUnixNano": 1703985537070566698,
27-
"endTimeUnixNano": 1703985537070572718,
26+
"startTimeUnixNano": "1703985537070566698",
27+
"endTimeUnixNano": "1703985537070572718",
2828
"attributes": [
2929
{
3030
"key": "lemons",
@@ -35,7 +35,7 @@
3535
],
3636
"events": [
3737
{
38-
"timeUnixNano": 1703985537070567697,
38+
"timeUnixNano": "1703985537070567697",
3939
"name": "Sub span event"
4040
}
4141
],
@@ -68,8 +68,8 @@
6868
"parentSpanId": "",
6969
"name": "operation",
7070
"kind": 1,
71-
"startTimeUnixNano": 1703985537070558635,
72-
"endTimeUnixNano": 1703985537070580454,
71+
"startTimeUnixNano": "1703985537070558635",
72+
"endTimeUnixNano": "1703985537070580454",
7373
"attributes": [
7474
{
7575
"key": "ex.com/another",
@@ -80,7 +80,7 @@
8080
],
8181
"events": [
8282
{
83-
"timeUnixNano": 1703985537070563326,
83+
"timeUnixNano": "1703985537070563326",
8484
"name": "Nice operation!",
8585
"attributes": [
8686
{

opentelemetry-prometheus/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2023 The OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

opentelemetry-proto/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## vNext
44

5+
- Update protobuf definitions to v1.1.0 [#1668](https://github.com/open-telemetry/opentelemetry-rust/pull/1668)
6+
57
## v0.5.0
68

79
### Changed

opentelemetry-proto/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2023 The OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

opentelemetry-proto/src/proto.rs

+14
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,21 @@ pub(crate) mod serializers {
6969
Ok(Some(AnyValue { value }))
7070
}
7171

72+
pub fn serialize_u64_to_string<S>(value: &u64, serializer: S) -> Result<S::Ok, S::Error>
73+
where
74+
S: Serializer,
75+
{
76+
let s = value.to_string();
77+
serializer.serialize_str(&s)
78+
}
7279

80+
pub fn deserialize_string_to_u64<'de, D>(deserializer: D) -> Result<u64, D::Error>
81+
where
82+
D: Deserializer<'de>,
83+
{
84+
let s: String = Deserialize::deserialize(deserializer)?;
85+
s.parse::<u64>().map_err(de::Error::custom)
86+
}
7387
}
7488

7589
#[cfg(feature = "gen-tonic-messages")]

0 commit comments

Comments
 (0)