Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Add port to tracing URL when external_url is used
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkay committed Apr 25, 2024
1 parent 9b0093c commit 130af94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/charms/tempo_k8s/v2/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ def publish_receivers(self, receivers: Sequence[RawReceiver]):
try:
TracingProviderAppData(
host=self._host,
external_url=self._external_url,
external_url=f"http://{self._external_url}" if self._external_url else None,
receivers=[
Receiver(port=port, protocol=protocol) for protocol, port in receivers
],
Expand Down Expand Up @@ -822,7 +822,7 @@ def _get_endpoint(
receiver = receivers[0]
# if there's an external_url argument (v2.5+), use that. Otherwise, we use the tempo local fqdn
if app_data.external_url:
url = f"http://{app_data.external_url}"
url = f"{app_data.external_url}:{receiver.port}"
else:
# FIXME: if we don't get an external url but only a
# hostname, we don't know what scheme we need to be using. ASSUME HTTP
Expand Down

0 comments on commit 130af94

Please sign in to comment.