@@ -63,8 +63,13 @@ impl Lambda {
6363
6464 /// Sets the `durable_function:true` tag in `dynamic_value_tags`
6565 pub fn set_durable_function_tag ( & mut self ) {
66+ debug ! ( "Enhanced metrics: inserting durable_function:true into dynamic_value_tags" ) ;
6667 self . dynamic_value_tags
6768 . insert ( String :: from ( "durable_function" ) , String :: from ( "true" ) ) ;
69+ debug ! (
70+ "Enhanced metrics: dynamic_value_tags after set_durable_function_tag: {:?}" ,
71+ self . dynamic_value_tags
72+ ) ;
6873 }
6974
7075 fn get_dynamic_value_tags ( & self ) -> Option < SortedTags > {
@@ -76,6 +81,11 @@ impl Lambda {
7681
7782 let string_tags = vec_tags. join ( "," ) ;
7883
84+ debug ! (
85+ "Enhanced metrics: get_dynamic_value_tags returning tag string: {:?}" ,
86+ string_tags
87+ ) ;
88+
7989 SortedTags :: parse ( & string_tags) . ok ( )
8090 }
8191
@@ -152,10 +162,15 @@ impl Lambda {
152162 if !self . config . enhanced_metrics {
153163 return ;
154164 }
165+ debug ! (
166+ "Enhanced metrics: creating metric '{}' with dynamic_value_tags: {:?}" ,
167+ metric_name, self . dynamic_value_tags
168+ ) ;
169+ let tags = self . get_dynamic_value_tags ( ) ;
155170 let metric = Metric :: new (
156171 metric_name. into ( ) ,
157172 MetricValue :: distribution ( 1f64 ) ,
158- self . get_dynamic_value_tags ( ) ,
173+ tags ,
159174 Some ( timestamp) ,
160175 ) ;
161176 if let Err ( e) = self . aggr_handle . insert_batch ( vec ! [ metric] ) {
0 commit comments