@@ -116,7 +116,9 @@ use opentelemetry::{
116
116
InstrumentationScope , Key ,
117
117
} ;
118
118
#[ cfg( feature = "experimental_metadata_attributes" ) ]
119
- use opentelemetry_semantic_conventions:: attribute:: { CODE_FILEPATH , CODE_LINENO , CODE_NAMESPACE } ;
119
+ use opentelemetry_semantic_conventions:: attribute:: {
120
+ CODE_FILEPATH , CODE_LINE_NUMBER , CODE_NAMESPACE ,
121
+ } ;
120
122
121
123
pub struct OpenTelemetryLogBridge < P , L >
122
124
where
@@ -158,7 +160,7 @@ where
158
160
}
159
161
160
162
if let Some ( line_no) = record. line ( ) {
161
- log_record. add_attribute ( Key :: new ( CODE_LINENO ) , AnyValue :: from ( line_no) ) ;
163
+ log_record. add_attribute ( Key :: new ( CODE_LINE_NUMBER ) , AnyValue :: from ( line_no) ) ;
162
164
}
163
165
164
166
if let Some ( module) = record. module_path ( ) {
@@ -1171,7 +1173,7 @@ mod tests {
1171
1173
#[ test]
1172
1174
fn logbridge_code_attributes ( ) {
1173
1175
use opentelemetry_semantic_conventions:: attribute:: {
1174
- CODE_FILEPATH , CODE_LINENO , CODE_NAMESPACE ,
1176
+ CODE_FILEPATH , CODE_LINE_NUMBER , CODE_NAMESPACE ,
1175
1177
} ;
1176
1178
1177
1179
let exporter = InMemoryLogExporter :: default ( ) ;
@@ -1212,7 +1214,7 @@ mod tests {
1212
1214
Some ( AnyValue :: String ( StringValue :: from( "service" ) ) ) ,
1213
1215
get( CODE_NAMESPACE )
1214
1216
) ;
1215
- assert_eq ! ( Some ( AnyValue :: Int ( 101 ) ) , get( CODE_LINENO ) ) ;
1217
+ assert_eq ! ( Some ( AnyValue :: Int ( 101 ) ) , get( CODE_LINE_NUMBER ) ) ;
1216
1218
}
1217
1219
1218
1220
#[ test]
0 commit comments