Closed Bug 1350532 Opened 5 years ago Closed 3 years ago

get telemetry for use of <a> as <area> in image maps

Categories

(Core :: Layout: Images, Video, and HTML Frames, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox55 --- affected

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(1 file)

We want to stop supporting this in bug 1317937, let's get some telemetry to confirm that it is not used in the wild.
Attached patch patchSplinter Review
Attachment #8851208 - Flags: review?(mats)
Attachment #8851208 - Flags: feedback?(francois)
Attachment #8851208 - Flags: review?(mats) → review+
Comment on attachment 8851208 [details] [diff] [review]
patch

"flag" histograms are now deprecated [1] because they can be much more expensive than the boolean scalars [2] that replace them.

The probe looks fine, but please use a scalar instead of a histogram.

[1] https://gecko.readthedocs.io/en/latest/toolkit/components/telemetry/telemetry/collection/histograms.html#flag

[2] https://gecko.readthedocs.io/en/latest/toolkit/components/telemetry/telemetry/collection/scalars.html
Attachment #8851208 - Flags: feedback?(francois) → feedback-
The documentation is not really clear. And there are zero examples in the tree of using ScalarSet (outside of TestScalers). Do scalars also get inited to 0? So I can just call ScalarSet when I went to set it to something non-zero and the zero values will be sent to mozilla servers as well so we can get a proper count?
Flags: needinfo?(francois)
(In reply to Timothy Nikkel (:tnikkel) from comment #3)
> Do scalars also get inited to 0?

They don't. The scalar won't get sent unless you've set it explicitly to 0.

> So I can just call ScalarSet when I went to set it to something
> non-zero and the zero values will be sent to mozilla servers as well so we
> can get a proper count?

What question are you trying to answer? Is it: "what percentage of image maps use <a> as <area>?"

If that's the case, you may want a boolean _histogram_.
Flags: needinfo?(francois)
(In reply to François Marier [:francois] from comment #4)
> (In reply to Timothy Nikkel (:tnikkel) from comment #3)
> > Do scalars also get inited to 0?
> 
> They don't. The scalar won't get sent unless you've set it explicitly to 0.

Well that's less convenient. Can we have a easy way to do that with scalars like we had with histograms?

> > So I can just call ScalarSet when I went to set it to something
> > non-zero and the zero values will be sent to mozilla servers as well so we
> > can get a proper count?
> 
> What question are you trying to answer? Is it: "what percentage of image
> maps use <a> as <area>?"

No. What percentage of sessions encounter an imagemap that has a <a> acting like an <area> where it looks like the author intended that behaviour.

> If that's the case, you may want a boolean _histogram_.
Flags: needinfo?(francois)
Slightly offtopic rant: any "what % of sessions" question is going to be pretty meaningless. The distribution of sessions across users and across time is trimodal so that question is almost meaningless.

Which is one of the reasons why flag histograms are deprecated and we're trying to remove the existing ones; they are a footgun that never answers the question you think you want.

If that for some reason was really the question you wanted to answer, you could still measure it with a scalar and a spark query by looking at all sessions versus sessions with a recorded number.

A much more useful metric would be either the number of active weekly users who encountered an imagemap, or something like "imagemaps enountered / total page loads". Again, something you can do in spark today.

So no, please don't use flags.
(In reply to Benjamin Smedberg [:bsmedberg] from comment #6)
> Slightly offtopic rant: any "what % of sessions" question is going to be
> pretty meaningless. The distribution of sessions across users and across
> time is trimodal so that question is almost meaningless.

I have no idea what this means.

> Which is one of the reasons why flag histograms are deprecated and we're
> trying to remove the existing ones; they are a footgun that never answers
> the question you think you want.
> 
> If that for some reason was really the question you wanted to answer, you
> could still measure it with a scalar and a spark query by looking at all
> sessions versus sessions with a recorded number.
> 
> A much more useful metric would be either the number of active weekly users
> who encountered an imagemap, or something like "imagemaps enountered / total
> page loads". Again, something you can do in spark today.

How do I do this?

Really regretting trying to get telemetry and wished I just removed this feature blindly at this point.
Flags: needinfo?(francois) → needinfo?(benjamin)
If you don't know where to start, you ask a data engineer partner to help. kparlante manages that group.

As it stands here, we have a basic problem:
* you can't use prerelease telemetry to tell you that something isn't used. We just don't have the geo/locale coverage to confidently answer that question. We don't have good libraries or tools (yet) to make web compat assertions from telemetry data.
* prerelease (nightly even) could tell you that people *are* using this feature, but you don't need a flag; a counter will do just fine
* if you want the webcompat confidence, then this needs to be in release and you need to use custom analysis anyway, since t.m.o doesn't display the opt-out release population
Flags: needinfo?(benjamin)
I think we should use deprecated operation for this telemetry: https://searchfox.org/mozilla-central/source/dom/base/nsDeprecatedOperationList.h
Product: Core → Core Graveyard
Product: Core Graveyard → Core

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:tnikkel, could you have a look please?

Flags: needinfo?(tnikkel)

We landed bug 1317937 without getting telemetry.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(tnikkel)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.