Sha256: 4503728a8d089d551fc1cf13d2e6b244e8f3d2606f900db2d08a8aba7f8d0997

Contents?: true

Size: 731 Bytes

Versions: 14

Compression:

Stored size: 731 Bytes

Contents

# frozen_string_literal: true

require_relative "../../version"
require "securerandom"

module Aspecto
  module OpenTelemetry
    module Resource
      module Detectors
        # Aspecto OpenTelemetry Resource Detector
        module Aspecto
          extend self

          def detect
            resource_attributes = {}
            resource_attributes["aspecto.version"] = ::Aspecto::OpenTelemetry::VERSION
            # this should eventually be set in service detector
            resource_attributes[::OpenTelemetry::SemanticConventions::Resource::SERVICE_INSTANCE_ID] = SecureRandom.uuid
            ::OpenTelemetry::SDK::Resources::Resource.create(resource_attributes)
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
aspecto-opentelemetry-0.2.0 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.2.0.rc0 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.10 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.9 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.8 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.7 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.7.rc0 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.6 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.5 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.4 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.3 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.2 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.1 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb
aspecto-opentelemetry-0.1.0 lib/aspecto/opentelemetry/resource/detectors/aspecto.rb