Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified Collectors #496

Merged
merged 5 commits into from
Sep 5, 2016
Merged

Simplified Collectors #496

merged 5 commits into from
Sep 5, 2016

Conversation

F43nd1r
Copy link
Member

@F43nd1r F43nd1r commented Aug 12, 2016

Currently there is no standard way to talk to a Collector. Every collector sort of does its own thing: Some are static, some require an instance and every call has different parameters.
This aims at standardizing all these collectors, which greatly reduces the code inside CrashReportDataFactory.

While it might look differently, this actually doesn't change any of the underlying logic, it just cleans it up.

However I noticed we ignore some of the configuration: While it makes sense to always send the Stacktrace and a report id, I think IS_SILENT, USER_APP_START_DATE and USER_CRASH_DATE do not qualify for an always-include and should be optional.

/**
* Created by Lukas on 12.08.2016.
*/
public class CustomDataColletor extends Collector {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in name

@william-ferguson-au
Copy link
Member

Definitely need to keep USER_CRASH_DATE as it says when the crash actually happened.
Suggest we keep the other 2 as default as well as some backends may be relying on them.

*
* @return priority of this collector
*/
public int getPriority() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a priority?
If a Collector is configured then it should be called.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was meant to provide control over the execution order to the collectors, but it is probably overengineering to do so.

@F43nd1r
Copy link
Member Author

F43nd1r commented Aug 15, 2016

Suggest we keep the other 2 as default as well as some backends may be relying on them.

Ok, backwardscompatibility is probably more important than the negligible improvement of sending two strings less.

@F43nd1r
Copy link
Member Author

F43nd1r commented Aug 31, 2016

Resolved merge conflicts (rebase onto master)

@william-ferguson-au william-ferguson-au merged commit c515d45 into ACRA:master Sep 5, 2016
@william-ferguson-au william-ferguson-au changed the title Collectors Simplified Collectors Sep 5, 2016
@F43nd1r F43nd1r deleted the collector branch May 4, 2018 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants