Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 9d9b0e6

Browse files
committed
Remove trailing slashes from endpoint url
1 parent 38b717a commit 9d9b0e6

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
signalfx>=1.0.16
22
sfx-jaeger-client>=3.13.1.dev0
3+
six>=1.4.0

signalfx_lambda/utils.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import warnings
3+
import six.moves.urllib.parse as urlparse
34

45
from .version import name, version
56

@@ -60,17 +61,11 @@ def get_metrics_url():
6061

6162
def get_tracing_url():
6263
url = os.environ.get('SIGNALFX_TRACING_URL')
64+
if url:
65+
return url
6366

64-
if not url:
65-
url = os.environ.get('SIGNALFX_ENDPOINT_URL')
66-
67-
if url:
68-
# if the common endpoint url is used, we need to append the trace path
69-
url = url + '/v1/trace'
70-
else:
71-
url = 'https://ingest.signalfx.com/v1/trace'
72-
73-
return url
67+
url = os.environ.get('SIGNALFX_ENDPOINT_URL', 'https://ingest.signalfx.com')
68+
return urlparse.urljoin(url, '/v1/trace')
7469

7570

7671
def get_access_token():

0 commit comments

Comments
 (0)