You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a requirement for a custom counter that needs to go up and down over time to track a domain metric. As it stands, .NET currently only offers a monotonic Counter object, with the UpDownCounter counterpart planned for a future update.
I tried to still use the standard .NET Counter with positive and negative delta values but I can see that Datadog doesn't really like it, and only shows increments in the metrics explorer.
To overcome this issue temporarily and still have a way to comply with my requirements, I had the following idea:
instead of having an available_instances counter that increments and decrements over time as instance objects are manipulated in my API, I could break it down into 2 counters, added_instances and removed_instances, and then use metric arithmetic in Datadog to compute the difference between the sum of the 2 metrics to achieve my "available instances" requirement.
From what I can tell, this should work just fine: I double checked the capabilities in the Datadog documentation regarding metric arithmetic and made a few tests, and I don't foresee any problems pushing 2 monotonically incrementing counters into DD or DD Agent.
Is there something critical I'm missing here that could impact my plans, or should it be fine to split what is technically an UpDownCounter instance into 2 monotonic Counter instances?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a requirement for a custom counter that needs to go up and down over time to track a domain metric. As it stands, .NET currently only offers a monotonic
Counter
object, with theUpDownCounter
counterpart planned for a future update.I tried to still use the standard .NET
Counter
with positive and negative delta values but I can see that Datadog doesn't really like it, and only shows increments in the metrics explorer.To overcome this issue temporarily and still have a way to comply with my requirements, I had the following idea:
available_instances
counter that increments and decrements over time as instance objects are manipulated in my API, I could break it down into 2 counters,added_instances
andremoved_instances
, and then use metric arithmetic in Datadog to compute the difference between the sum of the 2 metrics to achieve my "available instances" requirement.From what I can tell, this should work just fine: I double checked the capabilities in the Datadog documentation regarding metric arithmetic and made a few tests, and I don't foresee any problems pushing 2 monotonically incrementing counters into DD or DD Agent.
Is there something critical I'm missing here that could impact my plans, or should it be fine to split what is technically an
UpDownCounter
instance into 2 monotonicCounter
instances?Beta Was this translation helpful? Give feedback.
All reactions