diff --git a/packages/grafana-prometheus/src/index.ts b/packages/grafana-prometheus/src/index.ts index 4eb15995aae..2e7bc495150 100644 --- a/packages/grafana-prometheus/src/index.ts +++ b/packages/grafana-prometheus/src/index.ts @@ -86,7 +86,7 @@ export { } from './types'; export { PrometheusVariableSupport } from './variables'; -// For explore metrics +// For Metrics Drilldown export { default as PromQlLanguageProvider } from './language_provider'; export { getPrometheusTime } from './language_utils'; export { isValidLegacyName, utf8Support, wrapUtf8Filters } from './utf8_support'; diff --git a/public/app/features/trails/Integrations/dashboardIntegration.ts b/public/app/features/trails/Integrations/dashboardIntegration.ts index 4ff039f377b..dd52e73fe44 100644 --- a/public/app/features/trails/Integrations/dashboardIntegration.ts +++ b/public/app/features/trails/Integrations/dashboardIntegration.ts @@ -61,7 +61,7 @@ export async function addDataTrailPanelAction(dashboard: DashboardScene, panel: if (subMenu.length > 0) { items.push({ - text: 'Explore metrics', + text: 'Metrics drilldown', iconClassName: 'code-branch', subMenu: getUnique(subMenu), }); @@ -109,7 +109,7 @@ function createCommonEmbeddedTrailStateProps(item: QueryMetric, dashboard: Dashb const commonProps = { scene: embeddedTrail, - title: 'Explore metrics', + title: 'Metrics drilldown', }; return commonProps; diff --git a/public/app/features/trails/MetricSelect/AddToExplorationsButton.tsx b/public/app/features/trails/MetricSelect/AddToExplorationsButton.tsx index da46b7635d0..bbdd7110530 100644 --- a/public/app/features/trails/MetricSelect/AddToExplorationsButton.tsx +++ b/public/app/features/trails/MetricSelect/AddToExplorationsButton.tsx @@ -80,7 +80,7 @@ export class AddToExplorationButton extends SceneObjectBase i }, ...Array.from(rootGroup?.groups.keys() ?? []).map((g) => ({ label: `${g}_`, value: g })), ]} - className="explore-metrics-metric-prefix-select" + className="metrics-drilldown-metric-prefix-select" /> {!metric && hasOtelResources && ( diff --git a/public/app/features/trails/MetricSelect/api.ts b/public/app/features/trails/MetricSelect/api.ts index bb807ee31e9..c36cbfe3e2c 100644 --- a/public/app/features/trails/MetricSelect/api.ts +++ b/public/app/features/trails/MetricSelect/api.ts @@ -57,7 +57,7 @@ export async function getMetricNamesWithoutScopes( ...(limit ? { limit } : {}), }; - const response = await getBackendSrv().get(url, params, 'explore-metrics-names'); + const response = await getBackendSrv().get(url, params, 'metrics-drilldown-names'); if (limit && response.warnings?.includes(LIMIT_REACHED)) { return { ...response, limitReached: true, missingOtelTargets }; @@ -82,7 +82,7 @@ export async function getMetricNamesWithScopes( filters, '__name__', limit, - 'explore-metrics-names' + 'metrics-drilldown-names' ); if (jobs.length > 0 && instances.length > 0) { diff --git a/public/app/features/trails/helpers/MetricDatasourceHelper.ts b/public/app/features/trails/helpers/MetricDatasourceHelper.ts index 5a64feb9584..ff7d1fa62f2 100644 --- a/public/app/features/trails/helpers/MetricDatasourceHelper.ts +++ b/public/app/features/trails/helpers/MetricDatasourceHelper.ts @@ -154,7 +154,7 @@ export class MetricDatasourceHelper { } /** - * Used for additional filtering for adhoc vars labels in Explore metrics. + * Used for additional filtering for adhoc vars labels in Metrics Drilldown. * @param options * @returns */ @@ -170,7 +170,7 @@ export class MetricDatasourceHelper { } /** - * Used for additional filtering for adhoc vars label values in Explore metrics. + * Used for additional filtering for adhoc vars label values in Metrics Drilldown. * @param options * @returns */ diff --git a/public/app/features/trails/otel/api.test.ts b/public/app/features/trails/otel/api.test.ts index 97e5f4a01ae..9ed900fa8be 100644 --- a/public/app/features/trails/otel/api.test.ts +++ b/public/app/features/trails/otel/api.test.ts @@ -30,10 +30,10 @@ jest.mock('@grafana/runtime', () => ({ requestId?: string, options?: Partial ) => { - // explore-metrics-otel-resources + // metrics-drilldown-otel-resources if ( - requestId === 'explore-metrics-otel-check-total-count(target_info{}) by (job, instance)' || - requestId === 'explore-metrics-otel-check-total-count(metric) by (job, instance)' + requestId === 'metrics-drilldown-otel-check-total-count(target_info{}) by (job, instance)' || + requestId === 'metrics-drilldown-otel-check-total-count(metric) by (job, instance)' ) { return Promise.resolve({ data: { @@ -43,17 +43,17 @@ jest.mock('@grafana/runtime', () => ({ ], }, }); - } else if (requestId === 'explore-metrics-otel-resources-deployment-env') { + } else if (requestId === 'metrics-drilldown-otel-resources-deployment-env') { return Promise.resolve({ data: ['env1', 'env2'] }); } else if ( requestId === - 'explore-metrics-otel-resources-metric-job-instance-metric{job=~"job1|job2",instance=~"instance1|instance2"}' + 'metrics-drilldown-otel-resources-metric-job-instance-metric{job=~"job1|job2",instance=~"instance1|instance2"}' ) { // part of getFilteredResourceAttributes to get metric labels. We prioritize metric labels over resource attributes so we use these to filter return Promise.resolve({ data: ['promotedResourceAttribute'] }); } else if ( requestId === - 'explore-metrics-otel-resources-metric-job-instance-target_info{job=~"job1|job2",instance=~"instance1|instance2"}' + 'metrics-drilldown-otel-resources-metric-job-instance-target_info{job=~"job1|job2",instance=~"instance1|instance2"}' ) { // part of getFilteredResourceAttributes to get instance labels return Promise.resolve({ data: ['promotedResourceAttribute', 'resourceAttribute'] }); diff --git a/public/app/features/trails/otel/api.ts b/public/app/features/trails/otel/api.ts index 542e9b2cd70..3e1bf5bb293 100644 --- a/public/app/features/trails/otel/api.ts +++ b/public/app/features/trails/otel/api.ts @@ -56,7 +56,7 @@ export async function totalOtelResources( const responseTotal = await getBackendSrv().get( url, paramsTotalTargets, - `explore-metrics-otel-check-total-${query}` + `metrics-drilldown-otel-check-total-${query}` ); let jobs: string[] = []; @@ -127,7 +127,7 @@ export async function getDeploymentEnvironmentsWithoutScopes( const response = await getBackendSrv().get( url, params, - 'explore-metrics-otel-resources-deployment-env' + 'metrics-drilldown-otel-resources-deployment-env' ); // exclude __name__ or previously chosen filters @@ -162,7 +162,7 @@ export async function getDeploymentEnvironmentsWithScopes( ], 'deployment_environment', undefined, - 'explore-metrics-otel-resources-deployment-env' + 'metrics-drilldown-otel-resources-deployment-env' ); // exclude __name__ or previously chosen filters return response.data.data; @@ -230,7 +230,7 @@ export async function getFilteredResourceAttributes( const metricResponse = await getBackendSrv().get( url, metricParams, - `explore-metrics-otel-resources-metric-job-instance-${metricMatchParam}` + `metrics-drilldown-otel-resources-metric-job-instance-${metricMatchParam}` ); // the metric labels here const metricLabels = metricResponse.data ?? []; @@ -249,7 +249,7 @@ export async function getFilteredResourceAttributes( const targetInfoResponse = await getBackendSrv().get( url, targetInfoParams, - `explore-metrics-otel-resources-metric-job-instance-${targetInfoMatchParam}` + `metrics-drilldown-otel-resources-metric-job-instance-${targetInfoMatchParam}` ); const targetInfoAttributes = targetInfoResponse.data ?? []; @@ -294,7 +294,7 @@ export async function getNonPromotedOtelResources(datasourceUid: string, timeRan const targetInfoResponse = getBackendSrv().get( url, targetInfoParams, - `explore-metrics-all-otel-resources-on-target_info` + `metrics-drilldown-all-otel-resources-on-target_info` ); // all labels in all metrics @@ -311,7 +311,7 @@ export async function getNonPromotedOtelResources(datasourceUid: string, timeRan const metricResponse = await getBackendSrv().get( url, metricParams, - `explore-metrics-all-metric-labels-not-otel-resource-attributes` + `metrics-drilldown-all-metric-labels-not-otel-resource-attributes` ); const promResponses = await Promise.all([targetInfoResponse, metricResponse]); // otel resource attributes diff --git a/public/app/features/trails/otel/util.ts b/public/app/features/trails/otel/util.ts index 166d089ff4e..8b1d4e29ca5 100644 --- a/public/app/features/trails/otel/util.ts +++ b/public/app/features/trails/otel/util.ts @@ -548,7 +548,7 @@ function checkLabelPromotion(filters: AdHocVariableFilter[], nonPromotedOtelReso * Once we know this, we can add the selected filter to either the * VAR_OTEL_RESOURCES or VAR_FILTERS variable. * - * When the correct variable is updated, the rest of the explore metrics behavior will remain the same. + * When the correct variable is updated, the rest of the Metrics Drilldown behavior will remain the same. * * @param newStateFilters * @param prevStateFilters