Python library for tracing graphql calls with Datadog
Project description
Python library to trace graphql calls with Datadog.
Installation
Using pip
$ pip install ddtrace-graphql
From source
$ git clone https://github.com/beezz/ddtrace-graphql.git
$ cd ddtrace-graphql && python setup.py install
Usage
To trace all GraphQL requests patch the library. Put this snippet to your application main entry point.
__import__('ddtrace_graphql').patch()
# OR
from ddtrace_graphql import patch
patch()
Check out the datadog trace client for all supported libraries and frameworks.
# app/__init__.py
__import__('ddtrace_graphql').patch()
# from that point all calls to graphql are traced
from graphql import graphql
result = graphql(schema, query)
Trace only certain calls with traced_graphql function
from ddtrace_graphql import traced_graphql
traced_graphql(schema, query)
Development
Install from source in development mode
$ git clone https://github.com/beezz/ddtrace-graphql.git
$ pip install --editable ddtrace-graphql[test]
Run tests
$ tox
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
ddtrace-graphql-0.0.4.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for ddtrace_graphql-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa3fc0649302de19a4e63e1fb68a339316e1409c67334989e402897c3747b778 |
|
MD5 | 67c6269def952d42256e9a110612f4f6 |
|
BLAKE2b-256 | eeb0ebff3dc69cdee45eb8110af5d4eae6a7c0fd858e2ec9c119acdb2dce1df0 |