Class: ElasticAPM::Spies::ElasticsearchSpy Private

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic_apm/spies/elasticsearch.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Modules: Ext

Constant Summary collapse

NAME_FORMAT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'%s %s'
TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'db'
SUBTYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'elasticsearch'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.sanitizerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



29
30
31
32
33
34
35
36
37
38
# File 'lib/elastic_apm/spies/elasticsearch.rb', line 29

def self.sanitizer
  @sanitizer ||=
    begin
      config = ElasticAPM.agent.config
      ElasticAPM::Transport::Filters::HashSanitizer.new(
        key_patterns: config.custom_key_filters +
                      config.sanitize_field_names
      )
    end
end

Instance Method Details

#installObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



81
82
83
84
85
86
87
# File 'lib/elastic_apm/spies/elasticsearch.rb', line 81

def install
  if defined?(::Elastic::Transport::Client)
    ::Elastic::Transport::Client.prepend(Ext)
  elsif defined?(::Elasticsearch::Transport::Client)
    ::Elasticsearch::Transport::Client.prepend(Ext)
  end
end