Skip to content
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

Allow disabling app hang monitoring in ObjC API #1908

Merged

Conversation

0xnm
Copy link
Member

@0xnm 0xnm commented Jun 18, 2024

What and why?

Unlike long tasks tracking, app hang monitoring can be disabled. This PR treats 0 passed as an argument in ObjC API as a special value to disable app hang monitoring (to avoid changing property type to the optional).

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/

@0xnm 0xnm requested review from a team as code owners June 18, 2024 08:43
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jun 18, 2024

Datadog Report

Branch report: nogorodnikov/allow-disabling-app-hang-monitoring-in-objc-api
Commit report: 1ab5b91
Test service: dd-sdk-ios

✅ 0 Failed, 3104 Passed, 0 Skipped, 3m 36.65s Total Time
🔻 Test Sessions change in coverage: 9 decreased, 4 increased

🔻 Code Coverage Decreases vs Default Branch (9)

This report shows up to 5 code coverage decreases.

  • test DatadogCoreTests tvOS 78.95% (-0.58%) - Details
  • test DatadogCrashReportingTests tvOS 26.85% (-0.39%) - Details
  • test DatadogCrashReportingTests iOS 26.81% (-0.39%) - Details
  • test DatadogTraceTests tvOS 54.58% (-0.32%) - Details
  • test DatadogLogsTests tvOS 45.73% (-0.31%) - Details

mariedm
mariedm previously approved these changes Jun 18, 2024
@0xnm 0xnm force-pushed the nogorodnikov/allow-disabling-app-hang-monitoring-in-objc-api branch from 2b328f7 to 07c69f7 Compare June 18, 2024 12:16
@0xnm 0xnm requested a review from mariedm June 18, 2024 12:22
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jun 18, 2024

Datadog Report

Branch report: nogorodnikov/allow-disabling-app-hang-monitoring-in-objc-api
Commit report: b15590f
Test service: dd-sdk-ios

✅ 0 Failed, 3072 Passed, 0 Skipped, 3m 30.58s Total Time
🔻 Test Sessions change in coverage: 8 decreased, 5 increased

🔻 Code Coverage Decreases vs Default Branch (8)

This report shows up to 5 code coverage decreases.

  • test DatadogCoreTests tvOS 79.28% (-0.25%) - Details
  • test DatadogTraceTests tvOS 54.71% (-0.19%) - Details
  • test DatadogLogsTests tvOS 45.91% (-0.13%) - Details
  • test DatadogLogsTests iOS 45.86% (-0.13%) - Details
  • test DatadogCrashReportingTests tvOS 27.13% (-0.11%) - Details

@0xnm 0xnm force-pushed the nogorodnikov/allow-disabling-app-hang-monitoring-in-objc-api branch from 07c69f7 to 7f66da3 Compare June 18, 2024 13:02
@0xnm 0xnm requested a review from mariedm June 18, 2024 13:04
@0xnm 0xnm merged commit 846eda0 into develop Jun 18, 2024
6 checks passed
@@ -378,7 +378,7 @@ public class DDRUMConfiguration: NSObject {
}

@objc public var appHangThreshold: TimeInterval {
set { swiftConfig.appHangThreshold = newValue }
set { swiftConfig.appHangThreshold = newValue == 0 ? nil : newValue }
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is part of codegen and must be not be modified manually.

Copy link
Member Author

Choose a reason for hiding this comment

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

can you point me to the command which generates it? I was adding methods to this class before manually.

@maxep maxep mentioned this pull request Jul 4, 2024
4 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.

3 participants