|
14 | 14 | import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; |
15 | 15 | import org.elasticsearch.cluster.SnapshotsInProgress; |
16 | 16 | import org.elasticsearch.cluster.metadata.IndexMetadata; |
17 | | -import org.elasticsearch.cluster.metadata.ProjectId; |
18 | 17 | import org.elasticsearch.cluster.service.ClusterService; |
19 | 18 | import org.elasticsearch.common.settings.Settings; |
20 | 19 | import org.elasticsearch.common.unit.ByteSizeValue; |
@@ -154,14 +153,7 @@ public void testSnapshotAPMMetrics() throws Exception { |
154 | 153 | assertShardsInProgressMetricIs(everyItem(equalTo(0L))); |
155 | 154 |
|
156 | 155 | // assert appropriate attributes are present |
157 | | - final Map<String, Object> expectedAttrs = Map.of( |
158 | | - "project_id", |
159 | | - ProjectId.DEFAULT.id(), |
160 | | - "repo_name", |
161 | | - repositoryName, |
162 | | - "repo_type", |
163 | | - "mock" |
164 | | - ); |
| 156 | + final Map<String, Object> expectedAttrs = Map.of("repo_name", repositoryName, "repo_type", "mock"); |
165 | 157 | final Map<String, Object> expectedAttrsWithShardStage = Maps.copyMapWithAddedEntry( |
166 | 158 | expectedAttrs, |
167 | 159 | "stage", |
@@ -290,14 +282,7 @@ public void testThrottlingMetrics() throws Exception { |
290 | 282 | ); |
291 | 283 |
|
292 | 284 | // assert appropriate attributes are present |
293 | | - final Map<String, Object> expectedAttrs = Map.of( |
294 | | - "project_id", |
295 | | - ProjectId.DEFAULT.id(), |
296 | | - "repo_name", |
297 | | - repositoryName, |
298 | | - "repo_type", |
299 | | - "mock" |
300 | | - ); |
| 285 | + final Map<String, Object> expectedAttrs = Map.of("repo_name", repositoryName, "repo_type", "mock"); |
301 | 286 | assertMetricsHaveAttributes(InstrumentType.LONG_COUNTER, SnapshotMetrics.SNAPSHOT_UPLOAD_READ_DURATION, expectedAttrs); |
302 | 287 | assertMetricsHaveAttributes(InstrumentType.LONG_COUNTER, SnapshotMetrics.SNAPSHOT_RESTORE_THROTTLE_DURATION, expectedAttrs); |
303 | 288 | assertMetricsHaveAttributes(InstrumentType.LONG_COUNTER, SnapshotMetrics.SNAPSHOT_CREATE_THROTTLE_DURATION, expectedAttrs); |
|
0 commit comments