Skip to content

Commit

Permalink
Merge branch 'master' into 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ekump committed Jan 12, 2024
2 parents 5872b4e + a6f2af0 commit 83a4ec0
Show file tree
Hide file tree
Showing 465 changed files with 2,959 additions and 1,379 deletions.
51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

## [Unreleased]

## [1.19.0] - 2024-01-10

### Highlights
Alpha support for memory profiling has been added. For more details, check the [release notes](https://github.com/DataDog/dd-trace-rb/releases/tag/v1.19.0)

### Added
* Tracing: Add `on_error` settings for `mysql2` ([#3316][])
* Core: Add install_signature to app-started telemetry event ([#3349][])
* Profiling: Heap Profiling ([#3281][]) ([#3287][]) ([#3328][]) ([#3329][]) ([#3333][]) ([#3360][])
* Profiling: Redesign GC profiling to add timeline support and reduce overhead ([#3313][])
* Core: Use Ruby 3.3 stable for CI testing ([#3354][])

### Changed
* Core: Bump `datadog-ci` dependency to 0.6.0 ([#3361][])
* Core: Bump debase-ruby_core_source dependency to 3.3.1 ([#3373][])
* Docs: Backport "List Ruby 3.3 as supported in the docs" to master branch ([#3374][])
* Profiling: Import upstream `rb_profile_frames` fix ([#3352][])
* Profiling: Allow the dynamic sampling rate overhead target to be set ([#3310][])
* Profiling: Split profiling tests into ractor and non-ractor suites. ([#3320][])

### Fixed
* Docs: Fix `pg` doc markdown format ([#3317][])
* Tracing: Fix recursive `require` in Railtie ([#3365][])
* Profiling: Fix issues stemming from rb_gc_force_recycle ([#3366][])
* Profiling: Fix Ruby 3.3 CI being broken in master due to profiler ([#3356][])
* Profiling: Fix "no signals" workaround detection when mariadb is in use ([#3362][])

## [1.18.0] - 2023-12-07

### Added
Expand Down Expand Up @@ -2680,7 +2707,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/v1.18.0...master
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v1.19.0...master
[1.19.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.18.0...v1.19.0
[1.18.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.17.0...v1.18.0
[1.17.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.16.2...v1.17.0
[1.16.2]: https://github.com/DataDog/dd-trace-rb/compare/v1.16.1...v1.16.2
Expand Down Expand Up @@ -3910,12 +3938,33 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
[#3273]: https://github.com/DataDog/dd-trace-rb/issues/3273
[#3279]: https://github.com/DataDog/dd-trace-rb/issues/3279
[#3280]: https://github.com/DataDog/dd-trace-rb/issues/3280
[#3281]: https://github.com/DataDog/dd-trace-rb/issues/3281
[#3284]: https://github.com/DataDog/dd-trace-rb/issues/3284
[#3286]: https://github.com/DataDog/dd-trace-rb/issues/3286
[#3287]: https://github.com/DataDog/dd-trace-rb/issues/3287
[#3289]: https://github.com/DataDog/dd-trace-rb/issues/3289
[#3303]: https://github.com/DataDog/dd-trace-rb/issues/3303
[#3307]: https://github.com/DataDog/dd-trace-rb/issues/3307
[#3308]: https://github.com/DataDog/dd-trace-rb/issues/3308
[#3310]: https://github.com/DataDog/dd-trace-rb/issues/3310
[#3313]: https://github.com/DataDog/dd-trace-rb/issues/3313
[#3316]: https://github.com/DataDog/dd-trace-rb/issues/3316
[#3317]: https://github.com/DataDog/dd-trace-rb/issues/3317
[#3320]: https://github.com/DataDog/dd-trace-rb/issues/3320
[#3328]: https://github.com/DataDog/dd-trace-rb/issues/3328
[#3329]: https://github.com/DataDog/dd-trace-rb/issues/3329
[#3333]: https://github.com/DataDog/dd-trace-rb/issues/3333
[#3349]: https://github.com/DataDog/dd-trace-rb/issues/3349
[#3352]: https://github.com/DataDog/dd-trace-rb/issues/3352
[#3354]: https://github.com/DataDog/dd-trace-rb/issues/3354
[#3356]: https://github.com/DataDog/dd-trace-rb/issues/3356
[#3360]: https://github.com/DataDog/dd-trace-rb/issues/3360
[#3361]: https://github.com/DataDog/dd-trace-rb/issues/3361
[#3362]: https://github.com/DataDog/dd-trace-rb/issues/3362
[#3365]: https://github.com/DataDog/dd-trace-rb/issues/3365
[#3366]: https://github.com/DataDog/dd-trace-rb/issues/3366
[#3373]: https://github.com/DataDog/dd-trace-rb/issues/3373
[#3374]: https://github.com/DataDog/dd-trace-rb/issues/3374
[@AdrianLC]: https://github.com/AdrianLC
[@Azure7111]: https://github.com/Azure7111
[@BabyGroot]: https://github.com/BabyGroot
Expand Down
12 changes: 9 additions & 3 deletions benchmarks/profiler_sample_loop_v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def create_profiler
alloc_samples_enabled: false,
heap_samples_enabled: false,
heap_size_enabled: false,
heap_sample_every: 1,
timeline_enabled: false,
)
@collector = Datadog::Profiling::Collectors::ThreadContext.new(
Expand All @@ -42,8 +43,11 @@ def thread_with_very_deep_stack(depth: 500)

def run_benchmark
Benchmark.ips do |x|
benchmark_time = VALIDATE_BENCHMARK_MODE ? {time: 0.01, warmup: 0} : {time: 10, warmup: 2}
x.config(**benchmark_time, suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'profiler_sample_loop_v2'))
benchmark_time = VALIDATE_BENCHMARK_MODE ? { time: 0.01, warmup: 0 } : { time: 10, warmup: 2 }
x.config(
**benchmark_time,
suite: report_to_dogstatsd_if_enabled_via_environment_variable(benchmark_name: 'profiler_sample_loop_v2')
)

x.report("stack collector #{ENV['CONFIG']}") do
Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD)
Expand All @@ -58,7 +62,9 @@ def run_benchmark

def run_forever
while true
1000.times { Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD) }
1000.times do
Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD)
end
@recorder.serialize
print '.'
end
Expand Down
2 changes: 1 addition & 1 deletion ddtrace.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Gem::Specification.new do |spec|
# Used by the profiler native extension to support Ruby < 2.6 and > 3.2
#
# We decided to pin it at the latest available version and will manually bump the dependency as needed.
spec.add_dependency 'debase-ruby_core_source', '= 3.2.3'
spec.add_dependency 'debase-ruby_core_source', '= 3.3.1'

# Used by appsec
spec.add_dependency 'libddwaf', '~> 1.14.0.0.0'
Expand Down
3 changes: 2 additions & 1 deletion docs/Compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The Ruby Datadog Trace library is open source. See the [dd-trace-rb][1] GitHub r

| Type | Documentation | Version | Support type | Gem version support |
| ----- | -------------------------- | ----- | ------------------------------------ | ------------------- |
| MRI | https://www.ruby-lang.org/ | 3.2 | Full | Latest |
| MRI | https://www.ruby-lang.org/ | 3.3 | Full | Latest |
| | | 3.2 | Full | Latest |
| | | 3.1 | Full | Latest |
| | | 3.0 | Full | Latest |
| | | 2.7 | Full | Latest |
Expand Down
8 changes: 8 additions & 0 deletions ext/ddtrace_profiling_native_extension/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ def add_compiler_flag(flag)
$defs << '-DUSE_LEGACY_RB_VM_FRAME_METHOD_ENTRY'
end

# On older Rubies, rb_gc_force_recycle allowed to free objects in a way that
# would be invisible to free tracepoints, finalizers and without cleaning
# obj_to_id_tbl mappings.
$defs << '-DHAVE_WORKING_RB_GC_FORCE_RECYCLE' if RUBY_VERSION < '3.1'

# On older Rubies, there was no RUBY_SEEN_OBJ_ID flag
$defs << '-DNO_SEEN_OBJ_ID_FLAG' if RUBY_VERSION < '2.7'

# If we got here, libdatadog is available and loaded
ENV['PKG_CONFIG_PATH'] = "#{ENV['PKG_CONFIG_PATH']}:#{Libdatadog.pkgconfig_folder}"
Logging.message("[ddtrace] PKG_CONFIG_PATH set to #{ENV['PKG_CONFIG_PATH'].inspect}\n")
Expand Down
Loading

0 comments on commit 83a4ec0

Please sign in to comment.