Skip to content

Add EventSource/EventCounter tracing and metrics for Caching #36560

@analogrelay

Description

@analogrelay

Some events listed below. The goal is to add events that will help users solve problems so if these aren't going to do that job, feel free to suggest/discuss others!

  • Microsoft.Extensions.Caching.Memory EventSource

    • cache-hits event & counter - Triggered when a cache lookup succeeds.
    • cache-misses event & counter - Triggered when a cache lookup fails.
    • cache-count counter - Counts the number of items in the cache
    • estimated-size counter - Counts the number of bytes based on Size values? (which are opt-in and estimates already)
  • Microsoft.Extensions.Caching.Distributed EventSource

    • cache-hits event & counter - Triggered when a cache lookup succeeds.
    • cache-misses event & counter - Triggered when a cache lookup fails.
    • Size and count should be tracked on the server/service providing the cache.

See https://gist.github.com/anurse/af1859663ac91c6cf69c820cebe92303 for some guidance on adding EventSources and EventCounters to ASP.NET projects. This is out of date.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions