Skip to content

Conversation

@vpellan
Copy link
Contributor

@vpellan vpellan commented Oct 13, 2025

⚠️ DO NOT MERGE ⚠️

@github-actions
Copy link

👋 Hey @DataDog/ruby-guild, please fill "Change log entry" section in the pull request description.

If changes need to be present in CHANGELOG.md you can state it this way

**Change log entry**

Yes. A brief summary to be placed into the CHANGELOG.md

(possible answers Yes/Yep/Yeah)

Or you can opt out like that

**Change log entry**

None.

(possible answers No/Nope/None)

Visited at: 2025-10-13 09:40:13 UTC

@github-actions
Copy link

github-actions bot commented Oct 13, 2025

Typing analysis

This PR does not change typing compared to the base branch.

@github-actions github-actions bot added core Involves Datadog core libraries integrations Involves tracing integrations profiling Involves Datadog profiling appsec Application Security monitoring product tracing single-step Single Step APM Instrumentation labels Oct 13, 2025
@vpellan vpellan force-pushed the community/pr-4916 branch 2 times, most recently from b0625d0 to 862e55a Compare October 13, 2025 09:43
@vpellan vpellan removed core Involves Datadog core libraries profiling Involves Datadog profiling appsec Application Security monitoring product single-step Single Step APM Instrumentation labels Oct 13, 2025
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Oct 13, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 98.58% (+0.05%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6a1f75f | Docs | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Oct 13, 2025

Benchmarks

Benchmark execution time: 2025-10-21 08:47:20

Comparing candidate commit 6a1f75f in PR branch community/pr-4916 with baseline commit 2f20b9a in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 2 unstable metrics.

The current Active Job integration injects a log correlation tag into the logger via `around_perform`, which is too late to pick up the following logs:

```
[ActiveJob] [FooJob] [540c4718-6668-4f3c-9411-ca52a4cffd15] Performing FooJob (Job ID: 540c4718-6668-4f3c-9411-ca52a4cffd15) from Sidekiq(default) enqueued at 2025-09-26T02:17:44.160363327Z with arguments: #<GlobalID:0x00007f0fae88cb50 @uri=#<URI::GID gid://foo-rails/Foo/019983cf-8422-72d5-85b7-f3dc09a4887e>>
[ActiveJob] [FooJob] [540c4718-6668-4f3c-9411-ca52a4cffd15] Performed FooJob (Job ID: 540c4718-6668-4f3c-9411-ca52a4cffd15) from Sidekiq(default) in 990.29ms
```

Instead of using `around_perform`, we now do the same thing that [Active Job itself](https://github.com/rails/rails/blob/v8.0.3/activejob/lib/active_job/logging.rb#L31-L33) does to tag logs with `[ActiveJob]`, the job class name, and job ID, which is wrapping `perform_now`.

Note that this only works on Active Job 6+, so we inject different log correlation logic depending on the Active Job version.
@vpellan vpellan closed this Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrations Involves tracing integrations tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants