| tried something like this :
Map<String,String>tags =new HashMap<String,String>();
tags.putAll(MetricsTag.defaultTags("default")); //get the well know tags
tags.put("customtagname1","defaultValue4tag1");
tags.put("customtagname2","defaultValue4tag2");
tags.put("customtagname3","defaultValue4tag3");
Scope scope = new RootScopeBuilder().reporter(
reporter).tags(new ImmutableMap<String, String>(tags)))
.reportEvery(com.uber.m3.util.Duration.ofSeconds(config.getMetricPushIntervalInSeconds()));
-> with this i see that customtagname1, customtagname2, customtagname3 with default value gets appened to all metrics, which is great.
Now i tried doing this in my workflow
-----------Actual workflow Impl code -----------
WorkflowImpl {
workflowMethod () {
Map<String, String> tags =
new ImmutableMap.Builder<String, String>(2).put(“customtagname1”, “a”)
.put(“customtagname2”, “b”)
.build();
Workflow.getMetricsScope().tagged(new HashMap<String, String>(tags));
//do rest of workflow stuff..
}
}
However i donot see my tag values getting reflected when i run this workflow.( this code is very similar to what temporal does inside GRPCMetricInterceptor)
am i missing something?