Elastic.Apm.StackExchange.Redis Instrumentation Does Not Report Keys

Kibana version:
7.9.2

Elasticsearch version:
7.9.2

APM Server version:
7.9.2

APM Agent language and version:
dotnet 1.8.1

Browser version:
Edge 89

Original install method (e.g. download page, yum, deb, from source, etc.) and version:
nuget

Fresh install or upgraded from other version?
fresh

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
When instrumenting Redis queries, I expected to see the Key in the trace, but it is not present. Do I need to do some extra work to make this visible, or should I make an enhancement request on the github project?

Steps to reproduce:

  1. Add Elastic.Apm.StackExchange.Redis to a project using Redis/ElasticAPM
  2. Observe Redis calls in Kibana
  3. Redis calls are logged but do not contain the Key, limiting usefulness

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Hi @Brandon_Liles,

The StackExchange.Redis instrumentation is implemented using the library's profiling session feature. This feature is geared more towards profiling rather than instrumentation and as a result does not expose details of the redis message, unfortunately, but it's the best integration available at the moment, though there is an open issue discussing the addition of more data to a profiled command.

We are looking at .NET auto instrumentation using the profiling interfaces of the (Core) CLR, which could allow the APM agent to capture more detail in cases such as this. Nothing concrete to share on this yet.

@Brandon_Liles An update that I thought you'd be interested in. I've opened a PR that will try to capture both the command and key in the statement field, if available

That's awesome! Thanks for the update.