From 7bf17b961ab4a694d19b8e45a2ac00a1da1ff962 Mon Sep 17 00:00:00 2001 From: arjun-mw Date: Thu, 20 Jun 2024 16:01:17 +0530 Subject: [PATCH] updated profiling url for v2 support --- lib/middleware/profile/pyroscope_profile.rb | 6 +++--- lib/middleware/ruby_gem/version.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/middleware/profile/pyroscope_profile.rb b/lib/middleware/profile/pyroscope_profile.rb index d6ad17b..150d3d6 100644 --- a/lib/middleware/profile/pyroscope_profile.rb +++ b/lib/middleware/profile/pyroscope_profile.rb @@ -13,11 +13,11 @@ class PyroscopeProfile def self.init authentication = Auth::Authentication.new return unless authentication.auth - + account = authentication.get_response['data']['account'] 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'] + config.server_address = ENV["MW_PROFILING_SERVER_URL"] || "https://#{account}.middleware.io/profiling" + config.tenant_id = account end MwLogger.info("Profiling started") diff --git a/lib/middleware/ruby_gem/version.rb b/lib/middleware/ruby_gem/version.rb index 3c38fec..b78c5c7 100644 --- a/lib/middleware/ruby_gem/version.rb +++ b/lib/middleware/ruby_gem/version.rb @@ -2,6 +2,6 @@ module Middleware module RubyGem - VERSION = "2.1.0" + VERSION = "2.1.1" end end