Skip to content

Commit 4c54d82

Browse files
authored
Merge pull request #881 from DataDog/0.24-dev
0.24.0
2 parents 0851fcc + 2051e04 commit 4c54d82

File tree

148 files changed

+5330
-4057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+5330
-4057
lines changed

.circleci/config.yml

Lines changed: 72 additions & 260 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ htmlcov/
4141
.coverage
4242
.coverage.*
4343
.cache
44-
nosetests.xml
4544
coverage.xml
4645
*,cover
4746
.hypothesis/

README.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,9 @@ launch them through:
4646
[docker-compose]: https://www.docker.com/products/docker-compose
4747

4848

49-
#### Running the Tests in your local environment
50-
51-
Once docker is up and running you should be able to run the tests. To launch a
52-
single test manually. For example to run the tests for `redis-py` 2.10 on Python
53-
3.5 and 3.6:
54-
55-
$ tox -e '{py35,py36}-redis{210}'
56-
57-
To see the defined test commands see `tox.ini`.
58-
59-
To launch the complete test matrix run:
60-
61-
$ tox
62-
63-
6449
#### Running Tests in docker
6550

66-
If you prefer not to setup your local machine to run tests, we provide a preconfigured docker image.
67-
Note that this image is the same used in CircleCI to run tests.
68-
69-
You still need docker containers running additional services up and running.
70-
71-
Run the test runner
51+
Once your docker-compose environment is running, you can run the test runner image:
7252

7353
$ docker-compose run --rm testrunner
7454

Rakefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ S3_BUCKET = "pypi.datadoghq.com"
1212

1313
desc "release the a new wheel"
1414
task :'release:wheel' do
15-
# Use mkwheelhouse to build the wheel, push it to S3 then update the repo index
16-
# If at some point, we need only the 2 first steps:
17-
# - python setup.py bdist_wheel
18-
# - aws s3 cp dist/*.whl s3://pypi.datadoghq.com/#{s3_dir}/
1915
fail "Missing environment variable S3_DIR" if !S3_DIR or S3_DIR.empty?
2016

21-
# Use custom mkwheelhouse script to build and upload an sdist to S3 bucket
17+
# Use custom `mkwheelhouse` to upload wheels and source distribution from dist/ to S3 bucket
2218
sh "scripts/mkwheelhouse"
2319
end
2420

@@ -66,6 +62,7 @@ namespace :pypi do
6662

6763
task :build => :clean do
6864
puts "building release in #{RELEASE_DIR}"
65+
# TODO: Use `scripts/build-dist` instead to build sdist and wheels
6966
sh "python setup.py -q sdist -d #{RELEASE_DIR}"
7067
end
7168

ddtrace/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .tracer import Tracer
55
from .settings import config
66

7-
__version__ = '0.23.0'
7+
__version__ = '0.24.0'
88

99
# a global tracer instance with integration settings
1010
tracer = Tracer()

ddtrace/bootstrap/sitecustomize.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@
4646

4747

4848
def update_patched_modules():
49-
for patch in os.environ.get("DATADOG_PATCH_MODULES", '').split(','):
49+
modules_to_patch = os.environ.get("DATADOG_PATCH_MODULES")
50+
if not modules_to_patch:
51+
return
52+
for patch in modules_to_patch.split(','):
5053
if len(patch.split(':')) != 2:
5154
log.debug("skipping malformed patch instruction")
5255
continue
@@ -95,6 +98,8 @@ def add_global_tags(tracer):
9598
if priority_sampling:
9699
opts["priority_sampling"] = asbool(priority_sampling)
97100

101+
opts['collect_metrics'] = asbool(get_env('runtime_metrics', 'enabled'))
102+
98103
if opts:
99104
tracer.configure(**opts)
100105

ddtrace/commands/ddtrace_run.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#!/usr/bin/env python
2-
from __future__ import print_function
3-
42
from distutils import spawn
53
import os
64
import sys

ddtrace/contrib/pyramid/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def insert_tween_if_needed(settings):
7878
# pyramid. We need our tween to be before it, otherwise unhandled
7979
# exceptions will be caught before they reach our tween.
8080
idx = tweens.find(pyramid.tweens.EXCVIEW)
81-
if idx is -1:
81+
if idx == -1:
8282
settings['pyramid.tweens'] = tweens + '\n' + DD_TWEEN_NAME
8383
else:
8484
settings['pyramid.tweens'] = tweens[:idx] + DD_TWEEN_NAME + "\n" + tweens[idx:]

ddtrace/contrib/tornado/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def notify(self):
5858
'analytics_enabled': False,
5959
'settings': {
6060
'FILTERS': [
61-
FilterRequestsOnUrl(r'http://test\.example\.com'),
61+
FilterRequestsOnUrl(r'http://test\\.example\\.com'),
6262
],
6363
},
6464
},

ddtrace/filters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ class FilterRequestsOnUrl(object):
1818
1919
To filter out http calls to domain api.example.com::
2020
21-
FilterRequestsOnUrl(r'http://api\.example\.com')
21+
FilterRequestsOnUrl(r'http://api\\.example\\.com')
2222
2323
To filter out http calls to all first level subdomains from example.com::
2424
25-
FilterRequestOnUrl(r'http://.*+\.example\.com')
25+
FilterRequestOnUrl(r'http://.*+\\.example\\.com')
2626
2727
To filter out calls to both http://test.example.com and http://example.com/healthcheck::
2828
29-
FilterRequestOnUrl([r'http://test\.example\.com', r'http://example\.com/healthcheck'])
29+
FilterRequestOnUrl([r'http://test\\.example\\.com', r'http://example\\.com/healthcheck'])
3030
"""
3131
def __init__(self, regexps):
3232
if isinstance(regexps, str):

0 commit comments

Comments
 (0)