Skip to main content

Python library for tracing graphql calls with Datadog

Project description

https://travis-ci.org/beezz/ddtrace-graphql.svg?branch=master https://pyup.io/repos/github/beezz/ddtrace-graphql/shield.svg

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


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)

Uploaded Source

Built Distribution

ddtrace_graphql-0.0.4-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page