Simple Tornado HTTP Client that automatically sends http response metrics to Backstage measures
Project description
# tornado-measures
Simple Tornado HTTP Client that automatically sends http response metrics to Backstage measures
Example
-------
```python
from tornado.ioloop import IOLoop
from tornado import gen
from tornado_measures import setup_measures
from tornado.httpclient import AsyncHTTPClient
setup_measures(
client='MyApplicationName',
address=('host', 1984), # logstash host and port
# optional: if you want to use pycurl instead default tornado client
client_class = 'tornado.curl_httpclient.CurlAsyncHTTPClient'
)
# don't use AsyncHTTPClient.configure anymore
http_client = AsyncHTTPClient()
@gen.coroutine
def blah():
response = yield http_client.fetch(
"http://globo.com/", raise_error=True)
blah()
IOLoop.current().start()
```
Simple Tornado HTTP Client that automatically sends http response metrics to Backstage measures
Example
-------
```python
from tornado.ioloop import IOLoop
from tornado import gen
from tornado_measures import setup_measures
from tornado.httpclient import AsyncHTTPClient
setup_measures(
client='MyApplicationName',
address=('host', 1984), # logstash host and port
# optional: if you want to use pycurl instead default tornado client
client_class = 'tornado.curl_httpclient.CurlAsyncHTTPClient'
)
# don't use AsyncHTTPClient.configure anymore
http_client = AsyncHTTPClient()
@gen.coroutine
def blah():
response = yield http_client.fetch(
"http://globo.com/", raise_error=True)
blah()
IOLoop.current().start()
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file tornado-measures-1.0.0.tar.gz
.
File metadata
- Download URL: tornado-measures-1.0.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a504d78b020ce0e0287f485938f88cb504ec09e9b429b30a2c6af42e92083a |
|
MD5 | 98ec09dea0092f2c7651bf82841ff982 |
|
BLAKE2b-256 | 000fb53e2dacf1d47911a6963aa8d002d09f6481966091a31cbafb83bdc017e1 |