need to do the following: ``` val counterWithTwoTa...
# getting-started
m
need to do the following:
Copy code
val counterWithTwoTags = metric.counterTwoTags("my.counter.name", "key1", "key2")
try{
  someHttpCall()
  counterWithTwoTags("value1", "value2")
catch(Exception e) {
  counterWithTwoTags("errorValue1", "errorValue2")
}
I want to make sure that the
name
for the counter remains immutable, but the the value is not. I was thinking that companion objects was the right way, but this seems more like for static methods.
j
Maybe I’m missing something, but couldn’t you just make name a
val
while value is a
var
?
m
thanks for following up Jonathan. Perhaps, I was thinking more of
java
the parameter as an object - since it's a key/pair. Maybe a
Pair
?
but I want to be able to change the value