Skip to content

Commit 10b3236

Browse files
authored
Merge branch 'main' into feat/log-kvs
2 parents a703702 + 9854bb5 commit 10b3236

File tree

44 files changed

+636
-180
lines changed

Some content is hidden

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

44 files changed

+636
-180
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
@@ -149,12 +149,10 @@ where
149149
{
150150
pub fn new(provider: &P) -> Self {
151151
OpenTelemetryLogBridge {
152-
logger: provider.versioned_logger(
153-
"opentelemetry-log-appender",
154-
Some(Cow::Borrowed(env!("CARGO_PKG_VERSION"))),
155-
None,
156-
None,
157-
),
152+
logger: provider
153+
.logger_builder("opentelemetry-log-appender")
154+
.with_version(Cow::Borrowed(env!("CARGO_PKG_VERSION")))
155+
.build(),
158156
_phantom: Default::default(),
159157
}
160158
}

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
@@ -183,12 +183,10 @@ fn build_simple_with_exporter(
183183
provider_builder = provider_builder.with_config(config);
184184
}
185185
let provider = provider_builder.build();
186-
let logger = provider.versioned_logger(
187-
Cow::Borrowed("opentelemetry-otlp"),
188-
Some(Cow::Borrowed(env!("CARGO_PKG_VERSION"))),
189-
None,
190-
None,
191-
);
186+
let logger = provider
187+
.logger_builder(Cow::Borrowed("opentelemetry-otlp"))
188+
.with_version(Cow::Borrowed(env!("CARGO_PKG_VERSION")))
189+
.build();
192190
let _ = global::set_logger_provider(provider);
193191
logger
194192
}
@@ -209,12 +207,10 @@ fn build_batch_with_exporter<R: RuntimeChannel>(
209207
provider_builder = provider_builder.with_config(config);
210208
}
211209
let provider = provider_builder.build();
212-
let logger = provider.versioned_logger(
213-
Cow::Borrowed("opentelemetry-otlp"),
214-
Some(Cow::Borrowed(env!("CARGO_PKG_VERSION"))),
215-
None,
216-
None,
217-
);
210+
let logger = provider
211+
.logger_builder(Cow::Borrowed("opentelemetry-otlp"))
212+
.with_version(Cow::Borrowed(env!("CARGO_PKG_VERSION")))
213+
.build();
218214
let _ = global::set_logger_provider(provider);
219215
logger
220216
}

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-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/tonic/opentelemetry.proto.metrics.v1.rs

+9
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ pub struct Metric {
168168
/// described by <http://unitsofmeasure.org/ucum.html.>
169169
#[prost(string, tag = "3")]
170170
pub unit: ::prost::alloc::string::String,
171+
/// Additional metadata attributes that describe the metric. \[Optional\].
172+
/// Attributes are non-identifying.
173+
/// Consumers SHOULD NOT need to be aware of these attributes.
174+
/// These attributes MAY be used to encode information allowing
175+
/// for lossless roundtrip translation to / from another data model.
176+
/// Attribute keys MUST be unique (it is not allowed to have more than one
177+
/// attribute with the same key).
178+
#[prost(message, repeated, tag = "12")]
179+
pub metadata: ::prost::alloc::vec::Vec<super::super::common::v1::KeyValue>,
171180
/// Data determines the aggregation type (if any) of the metric, what is the
172181
/// reported value type for the data points, as well as the relatationship to
173182
/// the time interval over which they are reported.

opentelemetry-proto/src/proto/tonic/opentelemetry.proto.trace.v1.rs

+38-13
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,27 @@ pub struct Span {
125125
)
126126
)]
127127
pub parent_span_id: ::prost::alloc::vec::Vec<u8>,
128-
/// Flags, a bit field. 8 least significant bits are the trace
129-
/// flags as defined in W3C Trace Context specification. Readers
130-
/// MUST not assume that 24 most significant bits will be zero.
131-
/// To read the 8-bit W3C trace flag, use `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
128+
/// Flags, a bit field.
129+
///
130+
/// Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace
131+
/// Context specification. To read the 8-bit W3C trace flag, use
132+
/// `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
133+
///
134+
/// See <https://www.w3.org/TR/trace-context-2/#trace-flags> for the flag definitions.
135+
///
136+
/// Bits 8 and 9 represent the 3 states of whether a span's parent
137+
/// is remote. The states are (unknown, is not remote, is remote).
138+
/// To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.
139+
/// To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.
132140
///
133141
/// When creating span messages, if the message is logically forwarded from another source
134142
/// with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD
135143
/// be copied as-is. If creating from a source that does not have an equivalent flags field
136-
/// (such as a runtime representation of an OpenTelemetry span), the high 24 bits MUST
144+
/// (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST
137145
/// be set to zero.
146+
/// Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.
138147
///
139148
/// \[Optional\].
140-
///
141-
/// See <https://www.w3.org/TR/trace-context-2/#trace-flags> for the flag definitions.
142149
#[prost(fixed32, tag = "16")]
143150
pub flags: u32,
144151
/// A description of the span's operation.
@@ -297,14 +304,23 @@ pub mod span {
297304
/// then no attributes were dropped.
298305
#[prost(uint32, tag = "5")]
299306
pub dropped_attributes_count: u32,
300-
/// Flags, a bit field. 8 least significant bits are the trace
301-
/// flags as defined in W3C Trace Context specification. Readers
302-
/// MUST not assume that 24 most significant bits will be zero.
303-
/// When creating new spans, the most-significant 24-bits MUST be
304-
/// zero. To read the 8-bit W3C trace flag (use flags &
305-
/// SPAN_FLAGS_TRACE_FLAGS_MASK). \[Optional\].
307+
/// Flags, a bit field.
308+
///
309+
/// Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace
310+
/// Context specification. To read the 8-bit W3C trace flag, use
311+
/// `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
306312
///
307313
/// See <https://www.w3.org/TR/trace-context-2/#trace-flags> for the flag definitions.
314+
///
315+
/// Bits 8 and 9 represent the 3 states of whether the link is remote.
316+
/// The states are (unknown, is not remote, is remote).
317+
/// To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.
318+
/// To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.
319+
///
320+
/// Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.
321+
/// When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero.
322+
///
323+
/// \[Optional\].
308324
#[prost(fixed32, tag = "6")]
309325
pub flags: u32,
310326
}
@@ -468,6 +484,11 @@ pub enum SpanFlags {
468484
DoNotUse = 0,
469485
/// Bits 0-7 are used for trace flags.
470486
TraceFlagsMask = 255,
487+
/// Bits 8 and 9 are used to indicate that the parent span or link span is remote.
488+
/// Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known.
489+
/// Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote.
490+
ContextHasIsRemoteMask = 256,
491+
ContextIsRemoteMask = 512,
471492
}
472493
impl SpanFlags {
473494
/// String value of the enum field names used in the ProtoBuf definition.
@@ -478,13 +499,17 @@ impl SpanFlags {
478499
match self {
479500
SpanFlags::DoNotUse => "SPAN_FLAGS_DO_NOT_USE",
480501
SpanFlags::TraceFlagsMask => "SPAN_FLAGS_TRACE_FLAGS_MASK",
502+
SpanFlags::ContextHasIsRemoteMask => "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK",
503+
SpanFlags::ContextIsRemoteMask => "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK",
481504
}
482505
}
483506
/// Creates an enum from field names used in the ProtoBuf definition.
484507
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
485508
match value {
486509
"SPAN_FLAGS_DO_NOT_USE" => Some(Self::DoNotUse),
487510
"SPAN_FLAGS_TRACE_FLAGS_MASK" => Some(Self::TraceFlagsMask),
511+
"SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK" => Some(Self::ContextHasIsRemoteMask),
512+
"SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK" => Some(Self::ContextIsRemoteMask),
488513
_ => None,
489514
}
490515
}

0 commit comments

Comments
 (0)