MetricKit: Custom Metrics signposts

Hi,

I'm using mxSignpost() to post custom metrics for my iOS app and I'm subscribing for receiving metric payloads, but I'm not seeing my custom signposts in the payloads. I'm only seeing the standard metrics in the payloads. If I simulate payloads in Xcode, I see the fake signposts that are generated by the simulation.

I've confirmed using breakpoints that I'm calling mxSignpost() and I've exercised the paths that to trigger the signposts.

Is there any way to see what MetricKit has logged? Otherwise, I have to wait 24 hours to see the posted payloads.

I'm testing on iPhone 8 running iOS 13.6.

Thanks,
Tom

Accepted Reply

I'm doing this in Swift, so I'm calling mxSignpost(:dso:log:name:signpostID::_:)

I'm making calls for both kinds of signposts (single event and interval), and neither kind is showing up.

Any chance this will be fixed in iOS 13.6.x?

Thanks,
Tom

Replies

Are you using MXSignpostEventEmit or MXSignpostIntervalBegin/MXSignpostIntervalEnd

MXSignpostEventEmit had an issue preventing it from working in iOS 13.6, it was fixed in 14.0.
  • Hi!

    I'm using Begin/End signals in this way:

    mxSignpost(.begin, log: myLogMadeWith_MXMetricManager_makeLogHandle, name: "something")

    and then, accordingly,

    mxSignpost(.end, log: myLogMadeWith_MXMetricManager_makeLogHandle, name: "something")

    👉 I'm keeping log handle open ( myLogMadeWith_MXMetricManager_makeLogHandle) during the whole lifecycle of theapp (and never close it myself), MetricKitManager has no delegate set.

    👉 I'm not getting my "something" in the json file downloaded from via the AppStoreConnect API → is this normal situation? Only available on device via MetricKitManager delegate? (which doesn't make much sense security-wise, or else-wise. Except, maybe, the way MetricKit works inside, and if it submits any of the custom metrics to the backend at the first place)

    👉 Would really appreciate comments on how to use custom metrics and how to collect it back for analysis.

Add a Comment
I'm doing this in Swift, so I'm calling mxSignpost(:dso:log:name:signpostID::_:)

I'm making calls for both kinds of signposts (single event and interval), and neither kind is showing up.

Any chance this will be fixed in iOS 13.6.x?

Thanks,
Tom
Thanks for the feedback. I appreciate it. I accidentally marked my replay, and it won't let me change it. I wanted to mark your answer as the correct one.