Module: NewRelic::TelemetrySdk

Extended by:
TelemetrySdk
Included in:
TelemetrySdk
Defined in:
lib/newrelic/telemetry_sdk.rb,
lib/newrelic/telemetry_sdk/span.rb,
lib/newrelic/telemetry_sdk/util.rb,
lib/newrelic/telemetry_sdk/buffer.rb,
lib/newrelic/telemetry_sdk/config.rb,
lib/newrelic/telemetry_sdk/logger.rb,
lib/newrelic/telemetry_sdk/version.rb,
lib/newrelic/telemetry_sdk/exception.rb,
lib/newrelic/telemetry_sdk/harvester.rb,
lib/newrelic/telemetry_sdk/configurator.rb,
lib/newrelic/telemetry_sdk/clients/client.rb,
lib/newrelic/telemetry_sdk/clients/trace_client.rb

Defined Under Namespace

Modules: Logger, Util Classes: Buffer, Client, Config, Configurator, Harvester, Span, TraceClient

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configObject

Note:

Unlike configuring with # NewRelic::TelemetrySdk#self#self.configure, setting config properties here may, or may not become immediately active. Use with care.

Allows direct access to the config state. The primary purpose of this method is to access config properties throughout the SDK.



91
92
93
# File 'lib/newrelic/telemetry_sdk/configurator.rb', line 91

def self.config
  Configurator.config
end

.configure {|configurator| ... } ⇒ Object

Set Telemetry SDK configuration with a block. See Config for options.

Examples:

Setting the API Key

NewRelic::TelemetrySdk.configure do |config|
  config.api_insert_key = ENV["API_KEY"]
end

Yields:

  • (configurator)


78
79
80
81
82
# File 'lib/newrelic/telemetry_sdk/configurator.rb', line 78

def self.configure
  configurator = Configurator.new
  yield configurator if block_given?
  configurator.configure
end

.loggerObject



86
87
88
# File 'lib/newrelic/telemetry_sdk/logger.rb', line 86

def self.logger
  Logger.logger
end

Instance Method Details

#gem_versionObject



12
13
14
# File 'lib/newrelic/telemetry_sdk/version.rb', line 12

def gem_version
  Gem::Version.create VERSION
end