capture_memcache_keys标志在New Relic配置yml中到底做了什么?

时间:2013-07-02 16:59:45

标签: sql ruby-on-rails memcached analytics newrelic

在New Relic配置中(在这种情况下,上下文是使用memcache的Rails 3应用程序),有一个带有以下标志的部分:

# If you're interested in capturing memcache keys as though they
# were SQL uncomment this flag. Note that this does increase
# overhead slightly on every memcached call, and can have security
# implications if your memcached keys are sensitive
# capture_memcache_keys: true

默认情况下,已注释掉。这个描述对我来说并不是特别清楚(由于已经保留了数周的数据工作),并且尝试两种方式并没有表现出我能辨别的差异。这个标志是否能够捕获memcache跟踪/捕获?或者它是否使用SQL请求“混淆”memcache查询?

我想跟踪memcache,当然,看看它是否正常运行,以及以什么速度运行等等。这个标志是否应设置为true,通常情况下是这样?

1 个答案:

答案 0 :(得分:2)

您不需要启用capture_memcache_keys标志来捕获一般的memcache指标。如果找到了memcache客户端,则disable_memcache_instrumentation标志将自动默认为false(从而测量memcache指标)。如果需要,capture_memcache_keys标志基本上允许您使用附加选项以SQL格式捕获唯一的memcache密钥。

您可以在https://newrelic.com/docs/ruby/ruby-agent-configuration找到有关New Relic Ruby代理配置的更多详细信息。