Tyke Python Agent
Project description
Tyke Python Agent
Tyke Python agent provides instrumentation for collecting traces data to be processed by Tyke.
This agent supports these frameworks and adds following capabilities:
- capture request and response headers
- capture request and response bodies
- capture SQL queries
- tracing context propagation
Tyke python agent supports Python 3.7+
| Library | Description | Supported Library Versions |
|---|---|---|
| flask | A micro web framework written in Python. | >= 1.0, < 3.0 |
| django | Python web framework | 2.0+ |
| fastapi | Python web framework | ~= 0.58 |
| grpc | Python GRPC library. | 1.27+ |
| mysql-connector | Python MySQL database client library. | 8.* |
| mysqlclient | Python MySQLClient library. | < 3 |
| pymyql | Python MySQL database PyMysql library. | 2+ |
| psycopg2/psycopg2-binary/postgresql | Python Postgresql database client library. | 2.7.3.1+ |
| requests | Python HTTP client library. | 2.* |
| aiohttp | Python async HTTP client library. | 3.* |
| pymongo | Python mongodb pymongo library. | >= 3.1, < 5.0 |
| redis | Python Redis library. | 3.0.0+ |
| cassandra | Python Cassandra driver. | ~= 3.25 |
| scylla | Python Scylla driver. | ~= 3.25 |
Getting started
Instrumentation
Instrumentation requires editing your code to initialize an agent, and registering any applicable modules to be instrumented.
- Install the tyke python agent:
pip install tyke-agent
- Create a YAML file with the name config.yaml in the application root directory and add below content
service_name: "Service Name"
resource_attributes:
app.name: "Application Name"
service.identifier: Service unique identifier
reporting:
endpoint: http://localhost:4317
token: <base64encodedtoken> # Optional
- Add the following to your app's entrypoint python file:
from tyke.agent import Agent
# Set config file location in environment variables
os.environ.setdefault("TYKE_CONFIG_FILE", "config.yaml")
agent = Agent() # initialize the agent
# Instrument a flask app + any other applicable libraries
agent.instrument(app)
# Instrument a django app
agent.instrument()
...
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tyke-agent-0.2.2.tar.gz.
File metadata
- Download URL: tyke-agent-0.2.2.tar.gz
- Upload date:
- Size: 42.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7c91c059be2ff91ca053c765e9ae35aa47954ee4a23ceb4b1d5aaa95a6e099f
|
|
| MD5 |
08643b28a4eb4ea105041ae98d344d71
|
|
| BLAKE2b-256 |
30adbefeab3e33f6ba3a9495f4447bb8182536fd3bb156b6b92711ca676762c6
|
File details
Details for the file tyke_agent-0.2.2-py3-none-any.whl.
File metadata
- Download URL: tyke_agent-0.2.2-py3-none-any.whl
- Upload date:
- Size: 57.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8f4d6948dc5334719a4f56fdb23dfd4f018096810df901fe469974552f4404e
|
|
| MD5 |
0a3453125fe29a4e1d4ebc08d6abc949
|
|
| BLAKE2b-256 |
d2cf361a405f9666b7926e7949f80cca9b4d860a84b38b0ff236f77c072a9642
|