Skip to content

Commit

Permalink
Merge branch 'master' into bar.weiss/client-ip-rack-support
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc committed Sep 8, 2022
2 parents ea3b064 + 8553ca1 commit 7bbb322
Show file tree
Hide file tree
Showing 293 changed files with 2,577 additions and 1,105 deletions.
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ Lint/EmptyClass: # (new in 1.3)
Enabled: true
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
Enabled: true
# Prevents `return` in an assignment block `var = begin; return; end` block.
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
Enabled: true
Enabled: false
Lint/NumberedParameterAssignment: # (new in 1.9)
Enabled: true
Lint/OrAssignmentToConstant: # (new in 1.9)
Expand Down
26 changes: 25 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

## [Unreleased]

## [1.4.0] - 2022-08-25

Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v1.4.0

Git diff: https://github.com/DataDog/dd-trace-rb/compare/v1.3.0...v1.4.0

### Added

* gRPC: tag `grpc.client.deadline` ([#2200][])
* Implement telemetry, disable by default ([#2153][])

### Changed

* Bump `libdatadog` dependency version ([#2229][])

### Fixed

* Fix CI instrumentation configuration ([#2219][])

## [1.3.0] - 2022-08-04

Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v1.3.0
Expand Down Expand Up @@ -2939,13 +2958,18 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
[#2138]: https://github.com/DataDog/dd-trace-rb/issues/2138
[#2140]: https://github.com/DataDog/dd-trace-rb/issues/2140
[#2150]: https://github.com/DataDog/dd-trace-rb/issues/2150
[#2153]: https://github.com/DataDog/dd-trace-rb/issues/2153
[#2158]: https://github.com/DataDog/dd-trace-rb/issues/2158
[#2162]: https://github.com/DataDog/dd-trace-rb/issues/2162
[#2163]: https://github.com/DataDog/dd-trace-rb/issues/2163
[#2170]: https://github.com/DataDog/dd-trace-rb/issues/2170
[#2173]: https://github.com/DataDog/dd-trace-rb/issues/2173
[#2174]: https://github.com/DataDog/dd-trace-rb/issues/2174
[#2180]: https://github.com/DataDog/dd-trace-rb/issues/2180
[#2200]: https://github.com/DataDog/dd-trace-rb/issues/2200
[#2201]: https://github.com/DataDog/dd-trace-rb/issues/2201
[#2219]: https://github.com/DataDog/dd-trace-rb/issues/2219
[#2229]: https://github.com/DataDog/dd-trace-rb/issues/2229
[@AdrianLC]: https://github.com/AdrianLC
[@Azure7111]: https://github.com/Azure7111
[@BabyGroot]: https://github.com/BabyGroot
Expand Down Expand Up @@ -3087,4 +3111,4 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
[@walterking]: https://github.com/walterking
[@y-yagi]: https://github.com/y-yagi
[@yukimurasawa]: https://github.com/yukimurasawa
[@zachmccormick]: https://github.com/zachmccormick
[@zachmccormick]: https://github.com/zachmccormick
8 changes: 8 additions & 0 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
- [Sampling](#sampling)
- [Application-side sampling](#application-side-sampling)
- [Priority sampling](#priority-sampling)
- [Single Span Sampling](#single-span-sampling)
- [Distributed tracing](#distributed-tracing)
- [HTTP request queuing](#http-request-queuing)
- [Processing pipeline](#processing-pipeline)
Expand Down Expand Up @@ -2042,6 +2043,7 @@ end
| `tracing.sampler` | | `nil` | Advanced usage only. Sets a custom `Datadog::Tracing::Sampling::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior. See [Application-side sampling](#application-side-sampling) for details. |
| `tracing.sampling.default_rate` | `DD_TRACE_SAMPLE_RATE` | `nil` | Sets the trace sampling rate between `0.0` (0%) and `1.0` (100%). See [Application-side sampling](#application-side-sampling) for details. |
| `tracing.sampling.rate_limit` | `DD_TRACE_RATE_LIMIT` | `100` (per second) | Sets a maximum number of traces per second to sample. Set a rate limit to avoid the ingestion volume overages in the case of traffic spikes. |
| `tracing.sampling.span_rules` | `DD_SPAN_SAMPLING_RULES`,`ENV_SPAN_SAMPLING_RULES_FILE` | `nil` | Sets [Single Span Sampling](#single-span-sampling) rules. These rules allow you to keep spans even when their respective traces are dropped. |
| `tracing.report_hostname` | `DD_TRACE_REPORT_HOSTNAME` | `false` | Adds hostname tag to traces. |
| `tracing.test_mode.enabled` | `DD_TRACE_TEST_MODE_ENABLED` | `false` | Enables or disables test mode, for use of tracing in test suites. |
| `tracing.test_mode.trace_flush` | | `nil` | Object that determines trace flushing behavior. |
Expand Down Expand Up @@ -2186,6 +2188,12 @@ trace.reject!
trace.keep!
```

#### Single Span Sampling

You can configure sampling rule that allow you keep spans despite their respective traces being dropped by a trace-level sampling rule.

[//]: # (TODO: See <Single Span Sampling documentation URL here> for the full documentation on Single Span Sampling.)

### Distributed Tracing

Distributed tracing allows traces to be propagated across multiple instrumented applications so that a request can be presented as a single trace, rather than a separate trace per service.
Expand Down
11 changes: 10 additions & 1 deletion ext/ddtrace_profiling_loader/ddtrace_profiling_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,16 @@ static bool failed_to_load(void *handle, VALUE *failure_details) {
static bool incompatible_library(void *handle, VALUE *failure_details) {
// The library being loaded may be linked to a different libruby than the current executing Ruby.
// We check if this is the case by checking if a well-known symbol resolves to a common address.
if (dlsym(handle, "ruby_xmalloc") != &ruby_xmalloc) {

void *xmalloc_from_library = dlsym(handle, "ruby_xmalloc");

if (xmalloc_from_library == NULL) {
// This happens when ruby is built without a `libruby.so` by using `--disable-shared` at compilation time.
// In this situation, no conflict between libruby version is possible.
return false;
}

if (xmalloc_from_library != &ruby_xmalloc) {
*failure_details = rb_str_new_cstr("library was compiled and linked to a different Ruby version");
unload_failed_library(handle);
return true;
Expand Down
13 changes: 8 additions & 5 deletions gemfiles/jruby_9.2.18.0_contrib.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions gemfiles/jruby_9.2.18.0_contrib_old.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions gemfiles/jruby_9.2.18.0_core_old.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions gemfiles/jruby_9.2.18.0_cucumber3.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions gemfiles/jruby_9.2.18.0_cucumber4.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions gemfiles/jruby_9.2.18.0_cucumber5.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7bbb322

Please sign in to comment.