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 for toasts 166459 2 #167270

Conversation

vadimkibana
Copy link
Contributor

Original PR: #166466

  • This PR changes the original by only removing the title field from telemetry.

Closes #166466


Original:

Summary

Address #166459

This PR scaffolds telemetry into the notification service, to enable reporting when deduped toasts are dismissed. When a deduped toast is dismissed; the message recurrence count and the toast message would be emitted.

Telemetry Event Definition;

{
 eventType: "global_toast_list_toast_dismissed",
 schema: {
   "toast_deduplication_count": {
      type: "long",
      _meta: {
        description: "toast message text"
      }
   },
  "toast_message": {
      type: "keyword",
      _meta: {
        description: "recurrence count for particular toast message"
      }
   },
 "toast_message_type": {
      type: "keyword",
      _meta: {
        description: "toast message type, accepted values are warning, danger, primary"
      }
   }
 }
}

Testing;

  • Ensure you have an existing dashboard, if you don't installing any sample data would bootstrap a dashboard automatically
  • Search for visualize library from the global search bar, and navigate to visualize library.
  • Attempt to create a visualization, select the TSVB visualization type. At this step there typically wouldn't be an error
  • We can simulate an error, by open Dev tools and blocking the URL /internal/metrics/vis/data like so Screenshot 2023-09-21 at 11 49 41
    on doing this, we then attempt refreshing the query, we would then be presented with an error toast, similar to the screenshot below;
    Screenshot 2023-09-21 at 11 52 51
    click the refresh query button as much as you like to increase it's recurrence count.
  • From here on we verify that; clicking the dismiss button sends a telemetry event, also not interacting with the toast and it's display lifetime elapsing with the toast clearing itself, the telemetry gets sent still. In either case there should be a request calling the resource kibana_browser with a payload containing the telemetry event definition above.

Checklist

@vadimkibana vadimkibana requested a review from a team as a code owner September 26, 2023 12:46
@vadimkibana vadimkibana added review release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.11.0 labels Sep 26, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@vadimkibana
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

LGTM

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #33 / discover/group1 shared links shared links with state in sessionStorage sharing hashed url shouldn't crash the app
  • [job] [logs] FTR Configs #60 / serverless common UI Index Management Create enrich policy "before all" hook for "shows create enrich policies page and docs link"
  • [job] [logs] FTR Configs #27 / serverless search UI empty pages "before all" hook for "should show search specific empty page in discover"
  • [job] [logs] FTR Configs #30 / serverless security UI Create Case "before each" hook for "creates a case"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
core 483 486 +3

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 366.4KB 367.4KB +936.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes review Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants