Conversation
|
@juliaxbow I would love your opinion on the formatting of the telemetry section |
|
Descriptions
Other
|
whizzzkid
left a comment
There was a problem hiding this comment.
LGTM in principle, a few nits, I need to validate this locally though.
add-on/src/lib/telemetry.js
Outdated
| } | ||
|
|
||
| /** | ||
| * @param {ReturnType<import('./state').initState>['options']} state |
There was a problem hiding this comment.
can we import types form the declaration from the lib?
add-on/src/lib/telemetry.js
Outdated
| @@ -0,0 +1,60 @@ | |||
|
|
|||
| import { MetricsProvider } from '@ipfs-shipyard/ignite-metrics/vanilla' | |||
There was a problem hiding this comment.
@ipfs-shipyard/ignite-metrics/vanilla
This needs to be mapped correctly, this breaks the build.
There was a problem hiding this comment.
This should be working properly with latest release of ignite-metrics
There was a problem hiding this comment.
Looks sensible, as long we address below:
- We should not be sending requests to Countly every minute a user uses a browser.
(I assume that is what is happening? I was unable to build this and test locally)- This causes many issues, for example drains laptop battery by waking up WIFI when no internet conneciton would be needed otherwise.
- As discussed, figure a way to batch things so we report them only once an hour or once a day.
- Regular people don't know what 'session' and 'view' means.
- See my suggestions below on humanizing the language :)
Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
* use latest ignite-metrics library * don't use singleton function for grabbing metricsProvider * ensure metrics initialize and update properly
|
FYI @lidel @whizzzkid I had some changes locally that weren't pushed up... getting those up now |
* Telemetry messages are passed between contexts using browser.runtime * Upgraded to @ipfs-shipyard/ignite-metrics@1.3.0 * Updated consent handling from state to be more explicit
| } | ||
| } | ||
|
|
||
| function onTelemetryMessage (request, sender) { |
| await registerSubdomainProxy(getState, runtime) | ||
| shouldRestartIpfsClient = true | ||
| shouldStopIpfsClient = !state.active | ||
| state.active ? startSession() : endSession() |
There was a problem hiding this comment.
for now this should be ok, in the future we might wanna have a message being broadcast and such listeners can subscribe to those.
| ${telemetryForm({ | ||
| telemetryGroupMinimal: state.options.telemetryGroupMinimal, | ||
| telemetryGroupMarketing: state.options.telemetryGroupMarketing, | ||
| telemetryGroupPerformance: state.options.telemetryGroupPerformance, | ||
| telemetryGroupTracking: state.options.telemetryGroupTracking, | ||
| onOptionChange | ||
| })} |
| "emitDeclarationOnly": true, | ||
| "declaration": true, | ||
| "moduleResolution": "nodenext", | ||
| "noImplicitAny": false |
There was a problem hiding this comment.
Thanks for adding tsconfig.json and we can fix this when we have a better handle of things.
|
@lidel I think the default flush interval is good enough for now, we can revisit this later if needed.
for now I think we can merge this and release as is. |
|
Agreed with @whizzzkid. Metrics are only sent (currently) when interacting with the extension (enabling/disabling, viewing different pages), so battery use should not be a concern. |

Things implemented:
Things to do