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]]
|
[[package]]
|
||||||
name = "opentelemetry"
|
name = "opentelemetry"
|
||||||
version = "0.26.0"
|
version = "0.27.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "570074cc999d1a58184080966e5bd3bf3a9a4af650c3b05047c2621e7405cd17"
|
checksum = "0f3cebff57f7dbd1255b44d8bddc2cebeb0ea677dbaa2e25a3070a91b318f660"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-sink",
|
"futures-sink",
|
||||||
|
|
@ -2898,9 +2898,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "opentelemetry_sdk"
|
name = "opentelemetry_sdk"
|
||||||
version = "0.26.0"
|
version = "0.27.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d2c627d9f4c9cdc1f21a29ee4bfbd6028fcb8bcf2a857b43f3abdf72c9c862f3"
|
checksum = "27b742c1cae4693792cc564e58d75a2a0ba29421a34a85b50da92efa89ecb2bc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ http-body = "0.4"
|
||||||
linkerd-error = { path = "../error" }
|
linkerd-error = { path = "../error" }
|
||||||
linkerd-metrics = { path = "../metrics" }
|
linkerd-metrics = { path = "../metrics" }
|
||||||
linkerd-trace-context = { path = "../trace-context" }
|
linkerd-trace-context = { path = "../trace-context" }
|
||||||
opentelemetry = { version = "0.26", default-features = false, features = ["trace"] }
|
opentelemetry = { version = "0.27", default-features = false, features = ["trace"] }
|
||||||
opentelemetry_sdk = { version = "0.26", default-features = false, features = ["trace"] }
|
opentelemetry_sdk = { version = "0.27", default-features = false, features = ["trace"] }
|
||||||
opentelemetry-proto = { path = "../../opentelemetry-proto" }
|
opentelemetry-proto = { path = "../../opentelemetry-proto" }
|
||||||
tonic = { version = "0.10", default-features = false, features = [
|
tonic = { version = "0.10", default-features = false, features = [
|
||||||
"prost",
|
"prost",
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,6 @@ fn convert_span(span: ExportSpan) -> Result<SpanData, Error> {
|
||||||
TraceState::NONE,
|
TraceState::NONE,
|
||||||
),
|
),
|
||||||
events: Default::default(),
|
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]
|
[dependencies]
|
||||||
tonic = { version = "0.10", features = ["codegen", "prost", "transport"] }
|
tonic = { version = "0.10", features = ["codegen", "prost", "transport"] }
|
||||||
prost = "0.12"
|
prost = "0.12"
|
||||||
opentelemetry = { version = "0.26", default-features = false, features = ["trace"] }
|
opentelemetry = { version = "0.27", default-features = false, features = ["trace"] }
|
||||||
opentelemetry_sdk = { version = "0.26", default-features = false, features = ["trace"] }
|
opentelemetry_sdk = { version = "0.27", default-features = false, features = ["trace"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[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"] }
|
tonic-build = { version = "0.10", default-features = false, features = ["prost"] }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
||||||
|
|
@ -27,17 +27,17 @@ impl From<&opentelemetry_sdk::Resource> for ResourceAttributesWithSchema {
|
||||||
|
|
||||||
impl
|
impl
|
||||||
From<(
|
From<(
|
||||||
opentelemetry_sdk::InstrumentationLibrary,
|
opentelemetry::InstrumentationScope,
|
||||||
Option<Cow<'static, str>>,
|
Option<Cow<'static, str>>,
|
||||||
)> for InstrumentationScope
|
)> for InstrumentationScope
|
||||||
{
|
{
|
||||||
fn from(
|
fn from(
|
||||||
data: (
|
data: (
|
||||||
opentelemetry_sdk::InstrumentationLibrary,
|
opentelemetry::InstrumentationScope,
|
||||||
Option<Cow<'static, str>>,
|
Option<Cow<'static, str>>,
|
||||||
),
|
),
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let (library, target) = data;
|
let (scope, target) = data;
|
||||||
if let Some(t) = target {
|
if let Some(t) = target {
|
||||||
InstrumentationScope {
|
InstrumentationScope {
|
||||||
name: t.to_string(),
|
name: t.to_string(),
|
||||||
|
|
@ -46,10 +46,12 @@ impl
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
let Attributes(attributes) =
|
||||||
|
Attributes::from(scope.attributes().cloned().collect::<Vec<_>>());
|
||||||
InstrumentationScope {
|
InstrumentationScope {
|
||||||
name: library.name.into_owned(),
|
name: scope.name().to_string(),
|
||||||
version: library.version.map(Cow::into_owned).unwrap_or_default(),
|
version: scope.version().map(ToString::to_string).unwrap_or_default(),
|
||||||
attributes: Attributes::from(library.attributes).0,
|
attributes,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -58,17 +60,17 @@ impl
|
||||||
|
|
||||||
impl
|
impl
|
||||||
From<(
|
From<(
|
||||||
&opentelemetry_sdk::InstrumentationLibrary,
|
&opentelemetry::InstrumentationScope,
|
||||||
Option<Cow<'static, str>>,
|
Option<Cow<'static, str>>,
|
||||||
)> for InstrumentationScope
|
)> for InstrumentationScope
|
||||||
{
|
{
|
||||||
fn from(
|
fn from(
|
||||||
data: (
|
data: (
|
||||||
&opentelemetry_sdk::InstrumentationLibrary,
|
&opentelemetry::InstrumentationScope,
|
||||||
Option<Cow<'static, str>>,
|
Option<Cow<'static, str>>,
|
||||||
),
|
),
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let (library, target) = data;
|
let (scope, target) = data;
|
||||||
if let Some(t) = target {
|
if let Some(t) = target {
|
||||||
InstrumentationScope {
|
InstrumentationScope {
|
||||||
name: t.to_string(),
|
name: t.to_string(),
|
||||||
|
|
@ -77,14 +79,12 @@ impl
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
let Attributes(attributes) =
|
||||||
|
Attributes::from(scope.attributes().cloned().collect::<Vec<_>>());
|
||||||
InstrumentationScope {
|
InstrumentationScope {
|
||||||
name: library.name.to_string(),
|
name: scope.name().to_string(),
|
||||||
version: library
|
version: scope.version().map(ToString::to_string).unwrap_or_default(),
|
||||||
.version
|
attributes,
|
||||||
.as_ref()
|
|
||||||
.map(ToString::to_string)
|
|
||||||
.unwrap_or_default(),
|
|
||||||
attributes: Attributes::from(library.attributes.clone()).0,
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -121,7 +121,9 @@ impl From<Value> for AnyValue {
|
||||||
Array::I64(vals) => array_into_proto(vals),
|
Array::I64(vals) => array_into_proto(vals),
|
||||||
Array::F64(vals) => array_into_proto(vals),
|
Array::F64(vals) => array_into_proto(vals),
|
||||||
Array::String(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(),
|
schema_url: resource.schema_url.clone().unwrap_or_default(),
|
||||||
scope_spans: vec![ScopeSpans {
|
scope_spans: vec![ScopeSpans {
|
||||||
schema_url: source_span
|
schema_url: source_span
|
||||||
.instrumentation_lib
|
.instrumentation_scope
|
||||||
.schema_url
|
.schema_url()
|
||||||
.as_ref()
|
|
||||||
.map(ToString::to_string)
|
.map(ToString::to_string)
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
scope: Some((source_span.instrumentation_lib, None).into()),
|
scope: Some((source_span.instrumentation_scope, None).into()),
|
||||||
spans: vec![Span {
|
spans: vec![Span {
|
||||||
trace_id: source_span.span_context.trace_id().to_bytes().to_vec(),
|
trace_id: source_span.span_context.trace_id().to_bytes().to_vec(),
|
||||||
span_id: source_span.span_context.span_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
|
// Group spans by their instrumentation library
|
||||||
let scope_map = spans.iter().fold(
|
let scope_map = spans.iter().fold(
|
||||||
HashMap::new(),
|
HashMap::new(),
|
||||||
|mut scope_map: HashMap<&opentelemetry_sdk::InstrumentationLibrary, Vec<&SpanData>>,
|
|mut scope_map: HashMap<&opentelemetry::InstrumentationScope, Vec<&SpanData>>, span| {
|
||||||
span| {
|
let instrumentation = &span.instrumentation_scope;
|
||||||
let instrumentation = &span.instrumentation_lib;
|
|
||||||
scope_map.entry(instrumentation).or_default().push(span);
|
scope_map.entry(instrumentation).or_default().push(span);
|
||||||
scope_map
|
scope_map
|
||||||
},
|
},
|
||||||
|
|
@ -192,11 +190,10 @@ mod tests {
|
||||||
use opentelemetry::trace::{
|
use opentelemetry::trace::{
|
||||||
SpanContext, SpanId, SpanKind, Status, TraceFlags, TraceId, TraceState,
|
SpanContext, SpanId, SpanKind, Status, TraceFlags, TraceId, TraceState,
|
||||||
};
|
};
|
||||||
use opentelemetry::KeyValue;
|
use opentelemetry::{InstrumentationScope, KeyValue};
|
||||||
use opentelemetry_sdk::export::trace::SpanData;
|
use opentelemetry_sdk::export::trace::SpanData;
|
||||||
use opentelemetry_sdk::resource::Resource;
|
use opentelemetry_sdk::resource::Resource;
|
||||||
use opentelemetry_sdk::trace::{SpanEvents, SpanLinks};
|
use opentelemetry_sdk::trace::{SpanEvents, SpanLinks};
|
||||||
use opentelemetry_sdk::InstrumentationLibrary;
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::time::{Duration, SystemTime};
|
use std::time::{Duration, SystemTime};
|
||||||
|
|
||||||
|
|
@ -221,7 +218,7 @@ mod tests {
|
||||||
events: SpanEvents::default(),
|
events: SpanEvents::default(),
|
||||||
links: SpanLinks::default(),
|
links: SpanLinks::default(),
|
||||||
status: Status::Unset,
|
status: Status::Unset,
|
||||||
instrumentation_lib: InstrumentationLibrary::builder(instrumentation_name).build(),
|
instrumentation_scope: InstrumentationScope::builder(instrumentation_name).build(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue