Skip to content

Commit

Permalink
Merge pull request #1025 from DataDog/bump_to_version_0.35.1
Browse files Browse the repository at this point in the history
bump to version 0.35.1
  • Loading branch information
marcotc authored May 5, 2020
2 parents 8209ab5 + bed7080 commit dbcd667
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## [Unreleased]

## [0.35.1] - 2020-05-05

Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.35.1

Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.35.0...v0.35.1

### Fixed

- Components#teardown! NoMethodError (#1021, #1023) (@bzf)

## [0.35.0] - 2020-04-29

Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.35.0
Expand Down Expand Up @@ -1195,7 +1205,8 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1

Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1

[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.0...master
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.1...master
[0.35.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.35.0...v0.35.1
[0.35.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.34.2...v0.35.0
[0.34.2]: https://github.com/DataDog/dd-trace-rb/compare/v0.34.1...v0.34.2
[0.34.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.34.0...v0.34.1
Expand Down
4 changes: 2 additions & 2 deletions lib/ddtrace/configuration/components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ def teardown!(replacement = nil)
old_statsd = [
runtime_metrics.metrics.statsd,
health_metrics.statsd
].uniq
].compact.uniq

new_statsd = if replacement
[
replacement.runtime_metrics.metrics.statsd,
replacement.health_metrics.statsd
].uniq
].compact.uniq
else
[]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ddtrace/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Datadog
module VERSION
MAJOR = 0
MINOR = 35
PATCH = 0
PATCH = 1
PRE = nil

STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
Expand Down
19 changes: 19 additions & 0 deletions spec/ddtrace/configuration/components_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,25 @@

teardown!
end

context 'and Statsd is not initialized' do
before do
allow(components.runtime_metrics.metrics)
.to receive(:statsd)
.and_return(nil)
end

it 'shuts down all components' do
expect(components.tracer).to receive(:shutdown!)
expect(components.runtime_metrics).to receive(:enabled=)
.with(false)
expect(components.runtime_metrics).to receive(:stop)
.with(true)
expect(components.health_metrics.statsd).to receive(:close)

teardown!
end
end
end

context 'when the tracer is re-used' do
Expand Down

0 comments on commit dbcd667

Please sign in to comment.