Skip to content

Commit

Permalink
[APM] Add default time field: @timestamp for the ad hoc data view (#…
Browse files Browse the repository at this point in the history
…186167)

## Summary

unblocks #182107
  • Loading branch information
kpatticha authored Jun 17, 2024
1 parent a2c068a commit 3959af2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export function useAdHocApmDataView() {

try {
const displayError = false;
return await services.dataViews.create({ title: indexPattern }, undefined, displayError);
return await services.dataViews.create(
{ title: indexPattern, timeFieldName: '@timestamp' },
undefined,
displayError
);
} catch (e) {
const noDataScreen = e.message.includes('No matching indices found');
if (noDataScreen) {
Expand Down

0 comments on commit 3959af2

Please sign in to comment.