tyke-agent


Nametyke-agent JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://tyke.ai
SummaryTyke Python Agent
upload_time2023-09-25 12:46:14
maintainer
docs_urlNone
authorTykeVision
requires_python>=3.7
license
keywords tyke python agent instrumentation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tyke Python Agent

Tyke Python agent provides instrumentation for collecting traces data to be processed by [Tyke](https://tyke.ai/).

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](https://flask.palletsprojects.com/en/1.1.x/api)|A micro web framework written in Python.| >= 1.0, < 3.0 |
| [django](https://docs.djangoproject.com/)|Python web framework | 2.0+ |
| [fastapi](https://docs.djangoproject.com/)|Python web framework |  ~= 0.58 |
| [grpc](https://grpc.github.io/grpc/python/)|Python GRPC library.| 1.27+ |
| [mysql-connector](https://dev.mysql.com/doc/connector-python/en/)| Python MySQL database client library.| 8.\* |
| [mysqlclient](https://pypi.org/project/MySQLClient/)|Python MySQLClient library.| < 3|
| [pymyql](https://pymysql.readthedocs.io/en/latest/)| Python MySQL database PyMysql library.| 2+|
| [psycopg2/psycopg2-binary/postgresql](https://www.psycopg.org/docs/)|Python Postgresql database client library. | 2.7.3.1+ |
| [requests](https://docs.python-requests.org/en/master/)|Python HTTP client library.| 2.\* |
| [aiohttp](https://docs.aiohttp.org/en/stable/)|Python async HTTP client library.| 3.\* |
| [pymongo](https://pymongo.readthedocs.io/en/stable/)|Python mongodb pymongo library.| >= 3.1, < 5.0 |
| [redis](https://redis.readthedocs.io/en/latest/)|Python Redis library.| 3.0.0+ |
| [cassandra](https://pypi.org/project/cassandra-driver/)|Python Cassandra driver.| ~= 3.25 |
| [scylla](https://pypi.org/project/scylla-driver/)|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:

```bash
pip install tyke-agent
```

- Create a YAML file with the name config.yaml in the application root directory and add below content

```yaml
service_name: "Service Name"
resource_attributes: 
    app.name: "Application Name"
    service.identifier: Service unique identifier

reporting:
    endpoint: http://localhost:4317
```


- Add the following to your app's entrypoint python file:

```python
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()
...
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://tyke.ai",
    "name": "tyke-agent",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "Tyke Python agent instrumentation",
    "author": "TykeVision",
    "author_email": "tech@tyke.ai",
    "download_url": "https://files.pythonhosted.org/packages/9d/6e/be96148327706eda7d31066f919fecacc61ba0a70b2900228c7b779f956f/tyke-agent-0.2.1.tar.gz",
    "platform": null,
    "description": "# Tyke Python Agent\n\nTyke Python agent provides instrumentation for collecting traces data to be processed by [Tyke](https://tyke.ai/).\n\nThis agent supports these frameworks and adds following capabilities:\n\n- capture request and response headers\n- capture request and response bodies\n- capture SQL queries\n- tracing context propagation\n\nTyke python agent supports Python 3.7+\n\n| Library | Description | Supported Library Versions|\n|------|-------------| ---------------|\n| [flask](https://flask.palletsprojects.com/en/1.1.x/api)|A micro web framework written in Python.| >= 1.0, < 3.0 |\n| [django](https://docs.djangoproject.com/)|Python web framework | 2.0+ |\n| [fastapi](https://docs.djangoproject.com/)|Python web framework |  ~= 0.58 |\n| [grpc](https://grpc.github.io/grpc/python/)|Python GRPC library.| 1.27+ |\n| [mysql-connector](https://dev.mysql.com/doc/connector-python/en/)| Python MySQL database client library.| 8.\\* |\n| [mysqlclient](https://pypi.org/project/MySQLClient/)|Python MySQLClient library.| < 3|\n| [pymyql](https://pymysql.readthedocs.io/en/latest/)| Python MySQL database PyMysql library.| 2+|\n| [psycopg2/psycopg2-binary/postgresql](https://www.psycopg.org/docs/)|Python Postgresql database client library. | 2.7.3.1+ |\n| [requests](https://docs.python-requests.org/en/master/)|Python HTTP client library.| 2.\\* |\n| [aiohttp](https://docs.aiohttp.org/en/stable/)|Python async HTTP client library.| 3.\\* |\n| [pymongo](https://pymongo.readthedocs.io/en/stable/)|Python mongodb pymongo library.| >= 3.1, < 5.0 |\n| [redis](https://redis.readthedocs.io/en/latest/)|Python Redis library.| 3.0.0+ |\n| [cassandra](https://pypi.org/project/cassandra-driver/)|Python Cassandra driver.| ~= 3.25 |\n| [scylla](https://pypi.org/project/scylla-driver/)|Python Scylla driver.| ~= 3.25 |\n\n\n## Getting started\n\n## Instrumentation\n\nInstrumentation requires editing your code to initialize an agent, and registering any applicable modules to be instrumented.\n\n- Install the tyke python agent:\n\n```bash\npip install tyke-agent\n```\n\n- Create a YAML file with the name config.yaml in the application root directory and add below content\n\n```yaml\nservice_name: \"Service Name\"\nresource_attributes: \n    app.name: \"Application Name\"\n    service.identifier: Service unique identifier\n\nreporting:\n    endpoint: http://localhost:4317\n```\n\n\n- Add the following to your app's entrypoint python file:\n\n```python\nfrom tyke.agent import Agent\n\n\n# Set config file location in environment variables \nos.environ.setdefault(\"TYKE_CONFIG_FILE\", \"config.yaml\")\n\nagent = Agent() # initialize the agent\n\n# Instrument a flask app + any other applicable libraries\nagent.instrument(app)\n\n# Instrument a django app\nagent.instrument()\n...\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Tyke Python Agent",
    "version": "0.2.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/tykevision/python-agent/issues",
        "Homepage": "https://tyke.ai"
    },
    "split_keywords": [
        "tyke",
        "python",
        "agent",
        "instrumentation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71c20b56a155ce55f4bd3064a7513be111acd8855efd0495464676dd7352f6e7",
                "md5": "77f7b298e1710d8872aaad142aab9311",
                "sha256": "a28a629fe7b7c339cd348ab175431cf262a6e9edcb99c1ac2a0959d38c0aee05"
            },
            "downloads": -1,
            "filename": "tyke_agent-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77f7b298e1710d8872aaad142aab9311",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 57045,
            "upload_time": "2023-09-25T12:46:12",
            "upload_time_iso_8601": "2023-09-25T12:46:12.254390Z",
            "url": "https://files.pythonhosted.org/packages/71/c2/0b56a155ce55f4bd3064a7513be111acd8855efd0495464676dd7352f6e7/tyke_agent-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9d6ebe96148327706eda7d31066f919fecacc61ba0a70b2900228c7b779f956f",
                "md5": "e6b52b5207c9614f5043538d37a54191",
                "sha256": "0d26c4e82eef6c846f86fcb3cd70407fe8b995654b004f8e9de011a8c65cd3a9"
            },
            "downloads": -1,
            "filename": "tyke-agent-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e6b52b5207c9614f5043538d37a54191",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 42196,
            "upload_time": "2023-09-25T12:46:14",
            "upload_time_iso_8601": "2023-09-25T12:46:14.920063Z",
            "url": "https://files.pythonhosted.org/packages/9d/6e/be96148327706eda7d31066f919fecacc61ba0a70b2900228c7b779f956f/tyke-agent-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-25 12:46:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tykevision",
    "github_project": "python-agent",
    "github_not_found": true,
    "lcname": "tyke-agent"
}
        
Elapsed time: 0.29737s