Skip to content

Commit dabc833

Browse files
committed
Polish "Add support for Grafana LGTM stack"
See gh-41551
1 parent 9eff627 commit dabc833

File tree

13 files changed

+36
-39
lines changed

13 files changed

+36
-39
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
import static org.assertj.core.api.Assertions.assertThat;
2424

2525
/**
26-
* Integration tests for
27-
* {@link OpenTelemetryMetricsDockerComposeConnectionDetailsFactory}.
26+
* Integration tests for {@link OpenTelemetryMetricsDockerComposeConnectionDetailsFactory}
27+
* using {@link TestImage#GRAFANA_OTEL_LGTM}.
2828
*
2929
* @author Eddú Meléndez
3030
*/
31-
class GrafanaOtelMetricsDockerComposeConnectionDetailsFactoryIntegrationTests {
31+
class GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests {
3232

3333
@DockerComposeTest(composeFile = "otlp-compose.yaml", image = TestImage.GRAFANA_OTEL_LGTM)
3434
void runCreatesConnectionDetails(OtlpMetricsConnectionDetails connectionDetails) {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
import static org.assertj.core.api.Assertions.assertThat;
2424

2525
/**
26-
* Integration tests for
27-
* {@link OpenTelemetryTracingDockerComposeConnectionDetailsFactory}.
26+
* Integration tests for {@link OpenTelemetryTracingDockerComposeConnectionDetailsFactory}
27+
* using {@link TestImage#GRAFANA_OTEL_LGTM}.
2828
*
2929
* @author Eddú Meléndez
3030
*/
31-
class GrafanaOtelTracingDockerComposeConnectionDetailsFactoryIntegrationTests {
31+
class GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests {
3232

3333
@DockerComposeTest(composeFile = "otlp-compose.yaml", image = TestImage.GRAFANA_OTEL_LGTM)
3434
void runCreatesConnectionDetails(OtlpTracingConnectionDetails connectionDetails) {

spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import static org.assertj.core.api.Assertions.assertThat;
2424

2525
/**
26-
* Integration tests for
27-
* {@link OpenTelemetryMetricsDockerComposeConnectionDetailsFactory}.
26+
* Integration tests for {@link OpenTelemetryMetricsDockerComposeConnectionDetailsFactory}
27+
* using {@link TestImage#OPENTELEMETRY}.
2828
*
2929
* @author Eddú Meléndez
3030
*/

spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import static org.assertj.core.api.Assertions.assertThat;
2424

2525
/**
26-
* Integration tests for
27-
* {@link OpenTelemetryTracingDockerComposeConnectionDetailsFactory}.
26+
* Integration tests for {@link OpenTelemetryTracingDockerComposeConnectionDetailsFactory}
27+
* using {@link TestImage#OPENTELEMETRY}.
2828
*
2929
* @author Eddú Meléndez
3030
*/

spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ The following service connection factories are provided in the `spring-boot-test
7272
| Containers of type `Neo4jContainer`
7373

7474
| `OtlpMetricsConnectionDetails`
75-
| Containers named "otel/opentelemetry-collector-contrib" or `LgtmStackContainer`
75+
| Containers named "otel/opentelemetry-collector-contrib" or of type `LgtmStackContainer`
7676

7777
| `OtlpTracingConnectionDetails`
78-
| Containers named "otel/opentelemetry-collector-contrib" or `LgtmStackContainer`
78+
| Containers named "otel/opentelemetry-collector-contrib" or of type `LgtmStackContainer`
7979

8080
| `PulsarConnectionDetails`
8181
| Containers of type `PulsarContainer`
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@
4545
import static org.assertj.core.api.Assertions.assertThat;
4646

4747
/**
48-
* Tests for {@link GrafanaOtelLgtmMetricsContainerConnectionDetailsFactory}.
48+
* Tests for {@link GrafanaOpenTelemetryMetricsContainerConnectionDetailsFactory}.
4949
*
5050
* @author Eddú Meléndez
5151
*/
5252
@SpringJUnitConfig
5353
@TestPropertySource(properties = { "management.otlp.metrics.export.resource-attributes.service.name=test",
5454
"management.otlp.metrics.export.step=1s" })
5555
@Testcontainers(disabledWithoutDocker = true)
56-
class GrafanaOtelLgtmMetricsContainerConnectionDetailsFactoryIntegrationTests {
56+
class GrafanaOpenTelemetryMetricsContainerConnectionDetailsFactoryIntegrationTests {
5757

5858
@Container
5959
@ServiceConnection
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@
3333
import static org.assertj.core.api.Assertions.assertThat;
3434

3535
/**
36-
* Tests for
37-
* {@link GrafanaOtelLgtmTracingContainerConnectionDetailsFactoryIntegrationTests}.
36+
* Tests for {@link GrafanaOpenTelemetryTracingContainerConnectionDetailsFactory}.
3837
*
3938
* @author Eddú Meléndez
4039
*/
4140
@SpringJUnitConfig
4241
@Testcontainers(disabledWithoutDocker = true)
43-
class GrafanaOtelLgtmTracingContainerConnectionDetailsFactoryIntegrationTests {
42+
class GrafanaOpenTelemetryTracingContainerConnectionDetailsFactoryIntegrationTests {
4443

4544
@Container
4645
@ServiceConnection
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.boot.testcontainers.service.connection.otlp;
1818

19-
import org.testcontainers.containers.GenericContainer;
2019
import org.testcontainers.grafana.LgtmStackContainer;
2120

2221
import org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsConnectionDetails;
@@ -27,15 +26,15 @@
2726
/**
2827
* {@link ContainerConnectionDetailsFactory} to create
2928
* {@link OtlpMetricsConnectionDetails} from a
30-
* {@link ServiceConnection @ServiceConnection}-annotated {@link GenericContainer} using
31-
* the {@code "otel/opentelemetry-collector-contrib"} image.
29+
* {@link ServiceConnection @ServiceConnection}-annotated {@link LgtmStackContainer} using
30+
* the {@code "grafana/otel-lgtmb"} image.
3231
*
3332
* @author Eddú Meléndez
3433
*/
35-
class GrafanaOtelLgtmMetricsContainerConnectionDetailsFactory
34+
class GrafanaOpenTelemetryMetricsContainerConnectionDetailsFactory
3635
extends ContainerConnectionDetailsFactory<LgtmStackContainer, OtlpMetricsConnectionDetails> {
3736

38-
GrafanaOtelLgtmMetricsContainerConnectionDetailsFactory() {
37+
GrafanaOpenTelemetryMetricsContainerConnectionDetailsFactory() {
3938
super(ANY_CONNECTION_NAME,
4039
"org.springframework.boot.actuate.autoconfigure.metrics.export.otlp.OtlpMetricsExportAutoConfiguration");
4140
}

0 commit comments

Comments
 (0)