Sha256: a94a21c71c4277a3c0ca456c0f055dc2a9916860b3cfd7f97408ce4e71e16533

Contents?: true

Size: 1.81 KB

Versions: 17

Compression:

Stored size: 1.81 KB

Contents

# frozen_string_literal: true

module Datadog
  module Tracing
    module Contrib
      module Dalli
        # Dalli integration constants
        # @public_api Changing resource names, tag names, or environment variables creates breaking changes.
        module Ext
          # DEV: Even though this is the dalli integration, all spans are named `memcached.*`.
          # DEV: This happens because such spans have special treatment in backend, with memcached-specific handling.
          # DEV: If add support for the `memcached` gem (not popular as of 2023), we'll have issues with span naming
          # DEV: conflicts.
          ENV_ENABLED = 'DD_TRACE_DALLI_ENABLED'
          # @!visibility private
          ENV_ANALYTICS_ENABLED = 'DD_TRACE_DALLI_ANALYTICS_ENABLED'
          ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_DALLI_ANALYTICS_SAMPLE_RATE'
          # DEV: This is named `*_MEMCACHED_*` because the spans it refer to are `memcached.*` and this variable
          # DEV: is a global flag that affects all memcached spans generated by any Datadog product.
          ENV_COMMAND_ENABLED = 'DD_TRACE_MEMCACHED_COMMAND_ENABLED'
          ENV_SERVICE_NAME = 'DD_TRACE_DALLI_SERVICE_NAME'
          ENV_PEER_SERVICE = 'DD_TRACE_DALLI_PEER_SERVICE'

          QUANTIZE_MAX_CMD_LENGTH = 100
          DEFAULT_PEER_SERVICE_NAME = 'memcached'
          SPAN_COMMAND = 'memcached.command'
          SPAN_TYPE_COMMAND = 'memcached'
          TAG_COMMAND = 'memcached.command'
          TAG_COMPONENT = 'dalli'
          TAG_OPERATION_COMMAND = 'command'
          TAG_SYSTEM = 'memcached'
          PEER_SERVICE_SOURCES = Array[
            Tracing::Metadata::Ext::TAG_PEER_HOSTNAME,
            Tracing::Metadata::Ext::NET::TAG_DESTINATION_NAME,
            Tracing::Metadata::Ext::NET::TAG_TARGET_HOST,].freeze
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
datadog-2.7.0 lib/datadog/tracing/contrib/dalli/ext.rb
datadog-2.6.0 lib/datadog/tracing/contrib/dalli/ext.rb
datadog-2.5.0 lib/datadog/tracing/contrib/dalli/ext.rb
datadog-2.4.0 lib/datadog/tracing/contrib/dalli/ext.rb
datadog-2.3.0 lib/datadog/tracing/contrib/dalli/ext.rb
datadog-2.2.0 lib/datadog/tracing/contrib/dalli/ext.rb
ddtrace-1.23.3 lib/datadog/tracing/contrib/dalli/ext.rb
ddtrace-1.23.2 lib/datadog/tracing/contrib/dalli/ext.rb
datadog-2.1.0 lib/datadog/tracing/contrib/dalli/ext.rb
datadog-2.0.0 lib/datadog/tracing/contrib/dalli/ext.rb
ddtrace-1.23.1 lib/datadog/tracing/contrib/dalli/ext.rb
datadog-2.0.0.beta2 lib/datadog/tracing/contrib/dalli/ext.rb
ddtrace-1.22.0 lib/datadog/tracing/contrib/dalli/ext.rb
datadog-2.0.0.beta1 lib/datadog/tracing/contrib/dalli/ext.rb
ddtrace-1.21.1 lib/datadog/tracing/contrib/dalli/ext.rb
ddtrace-1.21.0 lib/datadog/tracing/contrib/dalli/ext.rb
ddtrace-1.20.0 lib/datadog/tracing/contrib/dalli/ext.rb