Skip to content

Commit c41b3c6

Browse files
authored
feat: collect metrics for when t2viz triggered (#510)
* feat: collect metrics for when t2viz triggered Signed-off-by: Yulong Ruan <[email protected]> * update CHANGELOG Signed-off-by: Yulong Ruan <[email protected]> * update release-notes Signed-off-by: Yulong Ruan <[email protected]> --------- Signed-off-by: Yulong Ruan <[email protected]>
1 parent 1d14aea commit c41b3c6

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1010

1111
### Bug Fixes
1212

13-
- Remove text in badge to make it compatible with small screen ([#509](https://github.com/opensearch-project/dashboards-assistant/pull/509))
14-
1513
### Infrastructure
1614

1715
### Documentation

public/components/visualization/text2viz.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,17 @@ export const Text2Viz = () => {
254254
dataSourceId: indexPattern.dataSourceRef?.id,
255255
});
256256

257+
if (usageCollection) {
258+
usageCollection.reportUiStats(
259+
VIS_NLQ_APP_ID,
260+
usageCollection.METRIC_TYPE.CLICK,
261+
`triggered-${uuidv4()}`
262+
);
263+
}
264+
257265
setSubmitting(false);
258266
},
259-
[selectedSource, inputQuestion, status, notifications.toasts]
267+
[selectedSource, inputQuestion, status, notifications.toasts, usageCollection]
260268
);
261269

262270
/**

release-notes/dashboards-assistant.release-notes-3.0.0.0-alpha1.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Compatible with OpenSearch and OpenSearch Dashboards version 3.0.0-alpha1
1414
- Generate visualization on t2v page mount ([#505](https://github.com/opensearch-project/dashboards-assistant/pull/505))
1515
- Update insight badge ([#507](https://github.com/opensearch-project/dashboards-assistant/pull/507))
1616

17-
1817
### Enhancements
1918

2019
- remove os_insight agent ([#452](https://github.com/opensearch-project/dashboards-assistant/pull/452))
@@ -27,7 +26,7 @@ Compatible with OpenSearch and OpenSearch Dashboards version 3.0.0-alpha1
2726
- Show error message if PPL query does not contain aggregation ([#499](https://github.com/opensearch-project/dashboards-assistant/pull/499))
2827
- Adjust the overall style of alert summary popover ([#501](https://github.com/opensearch-project/dashboards-assistant/pull/501))
2928
- Add http error instruction for t2ppl task ([#502](https://github.com/opensearch-project/dashboards-assistant/pull/502))
30-
29+
- collect metrics for when t2viz triggered([#510](https://github.com/opensearch-project/dashboards-assistant/pull/510))
3130

3231
### Bug Fixes
3332

@@ -44,6 +43,7 @@ Compatible with OpenSearch and OpenSearch Dashboards version 3.0.0-alpha1
4443
- Fix error handling for data source connection errors ([#500](https://github.com/opensearch-project/dashboards-assistant/pull/500))
4544
- Fix bug by hiding alert summary when clicking alert name ([#482](https://github.com/opensearch-project/dashboards-assistant/pull/482))
4645
- Fix alert summary message action position when no discover button ([#504](https://github.com/opensearch-project/dashboards-assistant/pull/504))
46+
- Remove text in badge to make it compatible with small screen ([#509](https://github.com/opensearch-project/dashboards-assistant/pull/509))
4747

4848
### Maintenance
4949

0 commit comments

Comments
 (0)