wetransfer / diagnostics Goto Github PK
View Code? Open in Web Editor NEWAllow users to easily share Diagnostics with your support team to improve the flow of fixing bugs.
License: MIT License
Allow users to easily share Diagnostics with your support team to improve the flow of fixing bugs.
License: MIT License
I added this framework to a demo app, and I am getting the following crash
let bundle = Bundle(for: DiagnosticsLogger.self)
let cssFile = bundle.url(forResource: "style", withExtension: "css")! // <- crash
let css = try! String(contentsOf: cssFile, encoding: .utf8).minifiedCSS()
How to replicate the crash:
1- Create an iOS app
2- Use CocoaPods
3- just use the template code in the Readme
It would be great to include stacktraces of a crash in our Diagnostics report
Currently, the first session contains the earliest recorded session. It makes more sense to start with the most recent one.
After defining the input types we need to be able to create an HTML report from it which can be attached to an email
Hi!
I'm basically struggling for this issue, this is maybe a feature.
I'm trying to build a new DiagnosticsChapter which would call an Endpoint of my API and have it on its own for the report.
Do you have an input?
Best regards,
Romain
Including a header
The tests fail on CI, probably caused due to the DiagnosticsLogger
It would be nice if we can collapse sections and get an easier overview of all the sessions
It's now invisible and purple once clicked before
Add support for SPM
Try to find words like "token" and either filter it out or throw an error
This way, it should be easier to predict what's going wrong for the user
Would be useful to include object description
strings in the logs, but it seems they aren't logged when passed as part of the message
argument in the static func DiagnosticsLogger.log(message:)
.
For example, if I try to log self.description
where self
is of type UIViewController
by calling DiagnosticsLogger.log(message: "This is the view controller description: \(self.description).")
what I see in the log is something like "2020-01-27 16:00:00 | ViewController.swift:L100 | This is the view controller description: ."
Will be easier to create an overview of reports
It would be really nice to add all kinds of logs to the diagnostics. Each app is different and needs to report different stuff.
Features to think of:
Thanks for open sourcing Diagnostics.
Any specific reason for making it compatible for iOS 11 above?
I cloned and made minimum target as iOS 10.0 & I found only one error it is sortedKeys for json.
Do you mind if I raise PR to support for iOS 10 & above?
Is there necessary to use assertionFailure
on unexpected condition at DiagnosticLogger.swift. May be use print
more friendly.
It would be great if we can use the share extension instead of the Mail app if the latter is not installed
*** -[NSConcreteFileHandle writeData:]: No space left on device
This is happening inside the DiagnosticsLogger
on line 146, inside the log method. This method can be called from many places.
We basically need to check whether there's enough space left to write the logs.
This is not a bug report but rather a question related to your project where I'm interested if you, or anyone else reading this, found a good workaround.
We are also using MFMailComposeViewController
in our app to let users send feedback. However, we ran into the issue that when you don't use Apple Mail (I don't) you cannot use MFMailComposeViewController
. canSendMail
will return false
in this case.
We will now probably just expose an endpoint in our backend to receive user feedback and don't use the builtin mail composer. However, we would prefer to stick to the current solution. Since this project is also heavily impacted by this, I would be curious if you also ran into this issue and might have a creative idea how to get around it.
Not a priority for now but it would be really nice!
CI to run for PRs
It would be nice to create a convenience method for this
I'm trying to update to the latest version of this library but the Diagnostics.xcodeproj
file is missing from the repo. Was this deliberate? If so can the installation instructions be updated please?
👋 Love the idea of this project.
I was wondering would you be open to the idea of support sending these via other channels other than email?
I was thinking maybe supporting a pluggable API to support different APIs for reporting issues.
Happy to explore the idea and open a PR but wanted to see if it was inline with your vision for this?
As a start, it would be great to have a basic logging approach. Simply add the framework and call the method for creating the email and the HTML report should already contain basic stuff.
Things to include:
Ideally, it would be possible to opt-out for specific things using an enum in the configuration file.
Hi,
I'm starting to use this library in my app and I think it's pretty sweet! I extended the Diagnostic Logger piece to also support Apple Watch app logs by writing a log file on the watch and periodically transferring the file over to the iPhone, where it can be included in a report alongside the iPhone logs.
Is that something ya'll would want me to put up a PR for? Just figured I would ask first.
Thanks,
So sensible data can be removed out of it
Add support for CocoaPods
Should be simple!
I thought it might be convenient to include something that contains device product names so what appears in the final report is more understandable - for example, we'd see:
Device iPhone12,1 (iPhone 11)
rather than just:
Device iPhone12,1
in the attached HTML file. Would probably be enough to just include the most recent iPhones for now, to keep it compact. Devices not included would just display as they are currently.
All Chinese characters become something like "麦诗�电出行D". Setting should fix it.
We could make use of the setup method for this
Hi there, loving using the library, but had a question about how to provide less data. Every time a user sends me their diagnostics, they're sending me diagnostics for every session they've ever had. This makes parsing the report cumbersome and unnecessarily large.
I was wondering if it'd be possible to have an option to receive only the last N session logs, via some sort of API in Diagnostics.
Thanks a lot!
See https://www.chimehq.com/blog/metrickit-crash-reporting
It might help us to improve the Diagnostics reports with extra information.
Add support for Carthage
Hi Guys,
As far as I have tried there is no way to separate the custom log messages which are clubbed together in automatically created logs.
So is it possible to create a separate report for the Custom Logs ? As the "SYSTEM:" prefixed logs have too much debug prints from different frameworks that I don't want.
I also tried the filtering for the report, but the logs report is just on big string.
Let me know if I missing something that I haven't tried 😅
If you don't have the Apple Mail app installed, the MFMailComposeViewController
does nothing and reporting an issue might not work.
For implementers of this framework, it would be really useful to have an easy way of presenting an email with support for 3rd party mail clients as well.
Right now, all sessions are on a big list which makes it hard to diggest. It would be great if we could collapse them with a title and a date in a header.
be smart about reporting what is likely happening. E.g.: “This might be caused because the user user was low on storage” or “This error happened in the user’s latest session: ”
Ideas for Transfer apps:
There is currently no public read access to var DiagnosticsLogger.standard.isSetup
(file DiagnosticsLogger.swift
line 40
), which could be useful when developing and debugging. I suggest adding public read access using:
/// Whether the logger is setup and ready to use.
public static func isSetUp() -> Bool {
return standard.isSetup
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.