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.3.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for ddtrace_graphql-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 074d2e6ba75f4a76c22d16623ab274e3fd586d71ae94a38b9a105a05db7fafd9 |
|
MD5 | 9351d965eee816d0512521321faee2f5 |
|
BLAKE2b-256 | 6fe959933b781773132645957fbc6b13c7402f0f2f75e8f425bac46e587fadb2 |