Missing Couchbase metrics (.NET)

Problem

You see metrics and transaction segments for some of your Couchbase activity, but not all of it. For example, New Relic's .NET agent is not instrumenting calls to:

  • Get(string key)
  • GetDocument(string key)
  • Remove(string key)
  • Remove(string key, ulong cas)
  • Upsert<T>(string key, T value)

Solution

The Couchbase SDK contains methods for Get, Remove, and Upsert that act on multiple documents. These methods use multithreaded processes to call into other public methods in the Couchbase SDK.

To avoid double instrumentation, New Relic's .NET agent automatically instruments the multiple document methods. However, the agent does not automatically instrument the base methods they call into.

To see additional metrics and transaction segments for Couchbase activity, use either of these options:

Couchbase options Comments
Use alternative methods Use other methods in the Couchbase SDK where .NET agent instrumentation is not disabled. For example, if you use GetAsync(string key) instead of Get(string key), your calls will be instrumented.
Edit instrumentation XML file

If you do not use the multiple document methods in your application

  1. Comment out the methods in the instrumentation XML file for Couchbase.
  2. Comment back in the methods that are currently commented out.

For more help

Recommendations for learning more: