x-pack/platform/plugins/private/feedback/feedback.mdx
Feedback plugin (also known as One Feedback) is a universal way of giving feedback about Elastic in Kibana. It allows users to easily provide feedback and CSAT scores directly from the UI.
Feedback plugin registers a button in the Chrome global header area which is shown when all of these criteria are met:
core.notifications.feedback.isEnabled())telemetry.telemetryService.canSendTelemetry())telemetry.telemetryService.getIsOptedIn())It also respects the global Usage Collection advanced setting.
Once clicked, a modal containing feedback questions and CSAT score buttons are displayed to the user. The questions are context-aware and are defined per application in @kbn/feedback-registry package. In case when an application has no defined questions a default set of questions is displayed.
Feedback, along with other session data, is sent using the server-side EBT feedback_submitted event to Elastic's telemetry cluster, where it is stored in the ebt-kibana-server index.
To define application-specific questions, add them to the @kbn/feedback-registry package.
x-pack/platform/packages/private/feedback-registry/src/registry.ts/**
* The id of the application associated with this feedback entry, e.g. 'dashboard', 'discover'
* or in case of deep links, the deep link id e.g. 'ml:dataVisualizer'.
*/
type FeedbackRegistryEntryId = string;
/**
* Definition of a feedback question entry in the feedback registry.
*/
interface FeedbackRegistryEntry {
/**
* Unique identifier for the feedback entry.
*/
id: string;
/**
* Sort order for displaying the feedback entry. The lower the number, the higher it appears in the UI.
*/
order: number;
/**
* The question text to be submitted with telemetry.
*/
question: string;
/**
* The question text which appears in the UI.
*/
label?: {
i18nId: string;
defaultMessage: string;
};
/**
* Optional placeholder to show in the UI.
*/
placeholder?: {
i18nId: string;
defaultMessage: string;
};
/**
* Optional aria-label.
*/
ariaLabel?: {
i18nId: string;
defaultMessage: string;
};
}
type FeedbackRegistry = Map<FeedbackRegistryEntryId, FeedbackRegistryEntry[]>;
document.querySelector('[data-app-id]')?.getAttribute('data-app-id')