Skip to content

Conversation

@mario-launchdarkly
Copy link
Contributor

@mario-launchdarkly mario-launchdarkly commented Oct 21, 2025

  • cpu auto instrumentation
  • memory auto instrumentation
  • both cpu and memory report values that matches the Xcode's debug navigator

Note

Adds CPU and memory auto-instrumentation with periodic metric reporting, expands semantic attributes, and refactors metrics to a new Meter facade/reader setup.

  • Auto-instrumentation:
    • Add .memory and .cpu to Options.AutoInstrumented; enable selection via options.autoInstrumentation.
    • Implement AutoInstrumentation lifecycle (start/stop), add MeasurementTask for periodic sampling.
    • New CPU sampling (CpuUtilizationManager, CPUUsageReport) and memory sampling (MemoryUseManager, MemoryReport).
    • Start/stop wiring: auto tasks started in ObservabilityClientFactory; stopped in ObservabilityClient.deinit.
  • Metrics pipeline:
    • Replace direct MeterDecorator usage with MetricsApiFactory.make + MeterFacade and PeriodicMetricReader.
    • Emit new metrics: system.cpu.utilization, system.memory.app_usage_bytes, system.memory.app_total_bytes.
  • Semantic attributes & resource setup:
    • Add service.name, service.version, service.namespace and include serviceName/serviceVersion as resource attributes.
  • Networking/UI instrumentation:
    • Conform managers to new lifecycle (start/stop where applicable).
  • Example app config:
    • Configure autoInstrumentation to include URLSession, user taps, memory, and CPU; set crash reporting disabled.

Written by Cursor Bugbot for commit 82fea2f. This will update automatically on new commits. Configure here.

@mario-launchdarkly mario-launchdarkly requested a review from a team as a code owner October 21, 2025 23:35
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@abelonogov-ld abelonogov-ld left a comment

Choose a reason for hiding this comment

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

Looking good!

@mario-launchdarkly mario-launchdarkly merged commit 95ca6fc into main Oct 22, 2025
4 checks passed
@mario-launchdarkly mario-launchdarkly deleted the feature/system-info branch October 22, 2025 20:17
Vadman97 pushed a commit that referenced this pull request Oct 23, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.4.0](swift-launchdarkly-observability-v0.3.0...swift-launchdarkly-observability-v0.4.0)
(2025-10-23)


### Features

* Add GraphQL Client
([5e52365](5e52365))
* add gzip compression
([d2133a7](d2133a7))
* Add LightWeight GraphQL Client
([ed9f6b5](ed9f6b5))
* Add LightWeight GraphQL Client
([#12](#12))
([ed9f6b5](ed9f6b5))
* add standard output logger for debug
([#16](#16))
([435f4cb](435f4cb))
* add tap handler, send span
([#7](#7))
([96cf5ef](96cf5ef))
* add timeout for custom crash filter as param (10s default)
([daaa111](daaa111))
* instrumentation and session managers
([b6f1c05](b6f1c05))
* instrumentation and session managers
([#1](#1))
([a072154](a072154))
* instrumentation, client, sdk, crash report, network
([2255e48](2255e48))
* instrumentation, client, sdk, crash report, network
([#5](#5))
([df712ab](df712ab))
* ios26 transition
([0853a19](0853a19))
* plugin implementation
([c38588c](c38588c))
* plugin implementation
([#4](#4))
([1849209](1849209))
* sampling api
([#10](#10))
([242149f](242149f))
* set sampling config via graphql client
([#19](#19))
([500f550](500f550))
* swipe tracker
([4fca19d](4fca19d))
* swipe tracker
([#13](#13))
([0a302d7](0a302d7))
* **system-metrics:** add auto instrumentation for cpu and memory
([#36](#36))
([95ca6fc](95ca6fc))
* use apple format for crash report
([1390973](1390973))


### Bug Fixes

* compilation
([bdd3e22](bdd3e22))
* eval hook
([2749468](2749468))
* eval hook
([#8](#8))
([4b60b80](4b60b80))
* get sampling config
([#21](#21))
([12e35c7](12e35c7))
* guard inconsistent [weak self]
([59dce74](59dce74))
* Limit Package.swift to iOS and TV
([#34](#34))
([7d76b65](7d76b65))
* requirement 1.2.3.6 span name in eval hook
([#14](#14))
([ad15ef9](ad15ef9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Prepare 0.4.0 release: add changelog and bump manifest version.
> 
> - **Docs**:
> - Add `CHANGELOG.md` for `0.4.0`, outlining new features and bug
fixes.
> - **Release**:
> - Bump version in `.release-please-manifest.json` from `0.3.0` to
`0.4.0`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4381ca4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Vadman97 pushed a commit that referenced this pull request Oct 24, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.5.0](0.4.0...v0.5.0)
(2025-10-24)


### Features

* log memory warnings instrumentation
([#40](#40))
([4f9ccf0](4f9ccf0))
* maskWebView option and accesibilityIdentifier support
([#44](#44))
([7d029bd](7d029bd))
* Session Replay App Life Cycle
([#45](#45))
([5a2fc4d](5a2fc4d))
* **system-metrics:** add auto instrumentation for cpu and memory
([#36](#36))
([95ca6fc](95ca6fc))


### Bug Fixes

* Limit Package.swift to iOS and TV
([#34](#34))
([7d76b65](7d76b65))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Bumps to 0.5.0 and updates changelog with new instrumentation/features
and an iOS/TV packaging fix.
> 
> - **Changelog (0.5.0)**:
>   - **Features**:
>     - Log memory warnings instrumentation
>     - `maskWebView` option and `accessibilityIdentifier` support
>     - Session Replay app lifecycle
>     - Auto-instrumentation for CPU and memory (`system-metrics`)
>   - **Bug Fix**:
>     - Limit `Package.swift` to iOS and tvOS
> - **Release**:
>   - Update `.release-please-manifest.json` from `0.4.0` to `0.5.0`
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
71c4dc4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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