@@ -89,18 +89,6 @@ fn build_resource(resource_info: &OtlpResourceInfo) -> Resource {
8989 value : AnyValue :: StringValue ( resource_info. runtime_id . clone ( ) ) ,
9090 } ) ;
9191 }
92- if !resource_info. git_commit_sha . is_empty ( ) {
93- attributes. push ( KeyValue {
94- key : "git.commit.sha" . to_string ( ) ,
95- value : AnyValue :: StringValue ( resource_info. git_commit_sha . clone ( ) ) ,
96- } ) ;
97- }
98- if !resource_info. git_repository_url . is_empty ( ) {
99- attributes. push ( KeyValue {
100- key : "git.repository_url" . to_string ( ) ,
101- value : AnyValue :: StringValue ( resource_info. git_repository_url . clone ( ) ) ,
102- } ) ;
103- }
10492 Resource { attributes }
10593}
10694
@@ -211,7 +199,7 @@ fn map_span_events<T: TraceData>(events: &[SpanEvent<T>]) -> (Vec<OtlpSpanEvent>
211199 let attributes: Vec < KeyValue > = ev
212200 . attributes
213201 . iter ( )
214- . filter_map ( |( k, v) | event_attr_to_key_value ( k, v) )
202+ . map ( |( k, v) | event_attr_to_key_value ( k, v) )
215203 . collect ( ) ;
216204 otlp_events. push ( OtlpSpanEvent {
217205 time_unix_nano : ev. time_unix_nano . to_string ( ) ,
@@ -227,7 +215,7 @@ fn map_span_events<T: TraceData>(events: &[SpanEvent<T>]) -> (Vec<OtlpSpanEvent>
227215fn event_attr_to_key_value < T : TraceData > (
228216 k : & T :: Text ,
229217 v : & crate :: span:: v04:: AttributeAnyValue < T > ,
230- ) -> Option < KeyValue > {
218+ ) -> KeyValue {
231219 use crate :: span:: v04:: AttributeArrayValue ;
232220 let value = match v {
233221 crate :: span:: v04:: AttributeAnyValue :: SingleValue ( av) => match av {
@@ -249,10 +237,10 @@ fn event_attr_to_key_value<T: TraceData>(
249237 AnyValue :: ArrayValue ( crate :: otlp_encoder:: json_types:: ArrayValue { values } )
250238 }
251239 } ;
252- Some ( KeyValue {
240+ KeyValue {
253241 key : k. borrow ( ) . to_string ( ) ,
254242 value,
255- } )
243+ }
256244}
257245
258246/// Maps the explicit "span.kind" meta tag (set by OTEL-instrumented tracers) to an OTLP SpanKind.
0 commit comments