Skip to content

Support for the new MetricKit that Apple rewrote for 27* OSes #1123

Description

@mackoj

Hello, thanks for making and maintaining this project!

During the last WWDC, Apple posted a session on MetricKit (Session 222: What's New in MetricKit) which is pretty rare. During this session, they shared that they have completely rebuilt the framework from the ground up for iOS 27 with a contextually rich, modern Swift-first API.

The new MetricManager API is positioned as the future of the framework, and all major advances are exclusive to it.
These advances include:

  • New Data Types: like the new Metal frame rate metric for rendering performance and memory exception diagnostics for insight into out-of-memory terminations
  • State-Aware Metrics: The StateReporting framework allows apps to intersect metrics with user-defined app states (like active tabs or configurations), which are delivered via stateEntries
  • API Migration: Apple explicitly recommends migrating from the legacy MXMetricManager API over to the new asynchronous MetricManager stream-based API to take advantage of these capabilities

Given that this is a significant architectural shift under the hood for telemetry, I wanted to open a discussion regarding how opentelemetry-swift plans to navigate this transition. I have a few specific questions:

  • Current Compatibility (v2.4.1): Has anyone internally or in the community tested the current SDK version 2.4.1 on devices running the new iOS 27 beta? Are there any known issues or regressions with how data is reported using the legacy hooks on the new OS?
  • Support for New Data: Are there plans to map and support the brand-new data fields now exposed by MetricKit, such as the Metal frame rate metrics, memory exception diagnostics, and the termination categories?
  • Migration & Naming Strategy: How should the SDK handle the migration from MXMetricManager to MetricManager? For example, if MetricKit fields have been renamed or if we need to support both OS versions simultaneously, is there a plan to align the metric names to keep OTel data consistent across older and newer iOS environments? Additionally, how might the new domain-scoped StateReporting data map to OpenTelemetry attributes or dimensions?

I would love to hear the maintainers thoughts on the roadmap for this, and I'm eager to see how the community can help support or test these updates!

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions