MeterReporter icon indicating copy to clipboard operation
MeterReporter copied to clipboard

Enhancement: Document the server endpoint some more

Open DivineDominion opened this issue 3 years ago • 4 comments

The README does state it's going to be a PUT request and what the expected header data is -- but without writing a script to logg something at that endpoint, I wouldn't know what is being put.

Is it merely JSON (the first paragraph alludes to that)? Will it suffice to store a huge string in a database, or a .json file?

DivineDominion avatar Oct 19 '22 13:10 DivineDominion

Heh, yeah should include that shouldn't I?

Yes, it forwards along the JSON data generated by Meter, which is nearly the same as the data created by MetricKit, but includes additional fields for symbolication info and exceptions.

I just write it to S3 as a .mxdiagnostic file.

mattmassicotte avatar Oct 19 '22 13:10 mattmassicotte

Ok, just added that. But, I think we can leave this open to include some actual sample JSON. In the mean time, you can check out Meter for captured stuff. Or, you can use Xcode's Debug > Simulate MetricKit Payloads to see what it can look like.

mattmassicotte avatar Oct 19 '22 14:10 mattmassicotte

Thanks for the info! I personally wouldn't mind your personal experience being added, too:

I just write it to S3 as a .mxdiagnostic file.

Readon is that this puts a concrete idea into the mind of me, the reader, which I find super valuable -- as a "sales pitch" so to speak, because otherwise, how does a prospective user (me) know if it's worth looking into this without spending 1+ hours setting everything up only to find out that it might not be suitable for the project?

DivineDominion avatar Oct 19 '22 15:10 DivineDominion

That makes total sense. There are really two questions.

a) "Is MetricKit data valuable to me?" b) "What do I do with these HTTP requests?"

Answering A is pretty much up to you. I have found the data to be extremely valuable when outside the App Store, because it is effectively free and can be really useful. But, I also don't use any 3rd party analytics.

B is more complex, because it really depends on what you want and how much time/effort you can put in. I already had some AWS stuff built, so this was a snap. I think putting a little more detail into that side really does make sense for this repo.

mattmassicotte avatar Oct 19 '22 19:10 mattmassicotte