This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Prometheus Demo - All 4 metric types: Counter, Gauge, Histogram, Summary""" | |
| # before >>> pip install prometheus-client>=0.19.0 | |
| # document >>> https://opentelemetry-python.readthedocs.io/en/latest/api/metrics.html | |
| import time | |
| import random | |
| from prometheus_client import Counter, Gauge, Histogram, Summary, start_http_server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Set strict mode | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # Script version | |
| VERSION="1.3.0" | |
| # Default values |