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: add telemetry #272

Merged
merged 5 commits into from
Jan 25, 2023
Merged

feat: add telemetry #272

merged 5 commits into from
Jan 25, 2023

Conversation

SgtPooki
Copy link
Contributor

depends on ipfs-shipyard/ignite-metrics#64

  • feat: add telemetry

@SgtPooki SgtPooki linked an issue Jan 19, 2023 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Jan 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
starmaps ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 24, 2023 at 7:45PM (UTC)

Copy link
Contributor Author

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

self review

package.json Outdated
@@ -19,6 +19,7 @@
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@hookstate/core": "^4.0.0-rc21",
"@ipfs-shipyard/ignite-metrics": "https://github.com/ipfs-shipyard/ignite-metrics#feat/useStorageForBrowsers-with-dist",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

will update when ipfs-shipyard/ignite-metrics#64 is merged and new ignite-metrics is released

next.config.js Outdated Show resolved Hide resolved
lib/types.d.ts Outdated
@@ -157,3 +157,5 @@ export interface IssueDataViewInput {
// isRootIssueLoading: boolean;
// isPendingChildrenLoading: boolean;
}

export type BrowserMetricsProvider = import('@ipfs-shipyard/ignite-metrics').BrowserMetricsProvider
Copy link
Contributor Author

Choose a reason for hiding this comment

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

safely getting the type here since importing it is sketchy with nextjs while this package is still cjs.

Comment on lines 3 to 8
import useSharedHook from '../lib/client/createSharedHook';

// eslint-disable-next-line react-hooks/rules-of-hooks
const [useTelemetry, setTelemetry] = useSharedHook(useState, null);

export { useTelemetry, setTelemetry };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

be able to use telemetry object from anywhere.

next.config.js Outdated Show resolved Hide resolved
pages/_app.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@whizzzkid whizzzkid left a comment

Choose a reason for hiding this comment

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

a few questions looks good otherwise.

next.config.js Outdated Show resolved Hide resolved
pages/_app.tsx Outdated Show resolved Hide resolved
Copy link
Contributor Author

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

self review

Copy link
Collaborator

@whizzzkid whizzzkid left a comment

Choose a reason for hiding this comment

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

🚀 send it

const { BrowserMetricsProvider } = await igniteMetricsModulePromise
const newTelemetry = new BrowserMetricsProvider({ appKey: '294089175b8268e44bc4e4fab572fe250d57b968' })
// @ts-expect-error
window.telemetry = newTelemetry
Copy link
Collaborator

Choose a reason for hiding this comment

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

window hookup can be automatic from the provider. Just wondering if we should add an issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it could be useful, but this should be temporary until we add the UI treatments.. i didn't want to block on ignite-metrics any further

@SgtPooki SgtPooki merged commit 942d4f2 into main Jan 25, 2023
@SgtPooki SgtPooki deleted the 173-feat-add-basic-metrics-to-starmaps branch January 25, 2023 00:06
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.

feat: add basic metrics to StarMaps
3 participants