# OpenTracing Prometheus
An integration for opentracing and prometheus.
It exposes the same metrics as jaeger and prometheus for golang.
This package contains a PrometheusReporter and PrometheusMetricsFactory
The reporter is used to report on metrics based on span contents
The factory is used to report on metrics from jaeger itself.
There is also a wsgi middleware that combines all the options.
## Middleware
```python
from flask import Flask, make_response
from opentracing_prometheus import TracerMiddleware
import logging
import sys
app = Flask('prometheus-tracing')
logging.basicConfig(stream=sys.stderr)
log_level = logging.DEBUG
logging.getLogger('').handlers = []
logging.basicConfig(format='%(asctime)s %(message)s', level=log_level)
app.wsgi_app = TracerMiddleware(app)
log = logging.getLogger()
@app.route('/')
def fetch_hello_world():
resp = make_response('Hello, World!')
resp.headers['Content-Type'] = 'text/plain'
return resp
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
```
You can then make a few requests to localhost:5000 and check the metrics at: http://localhost:5000/metrics
An integration for opentracing and prometheus.
It exposes the same metrics as jaeger and prometheus for golang.
This package contains a PrometheusReporter and PrometheusMetricsFactory
The reporter is used to report on metrics based on span contents
The factory is used to report on metrics from jaeger itself.
There is also a wsgi middleware that combines all the options.
## Middleware
```python
from flask import Flask, make_response
from opentracing_prometheus import TracerMiddleware
import logging
import sys
app = Flask('prometheus-tracing')
logging.basicConfig(stream=sys.stderr)
log_level = logging.DEBUG
logging.getLogger('').handlers = []
logging.basicConfig(format='%(asctime)s %(message)s', level=log_level)
app.wsgi_app = TracerMiddleware(app)
log = logging.getLogger()
@app.route('/')
def fetch_hello_world():
resp = make_response('Hello, World!')
resp.headers['Content-Type'] = 'text/plain'
return resp
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
```
You can then make a few requests to localhost:5000 and check the metrics at: http://localhost:5000/metrics
Metadata
Release files for opentracing-prometheus 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| opentracing_prometheus-0.1.5.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opentracing_prometheus-0.1.5-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / opentracing_prometheus-0.1.5.tar.gz
| Download URL | opentracing_prometheus-0.1.5.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80b581b2a4aa53bc05ec957cfe74afcce99bb8a81b76f6a35268364bf1ace517
|
|
BLAKE2b-256 checksum How to use checksums |
65d2c68fc19fdbc53864aad8db4a50e524d3ad028fe62c5fcb011d64efe39f8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / opentracing_prometheus-0.1.5-py2.py3-none-any.whl
| Download URL | opentracing_prometheus-0.1.5-py2.py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
62dc7631969dbbf3f8571e7e71284a6b9fbebf85cf66f96ccc1896bc067ccc8e
|
|
BLAKE2b-256 checksum How to use checksums |
d5f0772e619fb4f67faa0c583f1a24dfbea1c08dd9e1207dba5f03b8f87193a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |