Comments (12)
Thanks a lot for your input! I'm bumping this up on the roadmap.
from swiftclient.
Awesome idea! Added it to the roadmap and will investigate further.
from swiftclient.
Thanks! I think what precedes this is a move to a different signal format that supports not only individual dimensions (i.e. the payload which is string: string) but also metrics, (i.e. a value that maps from string to Int or Double or something). This is on our roadmap but there's so much else to do it'll be a little while before I can hash this out.
from swiftclient.
Agreed, I think a move to support metrics with numeric values would be a huge value add. The Telemetry Viewer app could then have a field for "unit" from a dropdown which would then allow for some automatic formatting.
So if the client always sends values in milliseconds, the viewer could then format it as seconds/minutes/etc based on how big the number is.
If there's anything I can do to support that piece of work Daniel then please let me know.
from swiftclient.
MetricKit itself is an iOS specific technology and format. That doesn't mean that most of the data couldn't be ascertained on Android (it can) but it defeats the point of this being a quick win for privacy-friendly metrics without a complex client side integration on iOS apps.
from swiftclient.
@winsmith let me know if you'd like to dive deeper into the solution or goals! happy to help how I can.
from swiftclient.
This is an amazing idea! I wonder how this would work from a data perspective though?
Currently we send signals which essentially increments a counter by 1 for each time that signal is received. We can add text properties though, but unsure how we can query those effectively.
There are quite a few different data types with MetricKit.
An easy one to start with might be the cumulative app exit counts. There are about 20 of these (describing the different ways the app can be exited) each with a count between 0 and .
We could create a payload which looks a bit like:
[
{ type: 'cumulativeAppWatchdogExitCount' },
{ type: 'cumulativeAppWatchdogExitCount' },
{ type: 'cumulativeAppWatchdogExitCount' },
{ type: 'cumulativeMemoryResourceLimitExitCount' },
]
Essentially creating a massive payload where we duplicate certain types based on the integer provided by Apple. So in the example above, we had 3 exits due to watchdog and 1 due to memory limit.
This feels like with larger numbers though it would dramatically increase the payload size. Perhaps we need a new value count: Int
which is optional and defaults to 1. If this is set, then it increases the count by X where X is the number provided?
This perhaps gets more complicated when you look at different data types though such as kB, ms/sec, etc.
"networkTransferMetrics" : {
"cumulativeCellularDownload" : "80,000 kB",
"cumulativeWifiDownload" : "60,000 kB",
"cumulativeCellularUpload" : "70,000 kB",
"cumulativeWifiUpload" : "50,000 kB"
},
I've attached a sample JSON in case folks want to take a look. I'd love to hear from @winsmith on how we could approach this though as it would be an amazing capability to have such information about stability and performance that Apple doesn't currently surface to us.
from swiftclient.
Curious @winsmith if there's been any progression on this? 👀 I know it was recently brought up on Twitter, and I totally forgot that this thread existed.
MetricKit provides a lot of valuable data, and is already aggregated by the platform in a privacy friendly way. Would be nice to take full advantage of that.
from swiftclient.
How would that support look like? Should the SDK get these metrics automatically? Then you might run into compatibility problems depending on which platform you include the SDK. Or is it more to do with the fact that the API needs support for numerical data? Because that's coming :)
from swiftclient.
Having it automated would be best, with an option to manually add custom metrickit data.
from swiftclient.
I suppose there are a few options.
One would be for the backend to just support the MetricKit JSON payload verbatim... this would likely be easiest, but from a technical perspective is likely far from where you want to be.
The other option is to create an optional target (or use compiler flags to include only on iOS) a MetricKit manager. The client app would then just need to add this to their app using something like MXMetricManager.shared.add(TelemetryDeckMetricKitExporter())
. This is doable as soon as TD supports all the same data types as MetricKit exports - which includes numeric data via histograms etc.
from swiftclient.
Hmm okay that makes sense. I'm wondering if it's possible to make this as cross-platform as possible, so that e.g. Android users could also get similar data.
from swiftclient.
Related Issues (20)
- TelemetryDeck reports/declares the wrong version numbers HOT 2
- Event delivery from app extensions HOT 2
- Automatically send a11y stats HOT 1
- macCatalyst version numbers are wrong HOT 3
- visionOS Support HOT 1
- `UIApplication.willEnterForegroundNotification` is called each time an app enters the foreground on iOS, but only once on macCatalyst. HOT 5
- visionOS support: compilation warnings in xcode 14.3.1 HOT 1
- Don't crash application if invoked too early
- [iOS] "newSessionBegan" is not tracked on app launch for older apps without `SceneDelegate` HOT 2
- Access to DefaultSignalPayload HOT 3
- Add Privacy Labels for Swift SDK
- VisionOS: Use identifierForVendor
- Tests fail because Xcode 12 is no longer available
- Architecture reported incorrectly HOT 4
- isAppStore is always false
- CocoaPods support HOT 4
- Let users know that they have to tell Apple they're collecting info, and give some guidance on which boxes to tick HOT 2
- A collection of first time user thoughts HOT 2
- User Retention shows an error on the Overview page of a brand new app HOT 1
- The app drop-down doesn't show newly created apps HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftclient.