Skip to content

Commit a2ce4f0

Browse files
committed
Cleanup legacy semconv tags
this may be a breaking change
1 parent 9e6cae0 commit a2ce4f0

File tree

5 files changed

+1
-19
lines changed

5 files changed

+1
-19
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ use tracing_subscriber::layer::SubscriberExt;
1414
use opentelemetry::trace::TracerProvider as _;
1515
pub use opentelemetry::{global, Array, Context, Key, KeyValue, StringValue, Value};
1616
pub use opentelemetry_sdk::trace::TracerProvider;
17+
pub use opentelemetry_semantic_conventions::attribute as semconv;
1718
pub use tracing_opentelemetry::{OpenTelemetryLayer, OpenTelemetrySpanExt};
1819

1920
pub mod http;
2021
pub mod middleware;
2122
pub mod otlp;
2223
pub mod propagation;
23-
pub mod semconv;
2424

2525
#[cfg(feature = "axum")]
2626
pub use tracing_opentelemetry_instrumentation_sdk;

src/middleware/aws/operations/dynamodb.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ impl<'a> AwsSpanBuilder<'a> {
1515
let mut attributes = vec![
1616
KeyValue::new(semconv::DB_SYSTEM, "dynamodb"),
1717
KeyValue::new(semconv::DB_OPERATION_NAME, method.clone()),
18-
KeyValue::new(semconv::legacy::DB_OPERATION, method.clone()),
1918
];
2019
match table_names.len() {
2120
0 => {}
2221
1 => {
2322
attributes.extend([
2423
KeyValue::new(semconv::DB_NAMESPACE, table_names[0].clone()),
25-
KeyValue::new(semconv::legacy::DB_NAME, table_names[0].clone()),
2624
Key::new(semconv::AWS_DYNAMODB_TABLE_NAMES).array(table_names),
2725
]);
2826
}
@@ -73,7 +71,6 @@ macro_rules! dynamodb_table_arn_operation {
7371
)
7472
.attributes(vec![
7573
KeyValue::new(semconv::DB_NAMESPACE, table_arn.clone()),
76-
KeyValue::new(semconv::legacy::DB_NAME, table_arn),
7774
])
7875
}
7976
}

src/middleware/aws/operations/firehose.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ impl<'a> AwsSpanBuilder<'a> {
1313
let mut attributes = vec![
1414
KeyValue::new(semconv::MESSAGING_SYSTEM, "aws_firehose"),
1515
KeyValue::new(semconv::MESSAGING_OPERATION_TYPE, operation_kind.as_str()),
16-
KeyValue::new(
17-
semconv::legacy::MESSAGING_OPERATION,
18-
operation_kind.as_str(),
19-
),
2016
];
2117
if let Some(stream_name) = stream_name {
2218
attributes.push(KeyValue::new(

src/middleware/aws/operations/sns.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ impl<'a> AwsSpanBuilder<'a> {
1313
let mut attributes = vec![
1414
KeyValue::new(semconv::MESSAGING_SYSTEM, "aws_sns"),
1515
KeyValue::new(semconv::MESSAGING_OPERATION_TYPE, operation_kind.as_str()),
16-
KeyValue::new(
17-
semconv::legacy::MESSAGING_OPERATION,
18-
operation_kind.as_str(),
19-
),
2016
];
2117
if let Some(topic_arn) = topic_arn {
2218
attributes.push(KeyValue::new(

src/semconv.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
11
pub use opentelemetry_semantic_conventions::attribute::*;
2-
3-
#[allow(deprecated)]
4-
pub mod legacy {
5-
pub const DB_NAME: &str = super::DB_NAME;
6-
pub const DB_OPERATION: &str = super::DB_OPERATION;
7-
pub const MESSAGING_OPERATION: &str = super::MESSAGING_OPERATION;
8-
}

0 commit comments

Comments
 (0)