build(deps): bump the opentelemetry group with 2 updates (#3356)
Bumps the opentelemetry group with 2 updates: [opentelemetry](https://github.com/open-telemetry/opentelemetry-rust) and [opentelemetry_sdk](https://github.com/open-telemetry/opentelemetry-rust). Updates `opentelemetry` from 0.26.0 to 0.27.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-rust/compare/opentelemetry-0.26.0...opentelemetry-0.27.0) Updates `opentelemetry_sdk` from 0.26.0 to 0.27.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-rust/compare/opentelemetry_sdk-0.26.0...opentelemetry_sdk-0.27.0) --- updated-dependencies: - dependency-name: opentelemetry dependency-type: direct:production update-type: version-update:semver-minor dependency-group: opentelemetry - dependency-name: opentelemetry_sdk dependency-type: direct:production update-type: version-update:semver-minor dependency-group: opentelemetry ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Oliver Gould <ver@buoyant.io>
This commit is contained in:
parent
7b782128a9
commit
d76dda33d6
|
|
@ -2873,9 +2873,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "opentelemetry"
|
||||
version = "0.26.0"
|
||||
version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "570074cc999d1a58184080966e5bd3bf3a9a4af650c3b05047c2621e7405cd17"
|
||||
checksum = "0f3cebff57f7dbd1255b44d8bddc2cebeb0ea677dbaa2e25a3070a91b318f660"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
|
|
@ -2898,9 +2898,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "opentelemetry_sdk"
|
||||
version = "0.26.0"
|
||||
version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2c627d9f4c9cdc1f21a29ee4bfbd6028fcb8bcf2a857b43f3abdf72c9c862f3"
|
||||
checksum = "27b742c1cae4693792cc564e58d75a2a0ba29421a34a85b50da92efa89ecb2bc"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"futures-channel",
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ http-body = "0.4"
|
|||
linkerd-error = { path = "../error" }
|
||||
linkerd-metrics = { path = "../metrics" }
|
||||
linkerd-trace-context = { path = "../trace-context" }
|
||||
opentelemetry = { version = "0.26", default-features = false, features = ["trace"] }
|
||||
opentelemetry_sdk = { version = "0.26", default-features = false, features = ["trace"] }
|
||||
opentelemetry = { version = "0.27", default-features = false, features = ["trace"] }
|
||||
opentelemetry_sdk = { version = "0.27", default-features = false, features = ["trace"] }
|
||||
opentelemetry-proto = { path = "../../opentelemetry-proto" }
|
||||
tonic = { version = "0.10", default-features = false, features = [
|
||||
"prost",
|
||||
|
|
|
|||
|
|
@ -257,6 +257,6 @@ fn convert_span(span: ExportSpan) -> Result<SpanData, Error> {
|
|||
TraceState::NONE,
|
||||
),
|
||||
events: Default::default(),
|
||||
instrumentation_lib: Default::default(),
|
||||
instrumentation_scope: Default::default(),
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ Vendored from https://github.com/open-telemetry/opentelemetry-rust/.
|
|||
[dependencies]
|
||||
tonic = { version = "0.10", features = ["codegen", "prost", "transport"] }
|
||||
prost = "0.12"
|
||||
opentelemetry = { version = "0.26", default-features = false, features = ["trace"] }
|
||||
opentelemetry_sdk = { version = "0.26", default-features = false, features = ["trace"] }
|
||||
opentelemetry = { version = "0.27", default-features = false, features = ["trace"] }
|
||||
opentelemetry_sdk = { version = "0.27", default-features = false, features = ["trace"] }
|
||||
|
||||
[dev-dependencies]
|
||||
opentelemetry = { version = "0.26", default-features = false, features = ["trace", "testing"] }
|
||||
opentelemetry = { version = "0.27", default-features = false, features = ["trace", "testing"] }
|
||||
tonic-build = { version = "0.10", default-features = false, features = ["prost"] }
|
||||
|
||||
[lib]
|
||||
|
|
|
|||
|
|
@ -27,17 +27,17 @@ impl From<&opentelemetry_sdk::Resource> for ResourceAttributesWithSchema {
|
|||
|
||||
impl
|
||||
From<(
|
||||
opentelemetry_sdk::InstrumentationLibrary,
|
||||
opentelemetry::InstrumentationScope,
|
||||
Option<Cow<'static, str>>,
|
||||
)> for InstrumentationScope
|
||||
{
|
||||
fn from(
|
||||
data: (
|
||||
opentelemetry_sdk::InstrumentationLibrary,
|
||||
opentelemetry::InstrumentationScope,
|
||||
Option<Cow<'static, str>>,
|
||||
),
|
||||
) -> Self {
|
||||
let (library, target) = data;
|
||||
let (scope, target) = data;
|
||||
if let Some(t) = target {
|
||||
InstrumentationScope {
|
||||
name: t.to_string(),
|
||||
|
|
@ -46,10 +46,12 @@ impl
|
|||
..Default::default()
|
||||
}
|
||||
} else {
|
||||
let Attributes(attributes) =
|
||||
Attributes::from(scope.attributes().cloned().collect::<Vec<_>>());
|
||||
InstrumentationScope {
|
||||
name: library.name.into_owned(),
|
||||
version: library.version.map(Cow::into_owned).unwrap_or_default(),
|
||||
attributes: Attributes::from(library.attributes).0,
|
||||
name: scope.name().to_string(),
|
||||
version: scope.version().map(ToString::to_string).unwrap_or_default(),
|
||||
attributes,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
|
@ -58,17 +60,17 @@ impl
|
|||
|
||||
impl
|
||||
From<(
|
||||
&opentelemetry_sdk::InstrumentationLibrary,
|
||||
&opentelemetry::InstrumentationScope,
|
||||
Option<Cow<'static, str>>,
|
||||
)> for InstrumentationScope
|
||||
{
|
||||
fn from(
|
||||
data: (
|
||||
&opentelemetry_sdk::InstrumentationLibrary,
|
||||
&opentelemetry::InstrumentationScope,
|
||||
Option<Cow<'static, str>>,
|
||||
),
|
||||
) -> Self {
|
||||
let (library, target) = data;
|
||||
let (scope, target) = data;
|
||||
if let Some(t) = target {
|
||||
InstrumentationScope {
|
||||
name: t.to_string(),
|
||||
|
|
@ -77,14 +79,12 @@ impl
|
|||
..Default::default()
|
||||
}
|
||||
} else {
|
||||
let Attributes(attributes) =
|
||||
Attributes::from(scope.attributes().cloned().collect::<Vec<_>>());
|
||||
InstrumentationScope {
|
||||
name: library.name.to_string(),
|
||||
version: library
|
||||
.version
|
||||
.as_ref()
|
||||
.map(ToString::to_string)
|
||||
.unwrap_or_default(),
|
||||
attributes: Attributes::from(library.attributes.clone()).0,
|
||||
name: scope.name().to_string(),
|
||||
version: scope.version().map(ToString::to_string).unwrap_or_default(),
|
||||
attributes,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
|
@ -121,7 +121,9 @@ impl From<Value> for AnyValue {
|
|||
Array::I64(vals) => array_into_proto(vals),
|
||||
Array::F64(vals) => array_into_proto(vals),
|
||||
Array::String(vals) => array_into_proto(vals),
|
||||
_ => ArrayValue::default(),
|
||||
})),
|
||||
_ => None,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,12 +96,11 @@ impl ResourceSpans {
|
|||
schema_url: resource.schema_url.clone().unwrap_or_default(),
|
||||
scope_spans: vec![ScopeSpans {
|
||||
schema_url: source_span
|
||||
.instrumentation_lib
|
||||
.schema_url
|
||||
.as_ref()
|
||||
.instrumentation_scope
|
||||
.schema_url()
|
||||
.map(ToString::to_string)
|
||||
.unwrap_or_default(),
|
||||
scope: Some((source_span.instrumentation_lib, None).into()),
|
||||
scope: Some((source_span.instrumentation_scope, None).into()),
|
||||
spans: vec![Span {
|
||||
trace_id: source_span.span_context.trace_id().to_bytes().to_vec(),
|
||||
span_id: source_span.span_context.span_id().to_bytes().to_vec(),
|
||||
|
|
@ -153,9 +152,8 @@ pub fn group_spans_by_resource_and_scope(
|
|||
// Group spans by their instrumentation library
|
||||
let scope_map = spans.iter().fold(
|
||||
HashMap::new(),
|
||||
|mut scope_map: HashMap<&opentelemetry_sdk::InstrumentationLibrary, Vec<&SpanData>>,
|
||||
span| {
|
||||
let instrumentation = &span.instrumentation_lib;
|
||||
|mut scope_map: HashMap<&opentelemetry::InstrumentationScope, Vec<&SpanData>>, span| {
|
||||
let instrumentation = &span.instrumentation_scope;
|
||||
scope_map.entry(instrumentation).or_default().push(span);
|
||||
scope_map
|
||||
},
|
||||
|
|
@ -192,11 +190,10 @@ mod tests {
|
|||
use opentelemetry::trace::{
|
||||
SpanContext, SpanId, SpanKind, Status, TraceFlags, TraceId, TraceState,
|
||||
};
|
||||
use opentelemetry::KeyValue;
|
||||
use opentelemetry::{InstrumentationScope, KeyValue};
|
||||
use opentelemetry_sdk::export::trace::SpanData;
|
||||
use opentelemetry_sdk::resource::Resource;
|
||||
use opentelemetry_sdk::trace::{SpanEvents, SpanLinks};
|
||||
use opentelemetry_sdk::InstrumentationLibrary;
|
||||
use std::borrow::Cow;
|
||||
use std::time::{Duration, SystemTime};
|
||||
|
||||
|
|
@ -221,7 +218,7 @@ mod tests {
|
|||
events: SpanEvents::default(),
|
||||
links: SpanLinks::default(),
|
||||
status: Status::Unset,
|
||||
instrumentation_lib: InstrumentationLibrary::builder(instrumentation_name).build(),
|
||||
instrumentation_scope: InstrumentationScope::builder(instrumentation_name).build(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue