-
Notifications
You must be signed in to change notification settings - Fork 398
Add origin detection #5028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add origin detection #5028
Conversation
…d container modules - Fix type checking errors in core environment and container modules - Update RBS type signature files to match implementations - Add comprehensive error handling test case for running_on_host? - Improve type safety across configuration and transport modules - Update supported configurations and dependencies
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR clears 5 untyped methods and 1 partially typed method. It increases the percentage of typed methods from 53.09% to 53.7% (+0.61%). Untyped methods (+0-5)✅ Cleared:Partially typed methods (+0-1)✅ Cleared:Untyped other declarationsThis PR clears 9 untyped other declarations. It increases the percentage of typed other declarations from 66.92% to 67.87% (+0.95%). Untyped other declarations (+0-9)✅ Cleared: |
…ath handling
This commit consolidates all improvements to the Ruby tracer's container
detection mechanism, removing unnecessary debug logging that was added
during the investigation of Entity-ID header generation issues.
Key Changes:
- Remove all debug logging from cgroup.rb and container.rb
- Removed verbose info-level logging in entry() method
- Removed debug logs from cgroup file reading operations
- Replaced error logs with standard debug-level logging
- Improve code quality and clarity:
- Change 'if !path' to 'unless path' in inode_for() for readability
- Refactor entry() method for early returns instead of nested breaks
- Improve comments explaining cgroup v1/v2 preference logic
- Better variable naming (entry_obj vs entry for clarity)
- Fix root path handling for cgroup v2:
- When cgroup path is root (/) but inode exists and not on host,
use inode as fallback for container identification
- Prevents losing valid container identification in cgroup v2
- Update tests:
- Fix error logging test to expect debug level instead of error level
- Update error message pattern to match implementation
All 360 existing tests pass successfully.
Linting checks pass (frozen_string_literal, standard).
Fixes the incomplete implementation of container detection, particularly
for cgroup v2 environments with root path fallback.
| end | ||
| end | ||
|
|
||
| RSpec.shared_context 'Docker systemd environment' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcotc double check the test changes.
96456f3 to
0bf5781
Compare
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage 🔗 Commit SHA: 0bf5781 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
What does this PR do?
Add two new HTTP headers to the trace agent transport: 'Datadog-Entity-ID' and 'Datadog-External-Env'.
These headers, alongside the existing 'Datadog-Container-ID', ensure the Datadog agent knows from what container traces are coming from.
Change log entry
Yes. Add support for Origin Detection.
How to test the change?
There are unit test and system-tests (1, 2, 3) for this change.