-
Notifications
You must be signed in to change notification settings - Fork 375
/
ext.rb
34 lines (33 loc) · 1.34 KB
/
ext.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true
module Datadog
module Tracing
module Contrib
module Elasticsearch
# Elasticsearch integration constants
# @public_api Changing resource names, tag names, or environment variables creates breaking changes.
module Ext
ENV_ENABLED = 'DD_TRACE_ELASTICSEARCH_ENABLED'
ENV_SERVICE_NAME = 'DD_TRACE_ELASTICSEARCH_SERVICE_NAME'
ENV_PEER_SERVICE = 'DD_TRACE_ELASTICSEARCH_PEER_SERVICE'
# @!visibility private
ENV_ANALYTICS_ENABLED = 'DD_TRACE_ELASTICSEARCH_ANALYTICS_ENABLED'
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_ELASTICSEARCH_ANALYTICS_SAMPLE_RATE'
DEFAULT_PEER_SERVICE_NAME = 'elasticsearch'
SPAN_QUERY = 'elasticsearch.query'
SPAN_TYPE_QUERY = 'elasticsearch'
TAG_BODY = 'elasticsearch.body'
TAG_METHOD = 'elasticsearch.method'
TAG_PARAMS = 'elasticsearch.params'
TAG_URL = 'elasticsearch.url'
TAG_COMPONENT = 'elasticsearch'
TAG_OPERATION_QUERY = 'query'
TAG_SYSTEM = 'elasticsearch'
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