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

1582479 - Document Glean crash capabilities as a use-case focus #399

Merged
merged 1 commit into from
Oct 29, 2019

Conversation

travis79
Copy link
Member

This adds a new example application to the samples directory, and a walkthrough readme to a new section titled "Focused Use Cases" in the docs

@travis79 travis79 force-pushed the add-crash-example branch 4 times, most recently from 14f0b6b to 0c9cd18 Compare October 21, 2019 18:10
Copy link
Contributor

@mdboom mdboom left a comment

Choose a reason for hiding this comment

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

This is great. I like having some narrative documentation that describes the "workflow" of what it's like to use Glean and it's a fun read.

I do worry about the maintenance burden of some of these duplicated instructions (that are likely to change with the Gradle plugin etc...) Maybe we could help by:

  1. Adding a build of this project to CI
  2. Instrumented tests would be nice, but less critical given the simplicity of the actual functionality, IMHO.
  3. Maybe put a date at the top of the chapter so that it has more of the feeling of an article and to flag that it might possibly be out of date (though we'd endeavour to keep it updated...)

docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
@@ -0,0 +1,363 @@

Mozilla Public License, version 2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to license the example in the public domain? Developers may be disinclined to use it as the basis for production work otherwise... (I know the MPL should be fine... it's more about optics...)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question! I just followed suit on what the sample application does in regards to licensing, the only difference is I included the entire license file rather than just the header at the top of the MainActivity.kt

samples/android/GleanCrashExample/app/proguard-rules.pro Outdated Show resolved Hide resolved
@travis79
Copy link
Member Author

@mdboom I tried to address your concerns as best as possible. The only one I that was a little awkward was adding semantic line breaks, which roughened the formatting of the rendered markup a little bit, but not bad.

Would you be okay with me filing a follow up bug to add an instrumented test and add the build to CI, or would you rather see it added as part of this PR?

@travis79 travis79 requested a review from mdboom October 22, 2019 13:55
@mdboom
Copy link
Contributor

mdboom commented Oct 22, 2019

I think filing a follow-up bug is fine. CI additions can become rabbit holes, and it's better to have these docs than not have them :)

@travis79
Copy link
Member Author

I think filing a follow-up bug is fine. CI additions can become rabbit holes, and it's better to have these docs than not have them :)

Bug filed!

@codecov-io
Copy link

codecov-io commented Oct 24, 2019

Codecov Report

Merging #399 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #399      +/-   ##
============================================
+ Coverage     76.38%   76.39%   +<.01%     
+ Complexity      308      307       -1     
============================================
  Files            95       95              
  Lines          5362     5360       -2     
  Branches        627      627              
============================================
- Hits           4096     4095       -1     
+ Misses          802      801       -1     
  Partials        464      464
Impacted Files Coverage Δ Complexity Δ
...ozilla/telemetry/glean/debug/GleanDebugActivity.kt 76.66% <0%> (+0.9%) 6% <0%> (-1%) ⬇️
...n/java/mozilla/telemetry/glean/rust/LibGleanFFI.kt 66.66% <0%> (+1.96%) 0% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d4cde2...fd7d031. Read the comment docs.

Copy link
Member

@badboy badboy left a comment

Choose a reason for hiding this comment

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

Content-wise this is pretty good!
I have some nits regarding links and so on and in regards to wording.

As this is becoming part of the official Glean SDK book I think it should match the other documentation a bit in style (e.g. not referring to "I" and "my personal experience").
Plus some cross-linking to existing docs could help.

First I also thought about whether we need that whole project files (gradlew, .gitignore, etc), but I guess that keeps it separate enough so people can copy just that project out and build it independently, so I'm not gonna complain about that.

docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
samples/android/GleanCrashExample/README.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
samples/android/GleanCrashExample/app/build.gradle Outdated Show resolved Hide resolved
samples/android/GleanCrashExample/build.gradle Outdated Show resolved Hide resolved
samples/android/GleanCrashExample/build.gradle Outdated Show resolved Hide resolved
samples/android/GleanCrashExample/build.gradle Outdated Show resolved Hide resolved
@travis79
Copy link
Member Author

Okay, I've taken a step back and refactored this to be much more in-line with the tone of the rest of the Glean docs.

Most notably, I removed the example application completely as it was just going to be a maintenance issue and didn't really serve the use-case documentation that much anyway.

I'll save the friendly "narrative" style and full example application for the blog post, and I will host it from my own GitHub repo so that it can age with the blog post and not affect the Glean repo here.


### Next Steps

This information didn't really get recorded by anything, as it would be rejected by the telemetry pipeline unless the
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean here? Can you please expand on what's missing?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the same link to the probe_scraper docs as found in the "Adding Glean to your project" section, which should cover the "next steps" required.

@travis79 travis79 force-pushed the add-crash-example branch 2 times, most recently from 4226258 to b32d884 Compare October 28, 2019 18:00
Copy link
Member

@badboy badboy left a comment

Choose a reason for hiding this comment

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

Minor nits, but I think this tone is much more fitting now!
I encourage you to post the original version as a blog post though.

docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
docs/user/instrument-android-crashes-example.md Outdated Show resolved Hide resolved
@travis79 travis79 merged commit 7c20f19 into mozilla:master Oct 29, 2019
@travis79 travis79 deleted the add-crash-example branch October 29, 2019 13:53
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.

5 participants