ddtrace 0.16.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +113 -74
- data/CHANGELOG.md +15 -3
- data/Rakefile +2 -34
- data/lib/ddtrace/transport.rb +4 -1
- data/lib/ddtrace/version.rb +1 -1
- data/lib/ddtrace/writer.rb +4 -2
- data/tasks/release_gem.rake +28 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3a696ccc72f7c5d2895655641ac4bc7ac12119d2
|
4
|
+
data.tar.gz: 4cf548cf08fbd707e5c8f179225dc8cab4dbe0d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 147f0cda95395942057e0f6431ab3e874a697f4cdd5a7f9875608979dcd8eba28d3dff315e759893f0dfdca62f075e0e379a9a539a0aa7894d173de7d232c630
|
7
|
+
data.tar.gz: e938522ba999a3258af991e71ba81d7125bc8c1b58573a0bfd774cd4d9507651e838954aef773eaf33161bce63b7d60e880403ceddb4f8d844b95bbecd261947
|
data/.circleci/config.yml
CHANGED
@@ -458,7 +458,7 @@ jobs:
|
|
458
458
|
keys:
|
459
459
|
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.4-{{ checksum ".circleci/bundle_checksum" }}'
|
460
460
|
- *step_run_all_tests
|
461
|
-
deploy
|
461
|
+
"deploy release":
|
462
462
|
<<: *job_defaults
|
463
463
|
docker:
|
464
464
|
- *container-2_4
|
@@ -470,81 +470,120 @@ jobs:
|
|
470
470
|
apt-get -y -qq install awscli
|
471
471
|
- *step_bundle_install
|
472
472
|
- *step_release_docs
|
473
|
+
- run:
|
474
|
+
name: Upload release Gem and rebuild index
|
475
|
+
command: S3_DIR=release bundle exec rake release:gem
|
476
|
+
- store_artifacts:
|
477
|
+
path: pkg/
|
478
|
+
destination: gem
|
479
|
+
"deploy prerelease Gem":
|
480
|
+
<<: *job_defaults
|
481
|
+
docker:
|
482
|
+
- *container-2_4
|
483
|
+
steps:
|
484
|
+
- checkout
|
485
|
+
- run:
|
486
|
+
command: |
|
487
|
+
apt-get -y -qq update
|
488
|
+
apt-get -y -qq install awscli
|
489
|
+
- *step_bundle_install
|
490
|
+
- run:
|
491
|
+
name: Rename to pre-release version based on branch name and build number
|
492
|
+
command: |
|
493
|
+
# create safe version string
|
494
|
+
PRE=$(echo "${CIRCLE_BRANCH:-unknown}.${CIRCLE_BUILD_NUM:-R$RANDOM}" | sed -e 's/[^a-zA-Z0-9+]\{1,\}/./g')
|
495
|
+
echo PRE=$PRE
|
496
|
+
sed lib/ddtrace/version.rb -i -e "s/^\([\t ]*PRE\) *=*/\1 = \'${PRE}\' #/g"
|
497
|
+
- run:
|
498
|
+
name: Upload prereleas Gem and rebuild index
|
499
|
+
command: S3_DIR=prerelease bundle exec rake release:gem
|
500
|
+
- store_artifacts:
|
501
|
+
path: pkg/
|
502
|
+
destination: gem
|
473
503
|
|
474
504
|
workflows:
|
475
505
|
version: 2
|
476
506
|
build-and-test:
|
477
507
|
jobs:
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
508
|
+
- checkout-1.9:
|
509
|
+
<<: *filters_all_branches_and_tags
|
510
|
+
- build-1.9:
|
511
|
+
<<: *filters_all_branches_and_tags
|
512
|
+
requires:
|
513
|
+
- checkout-1.9
|
514
|
+
- test-1.9:
|
515
|
+
<<: *filters_all_branches_and_tags
|
516
|
+
requires:
|
517
|
+
- build-1.9
|
518
|
+
- checkout-2.0:
|
519
|
+
<<: *filters_all_branches_and_tags
|
520
|
+
- build-2.0:
|
521
|
+
<<: *filters_all_branches_and_tags
|
522
|
+
requires:
|
523
|
+
- checkout-2.0
|
524
|
+
- test-2.0:
|
525
|
+
<<: *filters_all_branches_and_tags
|
526
|
+
requires:
|
527
|
+
- build-2.0
|
528
|
+
- checkout-2.1:
|
529
|
+
<<: *filters_all_branches_and_tags
|
530
|
+
- build-2.1:
|
531
|
+
<<: *filters_all_branches_and_tags
|
532
|
+
requires:
|
533
|
+
- checkout-2.1
|
534
|
+
- test-2.1:
|
535
|
+
<<: *filters_all_branches_and_tags
|
536
|
+
requires:
|
537
|
+
- build-2.1
|
538
|
+
- checkout-2.2:
|
539
|
+
<<: *filters_all_branches_and_tags
|
540
|
+
- build-2.2:
|
541
|
+
<<: *filters_all_branches_and_tags
|
542
|
+
requires:
|
543
|
+
- checkout-2.2
|
544
|
+
- test-2.2:
|
545
|
+
<<: *filters_all_branches_and_tags
|
546
|
+
requires:
|
547
|
+
- build-2.2
|
548
|
+
- checkout-2.3:
|
549
|
+
<<: *filters_all_branches_and_tags
|
550
|
+
- build-2.3:
|
551
|
+
<<: *filters_all_branches_and_tags
|
552
|
+
requires:
|
553
|
+
- checkout-2.3
|
554
|
+
- test-2.3:
|
555
|
+
<<: *filters_all_branches_and_tags
|
556
|
+
requires:
|
557
|
+
- build-2.3
|
558
|
+
- benchmark-2.3:
|
559
|
+
<<: *filters_all_branches_and_tags
|
560
|
+
requires:
|
561
|
+
- build-2.3
|
562
|
+
- checkout-2.4:
|
563
|
+
<<: *filters_all_branches_and_tags
|
564
|
+
- build-2.4:
|
565
|
+
<<: *filters_all_branches_and_tags
|
566
|
+
requires:
|
567
|
+
- checkout-2.4
|
568
|
+
- test-2.4:
|
569
|
+
<<: *filters_all_branches_and_tags
|
570
|
+
requires:
|
571
|
+
- build-2.4
|
572
|
+
- "deploy prerelease Gem":
|
573
|
+
<<: *filters_all_branches_and_tags
|
574
|
+
requires:
|
575
|
+
- test-1.9
|
576
|
+
- test-2.0
|
577
|
+
- test-2.1
|
578
|
+
- test-2.2
|
579
|
+
- test-2.3
|
580
|
+
- test-2.4
|
581
|
+
- "deploy release":
|
582
|
+
<<: *filters_only_release_tags
|
583
|
+
requires:
|
584
|
+
- test-1.9
|
585
|
+
- test-2.0
|
586
|
+
- test-2.1
|
587
|
+
- test-2.2
|
588
|
+
- test-2.3
|
589
|
+
- test-2.4
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,17 @@
|
|
4
4
|
|
5
5
|
## [Unreleased (beta)]
|
6
6
|
|
7
|
+
## [0.16.1] - 2018-10-17
|
8
|
+
|
9
|
+
Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.16.1
|
10
|
+
|
11
|
+
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.16.0...v0.16.1
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
|
15
|
+
- Priority sampling response being mishandled (#591)
|
16
|
+
- HTTP open timeout to agent too long (#582)
|
17
|
+
|
7
18
|
## [0.16.0] - 2018-09-18
|
8
19
|
|
9
20
|
Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.16.0
|
@@ -511,9 +522,10 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
|
|
511
522
|
|
512
523
|
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
513
524
|
|
514
|
-
[Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.16.
|
515
|
-
[Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.16.
|
516
|
-
[0.
|
525
|
+
[Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.16.1...master
|
526
|
+
[Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.16.1...0.17-dev
|
527
|
+
[0.16.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.16.0...v0.16.1
|
528
|
+
[0.16.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.15.0...v0.16.0
|
517
529
|
[0.15.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.2...v0.15.0
|
518
530
|
[0.14.2]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.1...v0.14.2
|
519
531
|
[0.14.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.0...v0.14.1
|
data/Rakefile
CHANGED
@@ -6,6 +6,8 @@ require 'rake/testtask'
|
|
6
6
|
require 'appraisal'
|
7
7
|
require 'yard'
|
8
8
|
|
9
|
+
Dir.glob('tasks/*.rake').each { |r| import r }
|
10
|
+
|
9
11
|
desc 'Run RSpec'
|
10
12
|
# rubocop:disable Metrics/BlockLength
|
11
13
|
namespace :spec do
|
@@ -170,40 +172,6 @@ end
|
|
170
172
|
S3_BUCKET = 'gems.datadoghq.com'.freeze
|
171
173
|
S3_DIR = ENV['S3_DIR']
|
172
174
|
|
173
|
-
desc 'create a new indexed repository'
|
174
|
-
task :'release:gem' do
|
175
|
-
raise 'Missing environment variable S3_DIR' if !S3_DIR || S3_DIR.empty?
|
176
|
-
# load existing deployed gems
|
177
|
-
sh "aws s3 cp --exclude 'docs/*' --recursive s3://#{S3_BUCKET}/#{S3_DIR}/ ./rubygems/"
|
178
|
-
|
179
|
-
# create folders
|
180
|
-
sh 'mkdir -p ./gems'
|
181
|
-
sh 'mkdir -p ./rubygems/gems/'
|
182
|
-
sh 'mkdir -p ./rubygems/quick/'
|
183
|
-
|
184
|
-
# copy previous builds
|
185
|
-
sh 'cp ./rubygems/gems/* ./gems/'
|
186
|
-
|
187
|
-
# build the gem
|
188
|
-
Rake::Task['build'].execute
|
189
|
-
|
190
|
-
# copy the output in the indexed folder
|
191
|
-
sh 'cp pkg/*.gem ./gems/'
|
192
|
-
|
193
|
-
# generate the gems index
|
194
|
-
sh 'gem generate_index'
|
195
|
-
|
196
|
-
# namespace everything under ./rubygems/
|
197
|
-
sh 'cp -r ./gems/* ./rubygems/gems/'
|
198
|
-
sh 'cp -r specs.* ./rubygems/'
|
199
|
-
sh 'cp -r latest_specs.* ./rubygems/'
|
200
|
-
sh 'cp -r prerelease_specs.* ./rubygems/'
|
201
|
-
sh 'cp -r ./quick/* ./rubygems/quick/'
|
202
|
-
|
203
|
-
# deploy a static gem registry
|
204
|
-
sh "aws s3 cp --recursive ./rubygems/ s3://#{S3_BUCKET}/#{S3_DIR}/"
|
205
|
-
end
|
206
|
-
|
207
175
|
desc 'release the docs website'
|
208
176
|
task :'release:docs' => :docs do
|
209
177
|
raise 'Missing environment variable S3_DIR' if !S3_DIR || S3_DIR.empty?
|
data/lib/ddtrace/transport.rb
CHANGED
@@ -107,7 +107,9 @@ module Datadog
|
|
107
107
|
request = Net::HTTP::Post.new(url, headers)
|
108
108
|
request.body = data
|
109
109
|
|
110
|
-
response = Net::HTTP.start(@hostname, @port, read_timeout: TIMEOUT)
|
110
|
+
response = Net::HTTP.start(@hostname, @port, open_timeout: TIMEOUT, read_timeout: TIMEOUT) do |http|
|
111
|
+
http.request(request)
|
112
|
+
end
|
111
113
|
handle_response(response)
|
112
114
|
rescue StandardError => e
|
113
115
|
log_error_once(e.message)
|
@@ -219,6 +221,7 @@ module Datadog
|
|
219
221
|
@response_callback.call(action, response, @api)
|
220
222
|
rescue => e
|
221
223
|
Tracer.log.debug("Error processing callback: #{e}")
|
224
|
+
@mutex.synchronize { @count_internal_error += 1 }
|
222
225
|
end
|
223
226
|
end
|
224
227
|
end
|
data/lib/ddtrace/version.rb
CHANGED
data/lib/ddtrace/writer.rb
CHANGED
@@ -120,8 +120,10 @@ module Datadog
|
|
120
120
|
return unless action == :traces && response.is_a?(Net::HTTPOK)
|
121
121
|
|
122
122
|
if api[:version] == HTTPTransport::V4
|
123
|
-
|
124
|
-
|
123
|
+
body = JSON.parse(response.body)
|
124
|
+
if body.is_a?(Hash) && body.key?('rate_by_service')
|
125
|
+
@priority_sampler.update(body['rate_by_service'])
|
126
|
+
end
|
125
127
|
true
|
126
128
|
else
|
127
129
|
false
|
@@ -0,0 +1,28 @@
|
|
1
|
+
desc 'create a new indexed repository'
|
2
|
+
task :'release:gem' do
|
3
|
+
raise 'Missing environment variable S3_DIR' if !S3_DIR || S3_DIR.empty?
|
4
|
+
# load existing deployed gems
|
5
|
+
sh "aws s3 cp --exclude 'docs/*' --recursive s3://#{S3_BUCKET}/#{S3_DIR}/ ./rubygems/"
|
6
|
+
|
7
|
+
# create folders
|
8
|
+
sh 'mkdir -p ./gems'
|
9
|
+
sh 'mkdir -p ./rubygems/gems'
|
10
|
+
|
11
|
+
# build the gem
|
12
|
+
Rake::Task['build'].execute
|
13
|
+
|
14
|
+
# copy the output in the indexed folder
|
15
|
+
sh 'cp pkg/*.gem ./rubygems/gems/'
|
16
|
+
|
17
|
+
# generate the gems index
|
18
|
+
sh 'gem generate_index -v --no-modern -d ./rubygems'
|
19
|
+
|
20
|
+
# remove all local repository gems to limit files needed to be uploaded
|
21
|
+
sh 'rm -f ./rubygems/gems/*'
|
22
|
+
|
23
|
+
# re-add new gems
|
24
|
+
sh 'cp pkg/*.gem ./rubygems/gems/'
|
25
|
+
|
26
|
+
# deploy a static gem registry
|
27
|
+
sh "aws s3 cp --recursive ./rubygems/ s3://#{S3_BUCKET}/#{S3_DIR}/"
|
28
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddtrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -454,6 +454,7 @@ files:
|
|
454
454
|
- lib/ddtrace/version.rb
|
455
455
|
- lib/ddtrace/workers.rb
|
456
456
|
- lib/ddtrace/writer.rb
|
457
|
+
- tasks/release_gem.rake
|
457
458
|
homepage: https://github.com/DataDog/dd-trace-rb
|
458
459
|
licenses:
|
459
460
|
- BSD-3-Clause
|
@@ -475,7 +476,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
475
476
|
version: '0'
|
476
477
|
requirements: []
|
477
478
|
rubyforge_project:
|
478
|
-
rubygems_version: 2.
|
479
|
+
rubygems_version: 2.6.14
|
479
480
|
signing_key:
|
480
481
|
specification_version: 4
|
481
482
|
summary: Datadog tracing code for your Ruby applications
|