Skip to content

RUM-12069: Fix service handling in ddtags of LogEvent#3052

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/rum-12069/fix-service-in-logs-ddtags
Dec 12, 2025
Merged

RUM-12069: Fix service handling in ddtags of LogEvent#3052
0xnm merged 1 commit into
developfrom
nogorodnikov/rum-12069/fix-service-in-logs-ddtags

Conversation

@0xnm

@0xnm 0xnm commented Dec 12, 2025

Copy link
Copy Markdown
Member

What does this PR do?

Follow up for #3006

Apparently service in ddtags was dropped due to the following legacy verification

It was added before reserved tags were added by the SDK, and didn't account for variant, version, env tags we add, but hit service tag.

And since ddtags don't show up in the Log event attributes in UI and service exists also in attributes, the only way to spot this was in the Logcat.

This was also missed due to the missing test coverage in single-fit/logs, so this PR adds the necessary assertions and also the logic to drop user-provided tags if they clash with what SDK adds.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm
0xnm requested a review from a team as a code owner December 12, 2025 10:14
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Dec 12, 2025

Copy link
Copy Markdown

🎯 Code Coverage
Patch Coverage: 100.00%
Overall Coverage: 71.47% (+0.00%)

View detailed report

This comment will be updated automatically if new data arrives.
* Fix with Cursor requires Datadog plugin ≥v2.17.0
🔗 Commit SHA: 21527b5 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

ambushwork
ambushwork previously approved these changes Dec 12, 2025
@satween
satween self-requested a review December 12, 2025 10:31
satween
satween previously approved these changes Dec 12, 2025
@0xnm
0xnm dismissed stale reviews from satween and ambushwork via 21527b5 December 12, 2025 10:31
@0xnm
0xnm force-pushed the nogorodnikov/rum-12069/fix-service-in-logs-ddtags branch from b7110a1 to 21527b5 Compare December 12, 2025 10:31
@0xnm
0xnm requested review from ambushwork and satween December 12, 2025 10:34
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.22%. Comparing base (ed7f4e1) to head (21527b5).

Files with missing lines Patch % Lines
...android/log/internal/domain/DatadogLogGenerator.kt 95.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3052      +/-   ##
===========================================
- Coverage    71.24%   71.22%   -0.02%     
===========================================
  Files          866      866              
  Lines        31730    31726       -4     
  Branches      5360     5360              
===========================================
- Hits         22604    22595       -9     
- Misses        7602     7609       +7     
+ Partials      1524     1522       -2     
Files with missing lines Coverage Δ
...android/core/constraints/DatadogDataConstraints.kt 96.91% <100.00%> (-0.03%) ⬇️
.../src/main/kotlin/com/datadog/android/log/Logger.kt 97.98% <100.00%> (-0.33%) ⬇️
...in/com/datadog/android/log/internal/LogsFeature.kt 86.84% <100.00%> (-1.32%) ⬇️
...android/log/internal/domain/DatadogLogGenerator.kt 97.67% <95.00%> (-0.32%) ⬇️

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@0xnm
0xnm merged commit 10e070c into develop Dec 12, 2025
26 of 27 checks passed
@0xnm
0xnm deleted the nogorodnikov/rum-12069/fix-service-in-logs-ddtags branch December 12, 2025 16:52
@ansman

ansman commented Dec 28, 2025

Copy link
Copy Markdown

Could we get a patch release with this fix? It's creating a lot of noise in our logs.

@0xnm

0xnm commented Dec 29, 2025

Copy link
Copy Markdown
Member Author

This change doesn't qualify for the patch release: it is not affecting stability of the app and SDK logging can be disabled (this is what should be done in release builds anyway).

We will have rather a minor release out either the next week or a week after.

@ansman

ansman commented Dec 29, 2025

Copy link
Copy Markdown

Yeah we're not logging in production. But it makes development very annoying since 90% of our logcat logs is this warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants