Skip to content

Commit 16c69ea

Browse files
committed
lint
1 parent 9a49a82 commit 16c69ea

File tree

1 file changed

+4
-4
lines changed
  • opentelemetry-appender-log/src

1 file changed

+4
-4
lines changed

opentelemetry-appender-log/src/lib.rs

Lines changed: 4 additions & 4 deletions
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_FILE_PATH, CODE_LINE_NUMBER, CODE_NAMESPACE,
120+
CODE_FILE_PATH, CODE_FUNCTION_NAME, CODE_LINE_NUMBER,
121121
};
122122

123123
pub struct OpenTelemetryLogBridge<P, L>
@@ -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_FILE_PATH, CODE_LINE_NUMBER, CODE_NAMESPACE,
1183+
CODE_FILE_PATH, CODE_FUNCTION_NAME, CODE_LINE_NUMBER,
11841184
};
11851185

11861186
let exporter = InMemoryLogExporter::default();
@@ -1223,7 +1223,7 @@ mod tests {
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
}

0 commit comments

Comments
 (0)