Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trailing slash requirement for prometheus url and add tests #14

Conversation

brettimus
Copy link
Collaborator

Fixes #11

@brettimus brettimus force-pushed the 11-fix-trailing-slash-requirement-for-prometheus-url branch from 0755192 to 48292e3 Compare April 5, 2023 16:33
load_dotenv()
self.functionName = functionName
self.moduleName = moduleName
self.baseUrl = os.getenv("PROMETHEUS_URL")
self.baseUrl = baseUrl if baseUrl is not None else os.getenv("PROMETHEUS_URL")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just do:

self.baseUrl = baseUrl or os.getenv("PROMETHEUS_URL")

@actualwitch actualwitch merged commit 8d24350 into autometrics-dev:main Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PROMETHEUS_URL needs a trailing slash to work properly with examples
2 participants