@@ -16,7 +16,7 @@ use opentelemetry_semantic_conventions::resource::{
1616use protobuf:: { rt:: WireType , CodedOutputStream , Message } ;
1717use saluki_common:: task:: HandleExt as _;
1818use saluki_config:: GenericConfiguration ;
19- use saluki_context:: tags:: TagSet ;
19+ use saluki_context:: tags:: { SharedTagSet , TagSet } ;
2020use saluki_core:: data_model:: event:: trace:: {
2121 AttributeScalarValue , AttributeValue , Span as DdSpan , SpanEvent as DdSpanEvent , SpanLink as DdSpanLink ,
2222} ;
@@ -774,12 +774,12 @@ fn write_map_entry_string_string(
774774 Ok ( ( ) )
775775}
776776
777- fn get_resource_tag_value < ' a > ( resource_tags : & ' a TagSet , key : & str ) -> Option < & ' a str > {
777+ fn get_resource_tag_value < ' a > ( resource_tags : & ' a SharedTagSet , key : & str ) -> Option < & ' a str > {
778778 resource_tags. get_single_tag ( key) . and_then ( |t| t. value ( ) )
779779}
780780
781781fn resolve_hostname < ' a > (
782- resource_tags : & ' a TagSet , source : Option < & ' a OtlpSource > , default_hostname : Option < & ' a str > ,
782+ resource_tags : & ' a SharedTagSet , source : Option < & ' a OtlpSource > , default_hostname : Option < & ' a str > ,
783783 ignore_missing_fields : bool ,
784784) -> Option < & ' a str > {
785785 let mut hostname = match source {
@@ -801,7 +801,7 @@ fn resolve_hostname<'a>(
801801 hostname
802802}
803803
804- fn resolve_env ( resource_tags : & TagSet , ignore_missing_fields : bool ) -> Option < & str > {
804+ fn resolve_env ( resource_tags : & SharedTagSet , ignore_missing_fields : bool ) -> Option < & str > {
805805 if let Some ( value) = get_resource_tag_value ( resource_tags, KEY_DATADOG_ENVIRONMENT ) {
806806 return Some ( value) ;
807807 }
@@ -814,7 +814,7 @@ fn resolve_env(resource_tags: &TagSet, ignore_missing_fields: bool) -> Option<&s
814814 get_resource_tag_value ( resource_tags, DEPLOYMENT_ENVIRONMENT_KEY )
815815}
816816
817- fn resolve_container_id < ' a > ( resource_tags : & ' a TagSet , first_span : Option < & ' a DdSpan > ) -> Option < & ' a str > {
817+ fn resolve_container_id < ' a > ( resource_tags : & ' a SharedTagSet , first_span : Option < & ' a DdSpan > ) -> Option < & ' a str > {
818818 for key in [ KEY_DATADOG_CONTAINER_ID , CONTAINER_ID , K8S_POD_UID ] {
819819 if let Some ( value) = get_resource_tag_value ( resource_tags, key) {
820820 return Some ( value) ;
@@ -832,15 +832,15 @@ fn resolve_container_id<'a>(resource_tags: &'a TagSet, first_span: Option<&'a Dd
832832 None
833833}
834834
835- fn resolve_app_version ( resource_tags : & TagSet ) -> Option < & str > {
835+ fn resolve_app_version ( resource_tags : & SharedTagSet ) -> Option < & str > {
836836 if let Some ( value) = get_resource_tag_value ( resource_tags, KEY_DATADOG_VERSION ) {
837837 return Some ( value) ;
838838 }
839839 get_resource_tag_value ( resource_tags, SERVICE_VERSION )
840840}
841841
842842fn resolve_container_tags (
843- resource_tags : & TagSet , source : Option < & OtlpSource > , ignore_missing_fields : bool ,
843+ resource_tags : & SharedTagSet , source : Option < & OtlpSource > , ignore_missing_fields : bool ,
844844) -> Option < MetaString > {
845845 // TODO: some refactoring is probably needed to normalize this function, the tags should already be normalized
846846 // since we do so when we transform OTLP spans to DD spans however to make this class extensible for non otlp traces, we would
0 commit comments