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

feat(gatsby-admin): track plugin telemetry #26885

Merged
merged 10 commits into from
Sep 14, 2020
Merged

Conversation

mxstbr
Copy link
Contributor

@mxstbr mxstbr commented Sep 14, 2020

Based on #26832, this fetches the telemetryserver port from the /___services endpoint and adds a useTelemetry hook to Admin that currently has this API (modeled after gatsby-telemetry):

const { trackEvent } = useTelemetry()

trackEvent('PLUGIN_INSTALL', {
  pluginName,
})

@jamo I'm not 100% sure whether the events I'm currently tracking are inline with what you'd expect us to track! Do the shapes/metadata/etc look alright?

@mxstbr mxstbr requested a review from jamo September 14, 2020 07:16
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 14, 2020
Copy link
Contributor

@jamo jamo left a comment

Choose a reason for hiding this comment

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

LGTM

The telemetry parts look good, and the events seem like a great starting point, and in-line with the other events we collect from the OSS side.

@mxstbr mxstbr changed the base branch from admin/telemetry-service to master September 14, 2020 08:23
@gatsby-cloud
Copy link

gatsby-cloud bot commented Sep 14, 2020

Gatsby Cloud Build Report

gatsby

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 21m

@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 14, 2020
@mxstbr mxstbr merged commit bf61854 into master Sep 14, 2020
@mxstbr mxstbr deleted the admin/track-telemetry branch September 14, 2020 12:02
@mxstbr mxstbr mentioned this pull request Sep 16, 2020
Comment on lines +6 to +7
test: true,
bla: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

bla is removed in #26916

but i don't see if the test option used? is this a test leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, this is just me playing around with configuring plugins in Admin!

pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
* Set up first service exposing gatsby-telemetry

* Run background updates

* Move telemetry server to gatsby package

* Add body-parser dependency

* Start telemetry server on gatsby develop (gatsbyjs#26853)

* Revert "Start telemetry server on gatsby develop (gatsbyjs#26853)"

This reverts commit 5febd35.

* Revert "Revert "Start telemetry server on gatsby develop (gatsbyjs#26853)""

This reverts commit 08bb027.

* Track first telemetry from Admin

* Update telemetry-server.ts
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.

None yet

4 participants