ddtrace 0.16.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: e4c07e2d55c825aa80fda2d80abd0be7bce884c47a869d54fc5ca32f4e60653e
4
- data.tar.gz: a58bd25922fa32c3c921395a9a00b37e5b0941399f3a48cf15735ef11935808f
2
+ SHA1:
3
+ metadata.gz: 3a696ccc72f7c5d2895655641ac4bc7ac12119d2
4
+ data.tar.gz: 4cf548cf08fbd707e5c8f179225dc8cab4dbe0d4
5
5
  SHA512:
6
- metadata.gz: cd1c737a23055b67ccd2a0c081bfd64cd6156d744ca9c6b982623406b04be282de3c7b0328757dafef0bd9916f822c8a59a742be37f04f3225e192574fd7f0b9
7
- data.tar.gz: 9418e24136ab3721c4404cce92dbf637d86139b5d574356e6918a5cf618de2a881add70f1420ca419afe6a751b1fd9a58871e780d22294187a5327787e5ebba4
6
+ metadata.gz: 147f0cda95395942057e0f6431ab3e874a697f4cdd5a7f9875608979dcd8eba28d3dff315e759893f0dfdca62f075e0e379a9a539a0aa7894d173de7d232c630
7
+ data.tar.gz: e938522ba999a3258af991e71ba81d7125bc8c1b58573a0bfd774cd4d9507651e838954aef773eaf33161bce63b7d60e880403ceddb4f8d844b95bbecd261947
@@ -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-release:
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
- - checkout-1.9:
479
- <<: *filters_all_branches_and_tags
480
- - build-1.9:
481
- <<: *filters_all_branches_and_tags
482
- requires:
483
- - checkout-1.9
484
- - test-1.9:
485
- <<: *filters_all_branches_and_tags
486
- requires:
487
- - build-1.9
488
- - checkout-2.0:
489
- <<: *filters_all_branches_and_tags
490
- - build-2.0:
491
- <<: *filters_all_branches_and_tags
492
- requires:
493
- - checkout-2.0
494
- - test-2.0:
495
- <<: *filters_all_branches_and_tags
496
- requires:
497
- - build-2.0
498
- - checkout-2.1:
499
- <<: *filters_all_branches_and_tags
500
- - build-2.1:
501
- <<: *filters_all_branches_and_tags
502
- requires:
503
- - checkout-2.1
504
- - test-2.1:
505
- <<: *filters_all_branches_and_tags
506
- requires:
507
- - build-2.1
508
- - checkout-2.2:
509
- <<: *filters_all_branches_and_tags
510
- - build-2.2:
511
- <<: *filters_all_branches_and_tags
512
- requires:
513
- - checkout-2.2
514
- - test-2.2:
515
- <<: *filters_all_branches_and_tags
516
- requires:
517
- - build-2.2
518
- - checkout-2.3:
519
- <<: *filters_all_branches_and_tags
520
- - build-2.3:
521
- <<: *filters_all_branches_and_tags
522
- requires:
523
- - checkout-2.3
524
- - test-2.3:
525
- <<: *filters_all_branches_and_tags
526
- requires:
527
- - build-2.3
528
- - benchmark-2.3:
529
- <<: *filters_all_branches_and_tags
530
- requires:
531
- - build-2.3
532
- - checkout-2.4:
533
- <<: *filters_all_branches_and_tags
534
- - build-2.4:
535
- <<: *filters_all_branches_and_tags
536
- requires:
537
- - checkout-2.4
538
- - test-2.4:
539
- <<: *filters_all_branches_and_tags
540
- requires:
541
- - build-2.4
542
- - deploy-release:
543
- <<: *filters_only_release_tags
544
- requires:
545
- - test-1.9
546
- - test-2.0
547
- - test-2.1
548
- - test-2.2
549
- - test-2.3
550
- - test-2.4
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
@@ -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.0...master
515
- [Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.16.0...0.17-dev
516
- [0.15.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.15.0...v0.16.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?
@@ -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) { |http| http.request(request) }
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
@@ -2,7 +2,7 @@ module Datadog
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 16
5
- PATCH = 0
5
+ PATCH = 1
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
@@ -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
- service_rates = JSON.parse(response.body)
124
- @priority_sampler.update(service_rates)
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.0
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-09-20 00:00:00.000000000 Z
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.7.7
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