in bonsaicli2/bonsai_cli/application_insights.py [0:0]
def _get_service_cloud(self, api_url: str) -> str:
"""
Returns a string representing which ServiceCloud the event is hitting,
derived from the api_url.
"""
if api_url == "https://cp-api.bons.ai":
return "Prod"
elif api_url == "https://stagingkube-cp-api.azdev.bons.ai":
return "Staging"
elif api_url == "https://preprodkube-cp-api.aztest.bons.ai":
return "Preprod"
else:
return "Unknown api_url {}".format(api_url)