Skip to content

Commit 0a0b09a

Browse files
committed
Remove remnants of project_id label
1 parent a57ddb4 commit 0a0b09a

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

server/src/internalClusterTest/java/org/elasticsearch/repositories/SnapshotMetricsIT.java

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
1515
import org.elasticsearch.cluster.SnapshotsInProgress;
1616
import org.elasticsearch.cluster.metadata.IndexMetadata;
17-
import org.elasticsearch.cluster.metadata.ProjectId;
1817
import org.elasticsearch.cluster.service.ClusterService;
1918
import org.elasticsearch.common.settings.Settings;
2019
import org.elasticsearch.common.unit.ByteSizeValue;
@@ -154,14 +153,7 @@ public void testSnapshotAPMMetrics() throws Exception {
154153
assertShardsInProgressMetricIs(everyItem(equalTo(0L)));
155154

156155
// 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");
165157
final Map<String, Object> expectedAttrsWithShardStage = Maps.copyMapWithAddedEntry(
166158
expectedAttrs,
167159
"stage",
@@ -290,14 +282,7 @@ public void testThrottlingMetrics() throws Exception {
290282
);
291283

292284
// 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");
301286
assertMetricsHaveAttributes(InstrumentType.LONG_COUNTER, SnapshotMetrics.SNAPSHOT_UPLOAD_READ_DURATION, expectedAttrs);
302287
assertMetricsHaveAttributes(InstrumentType.LONG_COUNTER, SnapshotMetrics.SNAPSHOT_RESTORE_THROTTLE_DURATION, expectedAttrs);
303288
assertMetricsHaveAttributes(InstrumentType.LONG_COUNTER, SnapshotMetrics.SNAPSHOT_CREATE_THROTTLE_DURATION, expectedAttrs);

0 commit comments

Comments
 (0)