ddtrace 1.20.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +115 -1
- data/LICENSE-3rdparty.csv +1 -1
- data/bin/ddprofrb +15 -0
- data/bin/ddtracerb +3 -1
- data/ext/{ddtrace_profiling_loader/ddtrace_profiling_loader.c → datadog_profiling_loader/datadog_profiling_loader.c} +2 -2
- data/ext/{ddtrace_profiling_loader → datadog_profiling_loader}/extconf.rb +3 -3
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_cpu_and_wall_time_worker.c +238 -61
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_discrete_dynamic_sampler.c +145 -72
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_discrete_dynamic_sampler.h +17 -5
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_thread_context.c +97 -4
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/extconf.rb +2 -2
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/heap_recorder.c +45 -3
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/heap_recorder.h +7 -1
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/http_transport.c +15 -19
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/native_extension_helpers.rb +4 -4
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/private_vm_api_access.c +14 -0
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/private_vm_api_access.h +4 -0
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/profiling.c +1 -1
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/ruby_helpers.c +10 -0
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/ruby_helpers.h +2 -0
- data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/stack_recorder.c +7 -9
- data/lib/datadog/appsec/contrib/rack/request_middleware.rb +43 -13
- data/lib/datadog/appsec/event.rb +1 -1
- data/lib/datadog/auto_instrument.rb +3 -0
- data/lib/datadog/core/configuration/components.rb +7 -6
- data/lib/datadog/core/configuration/option.rb +8 -6
- data/lib/datadog/core/configuration/settings.rb +130 -63
- data/lib/datadog/core/configuration.rb +20 -4
- data/lib/datadog/core/diagnostics/environment_logger.rb +4 -3
- data/lib/datadog/core/environment/git.rb +25 -0
- data/lib/datadog/core/environment/identity.rb +18 -48
- data/lib/datadog/core/environment/platform.rb +7 -1
- data/lib/datadog/core/git/ext.rb +2 -23
- data/lib/datadog/core/remote/client/capabilities.rb +1 -1
- data/lib/datadog/core/remote/negotiation.rb +2 -2
- data/lib/datadog/core/remote/transport/http/config.rb +1 -1
- data/lib/datadog/core/remote/worker.rb +7 -4
- data/lib/datadog/core/telemetry/client.rb +18 -10
- data/lib/datadog/core/telemetry/emitter.rb +9 -13
- data/lib/datadog/core/telemetry/event.rb +247 -57
- data/lib/datadog/core/telemetry/ext.rb +1 -0
- data/lib/datadog/core/telemetry/heartbeat.rb +1 -3
- data/lib/datadog/core/telemetry/http/ext.rb +4 -1
- data/lib/datadog/core/telemetry/http/transport.rb +9 -4
- data/lib/datadog/core/telemetry/request.rb +59 -0
- data/lib/datadog/core/transport/ext.rb +2 -0
- data/lib/datadog/core/utils/url.rb +25 -0
- data/lib/datadog/profiling/collectors/code_provenance.rb +10 -4
- data/lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb +31 -0
- data/lib/datadog/profiling/collectors/info.rb +101 -0
- data/lib/datadog/profiling/component.rb +34 -28
- data/lib/datadog/profiling/exporter.rb +19 -5
- data/lib/datadog/profiling/ext.rb +2 -0
- data/lib/datadog/profiling/flush.rb +6 -3
- data/lib/datadog/profiling/http_transport.rb +5 -1
- data/lib/datadog/profiling/load_native_extension.rb +19 -6
- data/lib/datadog/profiling/native_extension.rb +1 -1
- data/lib/datadog/profiling/tag_builder.rb +5 -0
- data/lib/datadog/profiling/tasks/exec.rb +3 -3
- data/lib/datadog/profiling/tasks/help.rb +3 -3
- data/lib/datadog/profiling.rb +13 -2
- data/lib/datadog/tracing/contrib/action_mailer/events/deliver.rb +1 -1
- data/lib/datadog/tracing/contrib/active_record/configuration/resolver.rb +11 -4
- data/lib/datadog/tracing/contrib/concurrent_ruby/async_patch.rb +20 -0
- data/lib/datadog/tracing/contrib/concurrent_ruby/patcher.rb +11 -1
- data/lib/datadog/tracing/contrib/configurable.rb +1 -1
- data/lib/datadog/tracing/contrib/extensions.rb +6 -2
- data/lib/datadog/tracing/contrib/pg/instrumentation.rb +11 -4
- data/lib/datadog/tracing/sampling/matcher.rb +23 -3
- data/lib/datadog/tracing/sampling/rule.rb +7 -2
- data/lib/datadog/tracing/sampling/rule_sampler.rb +2 -0
- data/lib/datadog/tracing/trace_operation.rb +1 -2
- data/lib/datadog/tracing/transport/http.rb +1 -0
- data/lib/datadog/tracing/transport/trace_formatter.rb +31 -0
- data/lib/ddtrace/version.rb +1 -1
- metadata +55 -62
- data/ext/ddtrace_profiling_native_extension/pid_controller.c +0 -57
- data/ext/ddtrace_profiling_native_extension/pid_controller.h +0 -45
- data/lib/datadog/core/telemetry/collector.rb +0 -250
- data/lib/datadog/core/telemetry/v1/app_event.rb +0 -59
- data/lib/datadog/core/telemetry/v1/application.rb +0 -92
- data/lib/datadog/core/telemetry/v1/configuration.rb +0 -25
- data/lib/datadog/core/telemetry/v1/dependency.rb +0 -43
- data/lib/datadog/core/telemetry/v1/host.rb +0 -59
- data/lib/datadog/core/telemetry/v1/install_signature.rb +0 -38
- data/lib/datadog/core/telemetry/v1/integration.rb +0 -64
- data/lib/datadog/core/telemetry/v1/product.rb +0 -36
- data/lib/datadog/core/telemetry/v1/telemetry_request.rb +0 -106
- data/lib/datadog/core/telemetry/v2/app_client_configuration_change.rb +0 -41
- data/lib/datadog/core/telemetry/v2/request.rb +0 -29
- data/lib/datadog/profiling/diagnostics/environment_logger.rb +0 -39
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/NativeExtensionDesign.md +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/clock_id.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/clock_id_from_pthread.c +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/clock_id_noop.c +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_dynamic_sampling_rate.c +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_dynamic_sampling_rate.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_gc_profiling_helper.c +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_gc_profiling_helper.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_idle_sampling_helper.c +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_idle_sampling_helper.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_stack.c +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_stack.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/collectors_thread_context.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/helpers.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/libdatadog_helpers.c +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/libdatadog_helpers.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/setup_signal_handler.c +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/setup_signal_handler.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/stack_recorder.h +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/time_helpers.c +0 -0
- /data/ext/{ddtrace_profiling_native_extension → datadog_profiling_native_extension}/time_helpers.h +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55da7739191e23ba6bb188ade9979c9dbd0a965bddfd2faedd6bf2c41b3a6e97
|
4
|
+
data.tar.gz: 98bfd95dc6dd156d3d57f2ac22deb081a8e6fb8d3221eadf6e682f45e358ef7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 526f2826818f960ca18703a03cc0bde6313203a4e2dd03a696b8bd08f5a12cd963c370a8a9278d7387d81cf4445b849693fdbb8f91989f27f20d4f5bf55ad1a2
|
7
|
+
data.tar.gz: 9b8d42db31a997fd7f03e383e0e2671730577336f5bdb28bf36afd63e775639f584abb8d2005265835fc175c29ae275f5cdfea79ba9afe02eb16a3a826f47d70
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,81 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [1.22.0] - 2024-04-16
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
* Tracing: Add sampling rules by trace resouce and tags ([#3587][], [#3585][])
|
10
|
+
* Appsec: Add WAF vendor header support ([#3528][])
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
* Upgrade `Telemetry` to V2 ([#3551][])
|
15
|
+
* Upgrade to libdatadog 7 ([#3536][])
|
16
|
+
* Profiling: Enable Garbage Collection profiling by default ([#3558][])
|
17
|
+
* Profiling: Skip heap samples with age 0 ([#3573][])
|
18
|
+
* Profiling: Support falling back into extension directory when loading profiler ([#3582][])
|
19
|
+
|
20
|
+
### Fixed
|
21
|
+
|
22
|
+
* Appsec: Fix MIME-style newlines with strict base64 encoding ([#3565][])
|
23
|
+
|
24
|
+
## [2.0.0.beta1] - 2024-03-22
|
25
|
+
|
26
|
+
Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v2.0.0.beta1
|
27
|
+
|
28
|
+
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v1.21.1...v2.0.0.beta1
|
29
|
+
|
30
|
+
See https://github.com/DataDog/dd-trace-rb/blob/v2.0.0.beta1/docs/UpgradeGuide2.md.
|
31
|
+
|
32
|
+
## [1.21.1] - 2024-03-20
|
33
|
+
|
34
|
+
### Added
|
35
|
+
|
36
|
+
* Backports auto instrument shim with `datadog/auto_instrument` ([#3535][])
|
37
|
+
|
38
|
+
### Fixed
|
39
|
+
|
40
|
+
* Fix ActiveRecord resolving invalid string ([#3523][])
|
41
|
+
* Revert `http.route` tagging to fix instrumentation failure for Rails 7.1 apps ([#3539][])
|
42
|
+
* Fix wrong permissions on released gem files ([#3531][])
|
43
|
+
|
44
|
+
## [1.21.0] - 2024-03-14
|
45
|
+
|
46
|
+
### Highlights
|
47
|
+
Allocation profiling is now in beta, and timeline profiling is enabled by default.
|
48
|
+
For more details, check the [release notes](https://github.com/DataDog/dd-trace-rb/releases/tag/v1.21.0)
|
49
|
+
|
50
|
+
### Added
|
51
|
+
|
52
|
+
* APM source code integration ([#3463][])
|
53
|
+
* Core: Reduce startup logs verbosity ([#3468][])
|
54
|
+
* Tracing: Add Concurrent::Async instrumentation ([#3427][])
|
55
|
+
* Profiling: System info support ([#3357][])
|
56
|
+
* Profiling: Add bin/ddprofrb ([#3501][])
|
57
|
+
|
58
|
+
### Changed
|
59
|
+
|
60
|
+
* Bump datadog-ci dependency to 0.8.1 ([#3518][])
|
61
|
+
* Upgrade to libdatadog 6 ([#3455][])
|
62
|
+
* Core: Allow suppressing error logs for Core::Remote::Negotiation ([#3495][])
|
63
|
+
* Tracing: Add `http.route` tag to rack ([#3345][])
|
64
|
+
* Tracing: Logs deprecation warning for `use` removal ([#3438][])
|
65
|
+
* Profiling: Allocation sampling overhead improvements ([#3434][], [#3440][])
|
66
|
+
* Profiling: Enable timeline by default ([#3428][])
|
67
|
+
* Profiling: Rename Profiling files to reflect "datadog" instead of "ddtrace" ([#3502][])
|
68
|
+
* Profiling: Replace `profiling.advanced.experimental_allocation_enabled` with `profiling.allocation_enabled` and remove experimental warning ([#3520][])
|
69
|
+
|
70
|
+
### Fixed
|
71
|
+
|
72
|
+
* Core: Fix rare remote configuration worker thread leak ([#3519][])
|
73
|
+
* Tracing: Fix `Datadog::Tracing.reject!` with correct metrics ([#3491][])
|
74
|
+
* Tracing: Guard PG result with `nil` check ([#3511][])
|
75
|
+
* Profiling: Add workaround for Ruby VM bug causing crash in gc_finalize_deferred ([#3473][])
|
76
|
+
* Profiling: Fix missing profiling code hotspots when using ddtrace+otel ([#3466][])
|
77
|
+
* Profiling: Stop worker on clock failure ([#3439][])
|
78
|
+
* Profiling: Upgrade libdatadog to fix incorrect platform detection for x86_64-linux-gnu/aarch64-linux-gnu ([#3503][])
|
79
|
+
|
5
80
|
## [1.20.0] - 2024-02-05
|
6
81
|
|
7
82
|
### Added
|
@@ -2728,7 +2803,11 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
|
|
2728
2803
|
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
2729
2804
|
|
2730
2805
|
|
2731
|
-
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v1.
|
2806
|
+
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v1.22.0...master
|
2807
|
+
[1.22.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.21.1...v1.22.0
|
2808
|
+
[2.0.0.beta1]: https://github.com/DataDog/dd-trace-rb/compare/v1.21.1...v2.0.0.beta1
|
2809
|
+
[1.21.1]: https://github.com/DataDog/dd-trace-rb/compare/v1.21.0...v1.21.1
|
2810
|
+
[1.21.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.20.0...v1.21.0
|
2732
2811
|
[1.20.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.19.0...v1.20.0
|
2733
2812
|
[1.19.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.18.0...v1.19.0
|
2734
2813
|
[1.18.0]: https://github.com/DataDog/dd-trace-rb/compare/v1.17.0...v1.18.0
|
@@ -3979,10 +4058,12 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
3979
4058
|
[#3328]: https://github.com/DataDog/dd-trace-rb/issues/3328
|
3980
4059
|
[#3329]: https://github.com/DataDog/dd-trace-rb/issues/3329
|
3981
4060
|
[#3333]: https://github.com/DataDog/dd-trace-rb/issues/3333
|
4061
|
+
[#3345]: https://github.com/DataDog/dd-trace-rb/issues/3345
|
3982
4062
|
[#3349]: https://github.com/DataDog/dd-trace-rb/issues/3349
|
3983
4063
|
[#3352]: https://github.com/DataDog/dd-trace-rb/issues/3352
|
3984
4064
|
[#3354]: https://github.com/DataDog/dd-trace-rb/issues/3354
|
3985
4065
|
[#3356]: https://github.com/DataDog/dd-trace-rb/issues/3356
|
4066
|
+
[#3357]: https://github.com/DataDog/dd-trace-rb/issues/3357
|
3986
4067
|
[#3360]: https://github.com/DataDog/dd-trace-rb/issues/3360
|
3987
4068
|
[#3361]: https://github.com/DataDog/dd-trace-rb/issues/3361
|
3988
4069
|
[#3362]: https://github.com/DataDog/dd-trace-rb/issues/3362
|
@@ -3996,7 +4077,40 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
3996
4077
|
[#3408]: https://github.com/DataDog/dd-trace-rb/issues/3408
|
3997
4078
|
[#3420]: https://github.com/DataDog/dd-trace-rb/issues/3420
|
3998
4079
|
[#3426]: https://github.com/DataDog/dd-trace-rb/issues/3426
|
4080
|
+
[#3427]: https://github.com/DataDog/dd-trace-rb/issues/3427
|
4081
|
+
[#3428]: https://github.com/DataDog/dd-trace-rb/issues/3428
|
3999
4082
|
[#3431]: https://github.com/DataDog/dd-trace-rb/issues/3431
|
4083
|
+
[#3434]: https://github.com/DataDog/dd-trace-rb/issues/3434
|
4084
|
+
[#3438]: https://github.com/DataDog/dd-trace-rb/issues/3438
|
4085
|
+
[#3439]: https://github.com/DataDog/dd-trace-rb/issues/3439
|
4086
|
+
[#3440]: https://github.com/DataDog/dd-trace-rb/issues/3440
|
4087
|
+
[#3455]: https://github.com/DataDog/dd-trace-rb/issues/3455
|
4088
|
+
[#3463]: https://github.com/DataDog/dd-trace-rb/issues/3463
|
4089
|
+
[#3466]: https://github.com/DataDog/dd-trace-rb/issues/3466
|
4090
|
+
[#3468]: https://github.com/DataDog/dd-trace-rb/issues/3468
|
4091
|
+
[#3473]: https://github.com/DataDog/dd-trace-rb/issues/3473
|
4092
|
+
[#3491]: https://github.com/DataDog/dd-trace-rb/issues/3491
|
4093
|
+
[#3495]: https://github.com/DataDog/dd-trace-rb/issues/3495
|
4094
|
+
[#3501]: https://github.com/DataDog/dd-trace-rb/issues/3501
|
4095
|
+
[#3502]: https://github.com/DataDog/dd-trace-rb/issues/3502
|
4096
|
+
[#3503]: https://github.com/DataDog/dd-trace-rb/issues/3503
|
4097
|
+
[#3511]: https://github.com/DataDog/dd-trace-rb/issues/3511
|
4098
|
+
[#3518]: https://github.com/DataDog/dd-trace-rb/issues/3518
|
4099
|
+
[#3519]: https://github.com/DataDog/dd-trace-rb/issues/3519
|
4100
|
+
[#3520]: https://github.com/DataDog/dd-trace-rb/issues/3520
|
4101
|
+
[#3523]: https://github.com/DataDog/dd-trace-rb/issues/3523
|
4102
|
+
[#3528]: https://github.com/DataDog/dd-trace-rb/issues/3528
|
4103
|
+
[#3531]: https://github.com/DataDog/dd-trace-rb/issues/3531
|
4104
|
+
[#3535]: https://github.com/DataDog/dd-trace-rb/issues/3535
|
4105
|
+
[#3536]: https://github.com/DataDog/dd-trace-rb/issues/3536
|
4106
|
+
[#3539]: https://github.com/DataDog/dd-trace-rb/issues/3539
|
4107
|
+
[#3551]: https://github.com/DataDog/dd-trace-rb/issues/3551
|
4108
|
+
[#3558]: https://github.com/DataDog/dd-trace-rb/issues/3558
|
4109
|
+
[#3565]: https://github.com/DataDog/dd-trace-rb/issues/3565
|
4110
|
+
[#3573]: https://github.com/DataDog/dd-trace-rb/issues/3573
|
4111
|
+
[#3582]: https://github.com/DataDog/dd-trace-rb/issues/3582
|
4112
|
+
[#3585]: https://github.com/DataDog/dd-trace-rb/issues/3585
|
4113
|
+
[#3587]: https://github.com/DataDog/dd-trace-rb/issues/3587
|
4000
4114
|
[@AdrianLC]: https://github.com/AdrianLC
|
4001
4115
|
[@Azure7111]: https://github.com/Azure7111
|
4002
4116
|
[@BabyGroot]: https://github.com/BabyGroot
|
data/LICENSE-3rdparty.csv
CHANGED
@@ -2,7 +2,7 @@ Component,Origin,License,Copyright
|
|
2
2
|
lib/datadog/core/vendor/multipart-post,https://github.com/socketry/multipart-post,MIT,"Copyright (c) 2007-2013 Nick Sieger."
|
3
3
|
lib/datadog/tracing/contrib/active_record/vendor,https://github.com/rails/rails/,MIT,"Copyright (c) 2005-2018 David Heinemeier Hansson"
|
4
4
|
lib/datadog/tracing/contrib/utils/quantization/http.rb,https://github.com/ruby/uri,BSD-2-Clause,"Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved."
|
5
|
-
ext/
|
5
|
+
ext/datadog_profiling_native_extension/private_vm_api_access,https://github.com/ruby/ruby,BSD-2-Clause,"Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved."
|
6
6
|
msgpack,https://rubygems.org/gems/msgpack,Apache-2.0,"Copyright (c) 2008-2015 Sadayuki Furuhashi"
|
7
7
|
debase-ruby_core_source,https://rubygems.org/gems/debase-ruby_core_source,MIT for gem and BSD-2-Clause for Ruby sources,"Copyright (c) 2012 Gabriel Horner. Files from Ruby sources are Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved."
|
8
8
|
lib/datadog/core/vendor/ipaddr,https://github.com/ruby/ipaddr/blob/master/lib/ipaddr.rb,BSD 2-Clause "Simplified" License,"Copyright (c) 2002 Hajimu UMEMOTO <ume@mahoroba.org> Copyright (c) 2007-2017 Akinori MUSHA <knu@iDaemons.org>"
|
data/bin/ddprofrb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'datadog/profiling/tasks/exec'
|
3
|
+
require 'datadog/profiling/tasks/help'
|
4
|
+
|
5
|
+
command = ARGV.shift
|
6
|
+
|
7
|
+
case command
|
8
|
+
when 'exec'
|
9
|
+
Datadog::Profiling::Tasks::Exec.new(ARGV).run
|
10
|
+
when 'help', '--help'
|
11
|
+
Datadog::Profiling::Tasks::Help.new.run
|
12
|
+
else
|
13
|
+
puts "Command '#{command}' is not valid for ddprofrb."
|
14
|
+
Datadog::Profiling::Tasks::Help.new.run
|
15
|
+
end
|
data/bin/ddtracerb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
Kernel.warn 'WARNING: Use of `ddtracerb` is deprecated, and will be removed in 2.0. Use `ddprofrb` instead.'
|
3
|
+
|
2
4
|
require 'datadog/profiling/tasks/exec'
|
3
5
|
require 'datadog/profiling/tasks/help'
|
4
6
|
|
@@ -10,6 +12,6 @@ when 'exec'
|
|
10
12
|
when 'help', '--help'
|
11
13
|
Datadog::Profiling::Tasks::Help.new.run
|
12
14
|
else
|
13
|
-
puts "Command '#{command}' is not valid for
|
15
|
+
puts "Command '#{command}' is not valid for ddtracerb."
|
14
16
|
Datadog::Profiling::Tasks::Help.new.run
|
15
17
|
end
|
@@ -14,7 +14,7 @@
|
|
14
14
|
// up other's symbols (`RTLD_DEEPBIND`).
|
15
15
|
//
|
16
16
|
// But Ruby's extension loading mechanism is not configurable -- there's no way to tell it to use different flags when
|
17
|
-
// calling `dlopen`. To get around this, this file (
|
17
|
+
// calling `dlopen`. To get around this, this file (datadog_profiling_loader.c) introduces another extension
|
18
18
|
// (profiling loader) which has only a single responsibility: mimic Ruby's extension loading mechanism, but when calling
|
19
19
|
// `dlopen` use a different set of flags.
|
20
20
|
// This idea was shamelessly stolen from @lloeki's work in https://github.com/rubyjs/mini_racer/pull/179, big thanks!
|
@@ -48,7 +48,7 @@ static void unload_failed_library(void *handle);
|
|
48
48
|
|
49
49
|
#define DDTRACE_EXPORT __attribute__ ((visibility ("default")))
|
50
50
|
|
51
|
-
void DDTRACE_EXPORT
|
51
|
+
void DDTRACE_EXPORT Init_datadog_profiling_loader(void) {
|
52
52
|
VALUE datadog_module = rb_define_module("Datadog");
|
53
53
|
VALUE profiling_module = rb_define_module_under(datadog_module, "Profiling");
|
54
54
|
VALUE loader_module = rb_define_module_under(profiling_module, "Loader");
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
if RUBY_ENGINE != 'ruby' || Gem.win_platform?
|
5
5
|
$stderr.puts(
|
6
|
-
'WARN: Skipping build of
|
6
|
+
'WARN: Skipping build of Datadog profiling loader. See Datadog profiling native extension note for details.'
|
7
7
|
)
|
8
8
|
|
9
9
|
File.write('Makefile', 'all install clean: # dummy makefile that does nothing')
|
@@ -46,7 +46,7 @@ add_compiler_flag '-Werror-implicit-function-declaration'
|
|
46
46
|
add_compiler_flag '-Wunused-parameter'
|
47
47
|
|
48
48
|
# The native extension is not intended to expose any symbols/functions for other native libraries to use;
|
49
|
-
# the sole exception being `
|
49
|
+
# the sole exception being `Init_datadog_profiling_loader` which needs to be visible for Ruby to call it when
|
50
50
|
# it `dlopen`s the library.
|
51
51
|
#
|
52
52
|
# By setting this compiler flag, we tell it to assume that everything is private unless explicitly stated.
|
@@ -64,7 +64,7 @@ add_compiler_flag '-Wextra'
|
|
64
64
|
# This makes it easier for development (avoids "oops I forgot to rebuild when I switched my Ruby") and ensures that
|
65
65
|
# the wrong library is never loaded.
|
66
66
|
# When requiring, we need to use the exact same string, including the version and the platform.
|
67
|
-
EXTENSION_NAME = "
|
67
|
+
EXTENSION_NAME = "datadog_profiling_loader.#{RUBY_VERSION}_#{RUBY_PLATFORM}".freeze
|
68
68
|
|
69
69
|
create_makefile(EXTENSION_NAME)
|
70
70
|
|