-
Notifications
You must be signed in to change notification settings - Fork 759
Add telemetry probes #4665
Add telemetry probes #4665
Conversation
it isnt quite clear to me what needs to be done to pick this up, let me know when you have a minute! |
0bc792e
to
5a65354
Compare
@codehag i added the additional yaml and json files, I recommend talking with @juliandescottes when it comes time to do the release and land the updated files and get the data review. |
assets/panel/Histograms.json
Outdated
"kind": "exponential", | ||
"high": 10000, | ||
"n_buckets": 1000, | ||
"description": "The time (in milliseconds) that it took to load a source for the user." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like Type-1 or Type-2 data. Do we want it to be opt-in or opt-out on the Release channel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too sure... how are we handling this on other tools? @juliandescottes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely type 2 data category (data collection categories).
Regarding opt-in/opt-out, I have never explicitly defined this in Histograms.json, so not sure either. There has been a recent data collection policy change (link). Don't know if we can still use the releaseChannelCollection property for new probes?
Let's ask @fmarier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like Category1/2, which is allowed to be opt-out on all channels (including release).
@@ -65,4 +65,7 @@ add_task(async function() { | |||
await popupPreviewed; | |||
assertPopup(dbg, { field: "foo", value: "1", expression: "obj" }); | |||
assertPopup(dbg, { field: "bar", value: "2", expression: "obj" }); | |||
|
|||
await waitForLoadedObjects(dbg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this part of the work for adding telemetry probes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know either but it would be nice to clean it up before merging?
@@ -47,6 +53,9 @@ export function loadSourceText(source: Source) { | |||
return; | |||
} | |||
|
|||
const delay = 300; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to have a calculated value here?
I'm not sure about the best process here to add probes for the debugger. Histograms.json and scalars.yml are both files that are not debugger (or even devtools) specific, and I'm not sure about the impact if those files become out of sync with the artifacts used for testing. It might be easier to land probes in mozilla-central separately, and then merge the implementation in the debugger after the probes have landed. |
From discussing things with julian and mike, i am not sure we will use this patch, is it alright if i close it @jasonLaster ? |
eb3b6a7
to
3b0e3ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, most importantly the name of the probe needs to be fixed, but looks good otherwise.
@@ -22,6 +22,10 @@ import type { SourceRecord } from "../../reducers/types"; | |||
import { searchSource } from "../project-text-search"; | |||
|
|||
const requests = new Map(); | |||
import { Services } from "devtools-modules"; | |||
const loadSourceHistogram = Services.telemetry.getHistogramById( | |||
"DEVTOOLS_DEBUGGER_LOAD_SOURCE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name should be DEVTOOLS_DEBUGGER_LOAD_SOURCE_MS
@@ -103,5 +108,9 @@ export function loadSourceText(source: SourceRecord) { | |||
// signal that the action is finished | |||
deferred.resolve(); | |||
requests.delete(id); | |||
|
|||
const TELEMETRY_END = performance.now(); | |||
const duration = TELEMETRY_END - TELEMETRY_START; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit: not sure about the coding conventions in the project, but all uppercase for telemetry start/end feels a bit weird. I would expect all uppercase to be file constants.
@@ -65,4 +65,7 @@ add_task(async function() { | |||
await popupPreviewed; | |||
assertPopup(dbg, { field: "foo", value: "1", expression: "obj" }); | |||
assertPopup(dbg, { field: "bar", value: "2", expression: "obj" }); | |||
|
|||
await waitForLoadedObjects(dbg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know either but it would be nice to clean it up before merging?
docs/local-development.md
Outdated
``` | ||
|
||
When you add a new scalar or histogram, you'll need to add it to the | ||
[local histograms.json][localhistograms.json] or [local scalars.yml][localscalars.yaml]. This needs to be moved to MC, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation should no longer mention the local histrograms/scalars files. Can point to our current Bug as an example, and mention that the probes can be landed in mozilla-central before performing the implementation in the debugger.
Ok, so we are failing CI for now, since the probes are not available in the build of m-c we are using for the tests. Either we wait for the probe to land and we update the revision of m-c being used for tests. Or we try/catch around it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
d6e7f6f
to
c46feb5
Compare
@juliandescottes hmm still doesnt see the ID... |
For whatever reason it seems that using "just" the first rev where the probe landed is not good enough to get an artifact that includes the probe. @jlast use the latest m-c sha1, should work : e2bb11b88bd4 |
k |
c46feb5
to
a8d3b2a
Compare
a8d3b2a
to
57fc6fa
Compare
Associated Issue: #4158
Summary of Changes