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 diagnostic #568

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open

feat: add diagnostic #568

wants to merge 50 commits into from

Conversation

Mercy811
Copy link
Contributor

Summary

https://amplitude.atlassian.net/browse/AMP-81179

Send diagnostic events when the SDK drops events

This feature is enabled by default and can be disabled by setting config.diagnosticProvider to undefined

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

Copy link
Contributor

@justin-fiedler justin-fiedler left a comment

Choose a reason for hiding this comment

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

Thanks @Mercy811. See comments. Since we only need to hook into "flush" configuring this as a Plugin is probably not needed, instead we can mostly treat it like the other providers.

We can probably use the config.transportProvider to send the diagnotics but should be careful with the storage (config.storageProvider) so these events aren't mixed with "real" events.

packages/analytics-browser/src/browser-client.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/plugins/diagnostic.ts Outdated Show resolved Hide resolved
packages/analytics-browser/src/plugins/destination.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/plugins/diagnostic.ts Outdated Show resolved Hide resolved
packages/analytics-types/src/diagnostic-event.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/diagnostics/diagnostic.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/diagnostics/diagnostic.ts Outdated Show resolved Hide resolved
packages/analytics-browser/src/diagnostics/diagnostic.ts Outdated Show resolved Hide resolved
packages/analytics-browser/test/helpers/mock.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/config.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/diagnostics/typings.ts Outdated Show resolved Hide resolved
packages/analytics-browser/src/config.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/config.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/config.ts Outdated Show resolved Hide resolved
packages/analytics-core/test/diagnostic.test.ts Outdated Show resolved Hide resolved
packages/analytics-core/test/diagnostic.test.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/diagnostics/diagnostic.ts Outdated Show resolved Hide resolved
packages/analytics-types/src/diagnostic.ts Outdated Show resolved Hide resolved
packages/analytics-core/src/config.ts Show resolved Hide resolved
packages/analytics-core/src/plugins/destination.ts Outdated Show resolved Hide resolved
@shweta-amplitude shweta-amplitude removed their request for review November 7, 2023 18:41
Mercy811 and others added 28 commits November 16, 2023 09:41
Co-authored-by: Justin Fiedler <justin.fiedler@amplitude.com>
Co-authored-by: Justin Fiedler <justin.fiedler@amplitude.com>
1. account time in minutes
2. browser diagnostic default apiKey
Co-authored-by: Justin Fiedler <justin.fiedler@amplitude.com>
 - @amplitude/analytics-browser@2.4.0-featadddiagnostics.0
 - @amplitude/analytics-client-common@2.0.8-featadddiagnostics.0
 - @amplitude/analytics-core@2.2.0-featadddiagnostics.0
 - @amplitude/analytics-types@2.4.0-featadddiagnostics.0
 - @amplitude/plugin-global-user-properties@1.2.2-featadddiagnostics.0
 - @amplitude/plugin-page-view-tracking-browser@2.0.14-featadddiagnostics.0
 - @amplitude/plugin-web-attribution-browser@2.0.14-featadddiagnostics.0
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

5 participants