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

RUM-4591 chore: Add diagnostic attributes to "RUM Session Ended" telemetry #1904

Conversation

ncreated
Copy link
Member

@ncreated ncreated commented Jun 13, 2024

What and why?

📦 🔭 According to the spec (internal), this PR adds "diagnostic attributes" to "RUM Session Ended" telemetry.

This is a follow-up on #1866 where we implemented a handset of "quality attributes".

How?

The list of added attributes:

rse.has_background_events_tracking_enabled

Indicates whether tracking of background events was enabled in the RUM configuration.

rse.views_count.by_instrumentation

Holds the map of instrumentation type to the number of distinct views (view UUIDs) tracked through it (manual | swiftui | uikit).

rse.views_count.with_has_replay

The number of views with has_replay == true.

rse.ntp_offset

The NTP offset at the beginning and end of the session.

rse.no_view_events_count

The number of events (actions | resources | errors | long_tasks) dropped because there was no active view at the time they occurred.

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/

@ncreated ncreated self-assigned this Jun 13, 2024
@datadog-datadog-prod-us1
Copy link

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

Datadog Report

Branch report: ncreated/RUM-4591/send-diagnostic-attributes-in-session-ended-telemetry
Commit report: 8551142
Test service: dd-sdk-ios

❌ 1 Failed (0 Known Flaky), 1490 Passed, 0 Skipped, 1m 21.09s Total Time
⬆️ Test Sessions change in coverage: 4 increased, 2 no change

❌ Failed Tests (1)

  • testParentSpanPropagation - NetworkInstrumentationIntegrationTests - Details

    Expand for error
     
     Assertion Failure at NetworkInstrumentationIntegrationTests.swift:79: XCTAssertEqual failed: ("urlsession.request") is not equal to ("root")
     Assertion Failure at NetworkInstrumentationIntegrationTests.swift:81: XCTAssertEqual failed: ("Optional(DatadogInternal.SpanID(rawValue: 101))") is not equal to ("Optional(DatadogInternal.SpanID(rawValue: 100))")
     Uncaught Exception at NetworkInstrumentationIntegrationTests.swift:82: XCTAssertEqual failed: threw error "Exception(description: "No value for key path \`metrics._top_level\`")"
     Assertion Failure at NetworkInstrumentationIntegrationTests.swift:85: XCTAssertEqual failed: ("root") is not equal to ("urlsession.request")
     Assertion Failure at NetworkInstrumentationIntegrationTests.swift:87: XCTAssertEqual failed: ("Optional(DatadogInternal.SpanID(rawValue: 0))") is not equal to ("Optional(DatadogInternal.SpanID(rawValue: 100))")
     Assertion Failure at NetworkInstrumentationIntegrationTests.swift:88: XCTAssertEqual failed: ("Optional(DatadogInternal.SpanID(rawValue: 100))") is not equal to ("Optional(DatadogInternal.SpanID(rawValue: 101))")
    

@ncreated ncreated marked this pull request as ready for review June 13, 2024 12:38
@ncreated ncreated requested review from a team as code owners June 13, 2024 12:38
Copy link
Contributor

@ganeshnj ganeshnj left a comment

Choose a reason for hiding this comment

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

A more fundamental question on choice of type in the PR. The changes looks good.

DatadogRUM/Sources/SDKMetrics/SessionEndedMetric.swift Outdated Show resolved Hide resolved
to avoid memory footprint on struct mutations
@ncreated ncreated requested a review from ganeshnj June 14, 2024 12:59
ganeshnj
ganeshnj previously approved these changes Jun 14, 2024
@ncreated ncreated merged commit 1563925 into develop Jun 17, 2024
6 checks passed
@ncreated ncreated deleted the ncreated/RUM-4591/send-diagnostic-attributes-in-session-ended-telemetry branch June 17, 2024 12:41
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