Class: ElasticAPM::Metadata::ServiceInfo Private

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic_apm/metadata/service_info.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

Classes: Agent, Framework, Language, Runtime, Versioned

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ServiceInfo

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.

rubocop:disable Metrics/MethodLength



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/elastic_apm/metadata/service_info.rb', line 22

def initialize(config)
  @config = config

  @name = @config.service_name
  @environment = @config.environment
  @agent = Agent.new(name: 'ruby', version: VERSION)
  @framework = Framework.new(
    name: @config.framework_name,
    version: @config.framework_version
  )
  @language = Language.new(name: 'ruby', version: RUBY_VERSION)
  @runtime = lookup_runtime
  @version = @config.service_version || Util.git_sha
end

Instance Attribute Details

#agentObject (readonly)

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.

rubocop:enable Metrics/MethodLength



38
39
40
# File 'lib/elastic_apm/metadata/service_info.rb', line 38

def agent
  @agent
end

#environmentObject (readonly)

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.

rubocop:enable Metrics/MethodLength



38
39
40
# File 'lib/elastic_apm/metadata/service_info.rb', line 38

def environment
  @environment
end

#frameworkObject (readonly)

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.

rubocop:enable Metrics/MethodLength



38
39
40
# File 'lib/elastic_apm/metadata/service_info.rb', line 38

def framework
  @framework
end

#languageObject (readonly)

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.

rubocop:enable Metrics/MethodLength



38
39
40
# File 'lib/elastic_apm/metadata/service_info.rb', line 38

def language
  @language
end

#nameObject (readonly)

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.

rubocop:enable Metrics/MethodLength



38
39
40
# File 'lib/elastic_apm/metadata/service_info.rb', line 38

def name
  @name
end

#runtimeObject (readonly)

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.

rubocop:enable Metrics/MethodLength



38
39
40
# File 'lib/elastic_apm/metadata/service_info.rb', line 38

def runtime
  @runtime
end

#versionObject (readonly)

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.

rubocop:enable Metrics/MethodLength



38
39
40
# File 'lib/elastic_apm/metadata/service_info.rb', line 38

def version
  @version
end