-
Notifications
You must be signed in to change notification settings - Fork 386
/
Copy pathsettings.rb
57 lines (51 loc) · 1.51 KB
/
settings.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# frozen_string_literal: true
require_relative '../../configuration/settings'
require_relative '../ext'
module Datadog
module Tracing
module Contrib
module ActiveSupport
module Configuration
# Custom settings for the ActiveSupport integration
# @public_api
class Settings < Contrib::Configuration::Settings
option :enabled do |o|
o.type :bool
o.env Ext::ENV_ENABLED
o.default true
end
# @!visibility private
option :analytics_enabled do |o|
o.type :bool
o.env Ext::ENV_ANALYTICS_ENABLED
o.default false
end
option :analytics_sample_rate do |o|
o.type :float
o.env Ext::ENV_ANALYTICS_SAMPLE_RATE
o.default 1.0
end
option :cache_service do |o|
o.type :string, nilable: true
o.default do
Contrib::SpanAttributeSchema.fetch_service_name(
'',
Ext::SERVICE_CACHE
)
end
end
# grouped "cache_key.*" settings
settings :cache_key do
# enable or disabling the inclusion of the cache_key in the span
option :enabled do |o|
# cache_key.enabled
o.type :bool
o.default true
end
end
end
end
end
end
end
end