Skip to content

feat(logs): Add global log attributes #1707

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

Merged
merged 5 commits into from
Mar 11, 2024
Merged

Conversation

fuzzybinary
Copy link
Member

@fuzzybinary fuzzybinary commented Mar 5, 2024

What and why?

Adds the ability to specify global attributes for a log on a given Core by using Logs.addAttribute and Logs.removeAttribute.

refs: RUM-3069

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

Custom CI job configuration (optional)

  • Run unit tests for Core, RUM, Trace, Logs, CR and WVT
  • Run unit tests for Session Replay
  • Run integration tests
  • Run smoke tests
  • Run tests for tools/

@fuzzybinary fuzzybinary marked this pull request as ready for review March 8, 2024 16:19
@fuzzybinary fuzzybinary requested review from a team as code owners March 8, 2024 16:19
Adds the ability to specify global attributes for a log on a given Core by using `Logs.addAttribute` and `Logs.removeAttribute`.

refs: RUM-3069
Adds logs added with Logs.addAttribute to the crash context, and sends them in the attributes when the crash is logged.

Add integration test for global log attributes.

refs: RUM-3069
@fuzzybinary fuzzybinary force-pushed the jward/RUM-3069-global-logs branch from 8eb55c5 to 7abfdcc Compare March 8, 2024 16:26
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 8, 2024

Datadog Report

Branch report: jward/RUM-3069-global-logs
Commit report: f6ca614
Test service: dd-sdk-ios

✅ 0 Failed, 2579 Passed, 0 Skipped, 23m 21.52s Wall Time
🔻 Test Sessions change in coverage: 8 decreased, 6 increased

🔻 Code Coverage Decreases vs Default Branch (8)

This report shows up to 5 code coverage decreases.

  • test DatadogWebViewTrackingTests iOS 18.30% (-4.52%) - Details
  • test DatadogTraceTests tvOS 50.99% (-0.60%) - Details
  • test DatadogTraceTests iOS 50.98% (-0.53%) - Details
  • test DatadogRUMTests iOS 79.07% (-0.47%) - Details
  • test DatadogCrashReportingTests tvOS 28.35% (-0.46%) - Details

@fuzzybinary fuzzybinary force-pushed the jward/RUM-3069-global-logs branch from 775b9e5 to 68621cb Compare March 8, 2024 18:36
Copy link
Member

@ncreated ncreated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🎯. Implementation looks clear and fine 👍.

I left few suggestions and one request to revert changes in pbxproj.

Comment on lines 1272 to 1275
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking/ The IPHONEOS_DEPLOYMENT_TARGET should be managed through local Base.local.xcconfig which is git-ignored. Let's remove all changes to this file 🙏, otherwise this is dropping iOS 11 in CI.

Comment on lines 59 to 60
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question/ Not sure on these changes - they do not look necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, yeah, probably just some changes from when I was testing crashes. I'll revert them.

Copy link
Member

@ncreated ncreated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙏

@fuzzybinary fuzzybinary merged commit 1ed1406 into develop Mar 11, 2024
@fuzzybinary fuzzybinary deleted the jward/RUM-3069-global-logs branch March 11, 2024 21:09
@ncreated ncreated mentioned this pull request Mar 12, 2024
8 tasks
@maciejburda maciejburda mentioned this pull request Mar 19, 2024
8 tasks
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.

2 participants