Skip to content

Commit

Permalink
Merge branch '163590-dashboard' of github.com:kpatticha/kibana into 1…
Browse files Browse the repository at this point in the history
…63590-dashboard
  • Loading branch information
kpatticha committed Oct 2, 2023
2 parents e911284 + 01ca59b commit 8e7be83
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/kbn-check-mappings-update-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3096,6 +3096,22 @@
}
}
},
"apm-custom-dashboards": {
"properties": {
"dashboardSavedObjectId": {
"type": "keyword"
},
"kuery": {
"type": "text"
},
"serviceEnvironmentFilterEnabled": {
"type": "boolean"
},
"serviceNameFilterEnabled": {
"type": "boolean"
}
}
},
"enterprise_search_telemetry": {
"dynamic": false,
"properties": {}
Expand All @@ -3108,4 +3124,4 @@
"dynamic": false,
"properties": {}
}
}
}
22 changes: 22 additions & 0 deletions x-pack/plugins/apm/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
Logger,
Plugin,
PluginInitializerContext,
SavedObjectsClient,
} from '@kbn/core/server';
import { isEmpty, mapValues } from 'lodash';
import { Dataset } from '@kbn/rule-registry-plugin/server';
Expand Down Expand Up @@ -49,6 +50,7 @@ import { scheduleSourceMapMigration } from './routes/source_maps/schedule_source
import { createApmSourceMapIndexTemplate } from './routes/source_maps/create_apm_source_map_index_template';
import { addApiKeysToEveryPackagePolicyIfMissing } from './routes/fleet/api_keys/add_api_keys_to_policies_if_missing';
import { apmTutorialCustomIntegration } from '../common/tutorial/tutorials';
import { APM_STATIC_DATA_VIEW_ID } from '../common/data_view_constants';

export class APMPlugin
implements
Expand Down Expand Up @@ -121,6 +123,26 @@ export class APMPlugin
],
});

// ensure that the APM data view is globally available
getCoreStart()
.then(async (coreStart) => {
const soClient = new SavedObjectsClient(
coreStart.savedObjects.createInternalRepository()
);

await soClient.updateObjectsSpaces(
[{ id: APM_STATIC_DATA_VIEW_ID, type: 'index-pattern' }],
['*'],
[]
);
})
.catch((e) => {
this.logger?.error(
'Failed to make APM data view available globally',
e
);
});

const resourcePlugins = mapValues(plugins, (value, key) => {
return {
setup: value,
Expand Down

0 comments on commit 8e7be83

Please sign in to comment.