Sha256: 410be625018901bb937af5897c04185aa42899225acd0775a996294f0b963244
Contents?: true
Size: 741 Bytes
Versions: 4
Compression:
Stored size: 741 Bytes
Contents
# frozen_string_literal: true require_relative '../auth/authentication' require_relative '../logger' require "pyroscope" module Middleware module RubyGem module Profile class PyroscopeProfile def self.init authentication = Auth::Authentication.new return unless authentication.auth Pyroscope.configure do |config| config.application_name = ENV["OTEL_SERVICE_NAME"] || "default-service-name" config.server_address = ENV["MW_PROFILING_SERVER_URL"] || "https://profiling.middleware.io" config.tenant_id = authentication.get_response['data']['account'] end MwLogger.info("Profiling started") end end end end end
Version data entries
4 entries across 4 versions & 2 rubygems