Closed Bug 1615986 Opened 4 years ago Closed 4 years ago

[Thunderbird Telemetry] collect number of address books + types + number of contacts

Categories

(Thunderbird :: Address Book, task)

task
Not set
normal

Tracking

(thunderbird78+ fixed)

RESOLVED FIXED
Thunderbird 79.0
Tracking Status
thunderbird78 + fixed

People

(Reporter: mkmelin, Assigned: rnons)

References

Details

Attachments

(1 file, 6 obsolete files)

It would be useful to understand the design boundaries for address books. How many address books do people have, of what type, and how many contacts do they have [not for ldap].

Assignee: nobody → remotenonsense
Attached patch 1615986.patch (obsolete) — Splinter Review

Collect address book count and contact count, keyed by address book type.

The address book type can be 0, 2 or 101, do we want to convert it to string?

Attachment #9154107 - Flags: review?(mkmelin+mozilla)

Do we want to collect the count

Status: NEW → ASSIGNED
Comment on attachment 9154107 [details] [diff] [review]
1615986.patch

Review of attachment 9154107 [details] [diff] [review]:
-----------------------------------------------------------------

We probably need to hook this up somewhere else. Many people might not ever open the address book tab, but still use their address books.

::: mail/components/addrbook/content/abTrees.js
@@ +174,5 @@
> + */
> +function reportAddressBook(directories) {
> +  let report = {};
> +  for (let dir of directories) {
> +    let type = dir.dirType;

Maybe it would be better to add a more selfexplanatory key. Like using the uri scheme, e.g. jscarddav, jsaddrbook, moz-abmdbdirectory, ldap, ldaps
Attachment #9154107 - Flags: review?(mkmelin+mozilla)
Attached patch 1615986.patch (obsolete) — Splinter Review
  • Moved the probe to msgMail3PaneWindow.js, so that it will run on TB starts.
  • Used the URI scheme as address book type.
Attachment #9154107 - Attachment is obsolete: true
Attachment #9154838 - Flags: review?(mkmelin+mozilla)
Attached patch 1615986.patch (obsolete) — Splinter Review

Remove a commented line.

Attachment #9154838 - Attachment is obsolete: true
Attachment #9154838 - Flags: review?(mkmelin+mozilla)
Attachment #9154840 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9154840 [details] [diff] [review]
1615986.patch

Review of attachment 9154840 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM

::: mail/base/content/msgMail3PaneWindow.js
@@ +805,5 @@
> +function reportAddressBookTypes() {
> +  let report = {};
> +  for (let dir of MailServices.ab.directories) {
> +    let index = dir.URI.indexOf(":");
> +    let type = dir.URI.slice(0, index);

maybe easier to just do

let type = dir.URI.split(":")[0];

::: mail/components/telemetry/Scalars.yaml
@@ +150,5 @@
> +tb.addressbook:
> +  addressbook_count:
> +    bug_numbers:
> +      - 1615986
> +    description: How many addressbooks were set up, keyed by addressbook type.

Let's clarify that the type is the directory URI scheme.
Attachment #9154840 - Flags: review?(mkmelin+mozilla) → review+
Attached patch 1615986.patch (obsolete) — Splinter Review
  • Changed to use split(":")[0]
  • Updated scalar probe description
Attachment #9154840 - Attachment is obsolete: true
Attachment #9155518 - Flags: review+
Target Milestone: --- → Thunderbird 79.0

Somehow the attached patch is mangled and can't be applied. Please try exporting and uploading it again.

Attached patch 1615986.patch (obsolete) — Splinter Review

Rebased, should work now.

Attachment #9155518 - Attachment is obsolete: true
Attachment #9155641 - Flags: review+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/813ca5b455a8
Collect statistics of addressbooks and contacts. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Attached patch 1615986.patch (obsolete) — Splinter Review
Attachment #9155641 - Attachment is obsolete: true
Attachment #9155835 - Flags: review?(mkmelin+mozilla)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 9155835 [details] [diff] [review]
1615986.patch

Review of attachment 9155835 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/test/browser/addrbook/browser_addressBook.js
@@ +401,5 @@
> +  delete_address_book(addrBook1);
> +  delete_address_book(addrBook2);
> +  delete_address_book(addrBook3);
> +  delete_address_book(addrBook4);
> +  delete_address_book(ldapBook);

I think these belong in the registerCleanupFunction instead.

r=mkmelin with that fixed
Attachment #9155835 - Flags: review?(mkmelin+mozilla) → review+
Attached patch 1615986.patchSplinter Review

Changed to use registerCleanupFunction.

Attachment #9155835 - Attachment is obsolete: true
Attachment #9155882 - Flags: review+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/f5437b1e2765
Collect statistics of addressbooks and contacts. r=mkmelin DONTBUILD

Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Comment on attachment 9155882 [details] [diff] [review]
1615986.patch

Telemetry addition - not risky.
Attachment #9155882 - Flags: approval-comm-beta?
Comment on attachment 9155882 [details] [diff] [review]
1615986.patch

Approved for beta
Attachment #9155882 - Flags: approval-comm-beta? → approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: