File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ def collect_profiling(service_name, access_token="") -> None:
11
11
# Setting Middleware Account Authentication URL
12
12
auth_url = os .getenv ('MW_AUTH_URL' , 'https://app.middleware.io/api/v1/auth' )
13
13
14
- # Setting Middleware Profiling Server URL
15
- profiling_server_url = os .getenv ('MW_PROFILING_SERVER_URL' , 'https://profiling.middleware.io' )
16
-
17
14
headers = {
18
15
"Content-Type" : "application/x-www-form-urlencoded" ,
19
16
# "Authorization": "Bearer " + c.accessToken
@@ -29,6 +26,11 @@ def collect_profiling(service_name, access_token="") -> None:
29
26
# Checking if a tenantID could be fetched from API Key
30
27
if data ["success" ]:
31
28
account = data ["data" ]["account" ]
29
+
30
+ # Setting Middleware Profiling Server URL
31
+ default_profiling_server_url = f'https://{ account } .middleware.io'
32
+ profiling_server_url = os .getenv ('MW_PROFILING_SERVER_URL' , default_profiling_server_url )
33
+
32
34
pyroscope .configure (
33
35
application_name = service_name , # replace this with some name for your application
34
36
server_address = profiling_server_url ,
Original file line number Diff line number Diff line change 19
19
20
20
setuptools .setup (
21
21
name = "middleware-apm" ,
22
- version = "0.4.1 " ,
22
+ version = "0.5.0rc1 " ,
23
23
install_requires = requirements ,
24
24
author = "middleware-dev" ,
25
25
maintainer = "middleware-dev" ,
You can’t perform that action at this time.
0 commit comments