|
| 1 | +# dd-trace-py |
| 2 | + |
| 3 | +[](https://circleci.com/gh/DataDog/dd-trace-py/tree/master) |
| 4 | +[](https://pypi.org/project/ddtrace/) |
| 5 | +[](https://pypi.org/project/ddtrace/) |
| 6 | + |
| 7 | +`ddtrace` is Datadog's tracing library for Python. It is used to trace requests |
| 8 | +as they flow across web servers, databases and microservices so that developers |
| 9 | +have great visiblity into bottlenecks and troublesome requests. |
| 10 | + |
| 11 | +## Getting Started |
| 12 | + |
| 13 | +For a basic product overview, installation and quick start, check out our |
| 14 | +[setup documentation][setup docs]. |
| 15 | + |
| 16 | +For more advanced usage and configuration, check out our [API |
| 17 | +documentation][pypi docs]. |
| 18 | + |
| 19 | +For descriptions of terminology used in APM, take a look at the [official |
| 20 | +documentation][visualization docs]. |
| 21 | + |
| 22 | +[setup docs]: https://docs.datadoghq.com/tracing/setup/python/ |
| 23 | +[pypi docs]: http://pypi.datadoghq.com/trace/docs/ |
| 24 | +[visualization docs]: https://docs.datadoghq.com/tracing/visualization/ |
| 25 | + |
| 26 | + |
| 27 | +## Development |
| 28 | + |
| 29 | + |
| 30 | +### Testing |
| 31 | + |
| 32 | + |
| 33 | +#### Environment |
| 34 | + |
| 35 | +The test suite requires many backing services such as PostgreSQL, MySQL, Redis |
| 36 | +and more. We use ``docker`` and ``docker-compose`` to run the services in our CI |
| 37 | +and for development. To run the test matrix, please [install docker][docker] and |
| 38 | +[docker-compose][docker-compose] using the instructions provided by your platform. Then |
| 39 | +launch them through: |
| 40 | + |
| 41 | + $ docker-compose up -d |
| 42 | + |
| 43 | + |
| 44 | +[docker]: https://www.docker.com/products/docker |
| 45 | +[docker-compose]: https://www.docker.com/products/docker-compose |
| 46 | + |
| 47 | + |
| 48 | +#### Running the Tests |
| 49 | + |
| 50 | +Once docker is up and running you should be able to run the tests. To launch a |
| 51 | +single test manually. For example to run the tests for `redis-py` 2.10 on Python |
| 52 | +3.5 and 3.6: |
| 53 | + |
| 54 | + $ tox -e '{py35,py36}-redis{210}' |
| 55 | + |
| 56 | +To see the defined test commands see `tox.ini`. |
| 57 | + |
| 58 | +To launch the complete test matrix run: |
| 59 | + |
| 60 | + $ tox |
| 61 | + |
| 62 | + |
| 63 | +### Continuous Integration |
| 64 | + |
| 65 | +We use CircleCI 2.0 for our continuous integration. |
| 66 | + |
| 67 | + |
| 68 | +#### Configuration |
| 69 | + |
| 70 | +The CI tests are configured through [config.yml](.circleci/config.yml). |
| 71 | + |
| 72 | + |
| 73 | +#### Running Locally |
| 74 | + |
| 75 | +The CI tests can be run locally using the `circleci` CLI. More information about |
| 76 | +the CLI can be found at https://circleci.com/docs/2.0/local-jobs/. |
| 77 | + |
| 78 | +After installing the `circleci` CLI, you can run jobs by name. For example: |
| 79 | + |
| 80 | + $ circleci build --job django |
| 81 | + |
| 82 | + |
| 83 | +### Benchmarking |
| 84 | + |
| 85 | +When two or more approaches must be compared, please write a benchmark in the |
| 86 | +[benchmark.py](tests/benchmark.py) module so that we can measure the efficiency |
| 87 | +of the algorithm. To run your benchmark, just: |
| 88 | + |
| 89 | + $ python -m tests.benchmark |
| 90 | + |
0 commit comments