Open Bug 1467091 Opened 6 years ago Updated 2 years ago

Add event telemetry to application panel

Categories

(DevTools :: Application Panel, enhancement)

61 Branch
enhancement

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Follow up to Bug 1451734. We will add basic panel telemetry in Bug 1451734and will implement more detailed event telemetry in this bug.
Depends on: 1451734
Comment on attachment 8983724 [details]
Bug 1467091 - Track application panel events with EventTelemetry

https://reviewboard.mozilla.org/r/249560/#review255764


Code analysis found 10 defects in this patch:
 - 10 defects found by mozlint

You can run this analysis locally with:
 - `./mach lint path/to/file` (JS/Python)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: devtools/client/application/initializer.js:42
(Diff revision 1)
>      this.client = toolbox.target.client;
>  
>      this.store = configureStore();
>      this.actions = bindActionCreators(actions, this.store.dispatch);
>  
> +    let telemetry = new Telemetry();

Error: 'telemetry' is never reassigned. use 'const' instead. [eslint: prefer-const]

::: devtools/client/application/src/components/WorkerList.js:30
(Diff revision 1)
>        workers: PropTypes.object.isRequired,
>      };
>    }
>  
> +  openAboutDebugging() {
> +    this.props.serviceContainer.openTrustedLink("about:debugging#workers");

Error: 'servicecontainer' is missing in props validation [eslint: react/prop-types]

::: devtools/client/application/src/components/WorkerList.js:30
(Diff revision 1)
>        workers: PropTypes.object.isRequired,
>      };
>    }
>  
> +  openAboutDebugging() {
> +    this.props.serviceContainer.openTrustedLink("about:debugging#workers");

Error: 'servicecontainer.opentrustedlink' is missing in props validation [eslint: react/prop-types]

::: devtools/client/application/src/components/WorkerList.js:31
(Diff revision 1)
>      };
>    }
>  
> +  openAboutDebugging() {
> +    this.props.serviceContainer.openTrustedLink("about:debugging#workers");
> +    this.props.serviceContainer.recordEvent("open_aboutdebugging", {});

Error: 'servicecontainer' is missing in props validation [eslint: react/prop-types]

::: devtools/client/application/src/components/WorkerList.js:31
(Diff revision 1)
>      };
>    }
>  
> +  openAboutDebugging() {
> +    this.props.serviceContainer.openTrustedLink("about:debugging#workers");
> +    this.props.serviceContainer.recordEvent("open_aboutdebugging", {});

Error: 'servicecontainer.recordevent' is missing in props validation [eslint: react/prop-types]

::: devtools/client/application/src/components/WorkerList.js:35
(Diff revision 1)
> +    this.props.serviceContainer.openTrustedLink("about:debugging#workers");
> +    this.props.serviceContainer.recordEvent("open_aboutdebugging", {});
> +  }
> +
>    render() {
> -    const { workers, client } = this.props;
> +    const { client, serviceContainer, workers } = this.props;

Error: 'servicecontainer' is missing in props validation [eslint: react/prop-types]

::: devtools/client/application/src/components/WorkerListEmpty.js:42
(Diff revision 1)
> +    selectTool("jsdebugger");
> +    recordEvent("open_help_link", { helpLink: "jsdebugger" });
>    }
>  
>    openAboutDebugging() {
> +    const { recordEvent, openTrustedLink } = this.props.serviceContainer;

Error: 'opentrustedlink' is already declared in the upper scope. [eslint: no-shadow]

::: devtools/client/application/src/components/WorkerListEmpty.js:48
(Diff revision 1)
>      openTrustedLink("about:debugging#workers");
> +    recordEvent("open_help_link", { helpLink: "about:debugging#workers" });
>    }
>  
>    openDocumentation() {
> +    const { recordEvent, openTrustedLink } = this.props.serviceContainer;

Error: 'opentrustedlink' is assigned a value but never used. [eslint: no-unused-vars]

::: devtools/client/application/src/components/WorkerListEmpty.js:48
(Diff revision 1)
>      openTrustedLink("about:debugging#workers");
> +    recordEvent("open_help_link", { helpLink: "about:debugging#workers" });
>    }
>  
>    openDocumentation() {
> +    const { recordEvent, openTrustedLink } = this.props.serviceContainer;

Error: 'opentrustedlink' is already declared in the upper scope. [eslint: no-shadow]

::: devtools/client/framework/devtools-browser.js:388
(Diff revision 1)
> -        .then(toolbox => {
> +          .then(toolbox => {
> -          toolbox.once("destroy", () => workerClient.detach());
> +            toolbox.once("destroy", () => workerClient.detach());
> +            resolve(toolbox);
> -        });
> +          });
> -    });
> +      });
> +    })

Error: Missing semicolon. [eslint: semi]
Comment on attachment 8983724 [details]
Bug 1467091 - Track application panel events with EventTelemetry

https://reviewboard.mozilla.org/r/249560/#review255770


Code analysis found 1 defect in this patch:
 - 1 defect found by mozlint

You can run this analysis locally with:
 - `./mach lint path/to/file` (JS/Python)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: devtools/client/framework/devtools-browser.js:388
(Diff revision 2)
> -        .then(toolbox => {
> +          .then(toolbox => {
> -          toolbox.once("destroy", () => workerClient.detach());
> +            toolbox.once("destroy", () => workerClient.detach());
> +            resolve(toolbox);
> -        });
> +          });
> -    });
> +      });
> +    })

Error: Missing semicolon. [eslint: semi]
Re-attached the event telemetry patch from the original bug. Will pick this up again when we have a feature set that we intend to ship.
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: