# 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