# 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