ZiggyCreatures / FusionCache

FusionCache is an easy to use, fast and robust hybrid cache with advanced resiliency features.
MIT License
1.65k stars 87 forks source link

Add the evict reason as a metric tag so we can categorize the evict reason. #195

Closed JoeShook closed 7 months ago

JoeShook commented 7 months ago

I mentioned adding the reason tag in the OpenTelemetry support discussion. It may have gotten lost in the naming discussion that took over my comment.

Seems like a reasonable addition. What do you think? I used it in my plugin and in many working code deployments.

Thank you.

jodydonetti commented 7 months ago

Hi Joe, nice idea! We have to be careful when adding tags to metrics, since the ones with a high cardinality will slow down APM systems and/or make the bill higher (that's something I recently learned).

In this case though, the possible values are very limited so it LGTM, I just changed slightly the string identifier to be more aligned with an existing one.

What do you think?

JoeShook commented 7 months ago

That looks great!

jodydonetti commented 6 months ago

Hi all, I just released v1.0.0-preview1 🥳

Please try it out so we can spot any potential issue before the official v1.0, thanks!