Repository: open-telemetry/opentelemetry-java
File: sdk-extensions/autoconfigure/src/testFullConfig/java/io/opentelemetry/sdk/autoconfigure/FullConfigTest.java (Java)

Code before:
                            .anySatisfy(
                                scopeMetrics -> {
                                  assertThat(scopeMetrics.getScope().getName())
                                      .isEqualTo(
                                          "io.opentelemetry.exporters.otlp_grpc_log_exporter");
                                  assertThat(scopeMetrics.getMetricsList())
                                      .satisfiesExactlyInAnyOrder(
                                          metric ->
                                              assertThat(metric.getName())
                                                  .isEqualTo("otel.sdk.exporter.log.inflight"),
                                          metric ->
                                              assertThat(metric.getName())
                                                  .isEqualTo(
                                                      "otel.sdk.exporter.operation.duration"),
                                          metric ->
                                              assertThat(metric.getName())
                                                  .isEqualTo("otel.sdk.exporter.log.exported"));
                                })
                            .anySatisfy(
                                scopeMetrics -> {
                                  assertThat(scopeMetrics.getScope().getName())
                                      .isEqualTo(
                                          "io.opentelemetry.exporters.otlp_grpc_span_exporter");
                                  assertThat(scopeMetrics.getMetricsList())
                                      .satisfiesExactlyInAnyOrder(
                                          metric ->
                                              assertThat(metric.getName())
                                                  .isEqualTo("otel.sdk.exporter.span.inflight"),
                                          metric ->
                                              assertThat(metric.getName())
                                                  .isEqualTo(
                                                      "otel.sdk.exporter.operation.duration"),
                                          metric ->
                                              assertThat(metric.getName())
                                                  .isEqualTo("otel.sdk.exporter.span.exported"));
                                })
                            .anySatisfy(
                                scopeMetrics -> {
                                  assertThat(scopeMetrics.getScope().getName())
                                      .isEqualTo("io.opentelemetry.sdk.logs");
                                  assertThat(scopeMetrics.getMetricsList())
                                      .satisfiesExactlyInAnyOrder(
                                          metric ->
                                              assertThat(metric.getName())
                                                  .isEqualTo("otel.sdk.log.created"),
                                          metric ->
                                              assertThat(metric.getName())
                                                  .isEqualTo("otel.sdk.processor.log.processed"),
                                          metric ->
                                              assertThat(metric.getName())
                                                  .isEqualTo(

Review comment (suggestion):
#nit if we're not going to assert on the attributes, maybe a more terse assert syntax

```suggestion
                            .anySatisfy(
                                scopeMetrics -> {
                                  assertThat(scopeMetrics.getScope().getName())
                                      .isEqualTo("io.opentelemetry.sdk.logs");
                                  assertThat(
                                          scopeMetrics.getMetricsList().stream()
                                              .map(Metric::getName)
                                              .collect(Collectors.toSet()))
                                      .isEqualTo(
                                          new HashSet<>(
                                              Arrays.asList(
                                                  "otel.sdk.log.created",
                                                  "otel.sdk.processor.log.processed",
                                                  "otel.sdk.processor.log.queue.capacity",
                                                  "otel.sdk.processor.log.queue.size")));
```

Or maybe even something like maintaining a `Map<String, Set<String>>`, with keys of each expected scope and values being the set of metric names expected for that scope. 

Not critical, but this test does get pretty long with so many verbose asserts. 

Code after:
                                      "otel.sdk.exporter.log.inflight",
                                      "otel.sdk.exporter.operation.duration",
                                      "otel.sdk.exporter.log.exported");
                                })
                            .anySatisfy(
                                scopeMetrics -> {
                                  assertThat(scopeMetrics.getScope().getName())
                                      .isEqualTo(
                                          "io.opentelemetry.exporters.otlp_grpc_span_exporter");
                                  assertMetricNames(
                                      scopeMetrics,
                                      "otel.sdk.exporter.span.inflight",
                                      "otel.sdk.exporter.operation.duration",
                                      "otel.sdk.exporter.span.exported");
                                })
                            .anySatisfy(
                                scopeMetrics -> {
                                  assertThat(scopeMetrics.getScope().getName())
                                      .isEqualTo("io.opentelemetry.sdk.logs");
                                  assertMetricNames(
                                      scopeMetrics,
                                      "otel.sdk.log.created",
                                      "otel.sdk.processor.log.processed",
                                      "otel.sdk.processor.log.queue.capacity",
                                      "otel.sdk.processor.log.queue.size");
                                })
                            .anySatisfy(
                                scopeMetrics -> {
                                  assertThat(scopeMetrics.getScope().getName())
                                      .isEqualTo("io.opentelemetry.sdk.trace");
                                  assertMetricNames(
                                      scopeMetrics,
                                      "otel.sdk.span.live",
                                      "otel.sdk.span.started",
                                      "otel.sdk.processor.span.processed",
                                      "otel.sdk.processor.span.queue.capacity",
                                      "otel.sdk.processor.span.queue.size");
                                });
                      });
            });

    await().untilAsserted(() -> assertThat(otlpLogsRequests).hasSize(1));
    ExportLogsServiceRequest logRequest = otlpLogsRequests.take();
    List<KeyValue> logResourceAttributes =
        logRequest.getResourceLogs(0).getResource().getAttributesList();
    assertHasKeyValue(logResourceAttributes, "service.name", "test");
    assertHasKeyValue(logResourceAttributes, "cat", "meow");

    assertThat(logRequest.getResourceLogs(0).getScopeLogs(0).getLogRecordsList())
        // LogRecordCustomizer customizes BatchLogProcessor to add an extra attribute on every log
        // record