lib/opentelemetry/sdk/resources/resource.rb in opentelemetry-sdk-0.4.0 vs lib/opentelemetry/sdk/resources/resource.rb in opentelemetry-sdk-0.5.0
- old
+ new
@@ -27,9 +27,17 @@
memo[-k] = v.freeze
end.freeze
new(frozen_labels)
end
+
+ def telemetry_sdk
+ create(
+ Constants::TELEMETRY_SDK_RESOURCE[:name] => 'opentelemetry',
+ Constants::TELEMETRY_SDK_RESOURCE[:language] => 'ruby',
+ Constants::TELEMETRY_SDK_RESOURCE[:version] => "semver:#{OpenTelemetry::SDK::VERSION}"
+ )
+ end
end
# @api private
# The constructor is private and only for use internally by the class.
# Users should use the {create} factory method to obtain a {Resource}