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.

Returns a new instance of ServiceInfo.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elastic_apm/metadata/service_info.rb', line 39

def initialize(config)
  @config = config

  @name = @config.service_name
  @node_name = @config.service_node_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
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.



55
56
57
# File 'lib/elastic_apm/metadata/service_info.rb', line 55

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.



55
56
57
# File 'lib/elastic_apm/metadata/service_info.rb', line 55

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.



55
56
57
# File 'lib/elastic_apm/metadata/service_info.rb', line 55

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.



55
56
57
# File 'lib/elastic_apm/metadata/service_info.rb', line 55

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.



55
56
57
# File 'lib/elastic_apm/metadata/service_info.rb', line 55

def name
  @name
end

#node_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.



55
56
57
# File 'lib/elastic_apm/metadata/service_info.rb', line 55

def node_name
  @node_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.



55
56
57
# File 'lib/elastic_apm/metadata/service_info.rb', line 55

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.



55
56
57
# File 'lib/elastic_apm/metadata/service_info.rb', line 55

def version
  @version
end