We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
tls_auth_handler_demo.py --> code form README.md
from prometheus_client import CollectorRegistry, Gauge, push_to_gateway from prometheus_client.exposition import tls_handler def my_auth_handler(url, method, timeout, headers, data): certfile = 'client-crt.pem' keyfile = 'client-key.pem' return tls_auth_handler(url, method, timeout, headers, data, certfile, keyfile) registry = CollectorRegistry() g = Gauge('job_last_success_unixtime', 'Last time a batch job successfully finished', registry=registry) g.set_to_current_time() push_to_gateway('localhost:9091', job='batchA', registry=registry, handler=my_auth_handler)
python tls_auth_handle_demo.py
Traceback (most recent call last): File "/private/tmp/tls_auth_handler_demo.py", line 2, in <module> from prometheus_client.exposition import tls_handler ImportError: cannot import name 'tls_handler' from 'prometheus_client.exposition' (/private/tmp/venv/lib/python3.9/site-packages/prometheus_client/exposition.py)
client_python/README.md
Line 490 in 4ab083e
update to
from prometheus_client.exposition import tls_auth_handler
The text was updated successfully, but these errors were encountered:
Good catch, would you like to open a PR to fix this?
Sorry, something went wrong.
Yes, please check it.
Fixed in #876
No branches or pull requests
ENV
tls_auth_handler_demo.py --> code form README.md
LOG
SHOULD BE
client_python/README.md
Line 490 in 4ab083e
update to
The text was updated successfully, but these errors were encountered: