Skip to content

Commit 5b25740

Browse files
authored
Merge branch 'open-telemetry:main' into patch
2 parents 55799ee + 9cdc931 commit 5b25740

File tree

11 files changed

+723
-28
lines changed

11 files changed

+723
-28
lines changed

opentelemetry-appender-log/src/lib.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ use opentelemetry::{
117117
};
118118
#[cfg(feature = "experimental_metadata_attributes")]
119119
use opentelemetry_semantic_conventions::attribute::{
120-
CODE_FILEPATH, CODE_LINE_NUMBER, CODE_NAMESPACE,
120+
CODE_FILE_PATH, CODE_FUNCTION_NAME, CODE_LINE_NUMBER,
121121
};
122122

123123
pub struct OpenTelemetryLogBridge<P, L>
@@ -156,7 +156,7 @@ where
156156
{
157157
if let Some(filepath) = record.file() {
158158
log_record.add_attribute(
159-
Key::new(CODE_FILEPATH),
159+
Key::new(CODE_FILE_PATH),
160160
AnyValue::from(filepath.to_string()),
161161
);
162162
}
@@ -167,7 +167,7 @@ where
167167

168168
if let Some(module) = record.module_path() {
169169
log_record.add_attribute(
170-
Key::new(CODE_NAMESPACE),
170+
Key::new(CODE_FUNCTION_NAME),
171171
AnyValue::from(module.to_string()),
172172
);
173173
}
@@ -1180,7 +1180,7 @@ mod tests {
11801180
#[test]
11811181
fn logbridge_code_attributes() {
11821182
use opentelemetry_semantic_conventions::attribute::{
1183-
CODE_FILEPATH, CODE_LINE_NUMBER, CODE_NAMESPACE,
1183+
CODE_FILE_PATH, CODE_FUNCTION_NAME, CODE_LINE_NUMBER,
11841184
};
11851185

11861186
let exporter = InMemoryLogExporter::default();
@@ -1219,11 +1219,11 @@ mod tests {
12191219

12201220
assert_eq!(
12211221
Some(AnyValue::String(StringValue::from("src/main.rs"))),
1222-
get(CODE_FILEPATH)
1222+
get(CODE_FILE_PATH)
12231223
);
12241224
assert_eq!(
12251225
Some(AnyValue::String(StringValue::from("service"))),
1226-
get(CODE_NAMESPACE)
1226+
get(CODE_FUNCTION_NAME)
12271227
);
12281228
assert_eq!(Some(AnyValue::Int(101)), get(CODE_LINE_NUMBER));
12291229
}

opentelemetry-semantic-conventions/CHANGELOG.md

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

33
## vNext
44

5+
- Update to [v1.32.0](https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.32.0) of the semantic conventions.
6+
57
## 0.29.0
68

79
Released 2025-Mar-21

opentelemetry-semantic-conventions/scripts/generate-consts-from-spec.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
55
CRATE_DIR="${SCRIPT_DIR}/../"
66

77
# freeze the spec version and generator version to make generation reproducible
8-
SPEC_VERSION=1.31.0
9-
WEAVER_VERSION=v0.13.0
8+
SPEC_VERSION=1.32.0
9+
WEAVER_VERSION=v0.13.2
1010

1111
cd "$CRATE_DIR"
1212

opentelemetry-semantic-conventions/scripts/templates/registry/rust/attribute.rs.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#[cfg(feature = "semconv_experimental")]
1919
{% endif %}
2020
{% if attr is deprecated %}
21-
#[deprecated(note="{{ attr.deprecated.strip(" \n\"") }}")]
21+
#[deprecated(note="{{ attr.deprecated | replace('\n', ' ') | replace('"', '') | trim }}")]
2222
{% endif %}
2323
pub const {{ attr.name | screaming_snake_case }}: &str = "{{ attr.name }}";
2424

opentelemetry-semantic-conventions/scripts/templates/registry/rust/metric.rs.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
#[cfg(feature = "semconv_experimental")]
7272
{% endif %}
7373
{% if metric is deprecated %}
74-
#[deprecated(note="{{ metric.deprecated.strip(" \n\"") }}")]
74+
#[deprecated(note="{{ metric.deprecated | replace('"', '') | replace('\n', ' ') | trim }}")]
7575
{% endif %}
7676
pub const {{ metric.metric_name | screaming_snake_case }}: &str = "{{ metric.metric_name }}";
7777

opentelemetry-semantic-conventions/scripts/templates/registry/rust/weaver.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ comment_formats:
1414
default_comment_format: rust
1515

1616
params:
17-
schema_url: "https://opentelemetry.io/schemas/1.31.0"
17+
schema_url: "https://opentelemetry.io/schemas/1.32.0"
1818
exclude_root_namespace: []
1919
excluded_attributes: ["messaging.client_id"]
2020

0 commit comments

Comments
 (0)