Skip to content

Commit

Permalink
Add OTLP for metrics entry
Browse files Browse the repository at this point in the history
Closes gh-1598
  • Loading branch information
mhalbritter committed Sep 27, 2024
1 parent 3ea78c5 commit 3d7aa9a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
class ObservabilityActuatorBuildCustomizer implements BuildCustomizer<Build> {

private static final List<String> STANDARD_REGISTRY_IDS = Arrays.asList("datadog", "distributed-tracing",
"dynatrace", "graphite", "influx", "new-relic", "wavefront", "zipkin");
"dynatrace", "graphite", "influx", "new-relic", "otlp-metrics", "wavefront", "zipkin");

@Override
public void customize(Build build) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
class SpringModulithBuildCustomizer implements BuildCustomizer<Build> {

private static final Collection<String> OBSERVABILITY_DEPENDENCIES = List.of("actuator", "datadog", "graphite",
"influx", "new-relic", "prometheus", "wavefront", "zipkin");
"influx", "new-relic", "otlp-metrics", "prometheus", "wavefront", "zipkin");

private static final Collection<String> PERSISTENCE = List.of("jdbc", "jpa", "mongodb");

Expand Down
10 changes: 10 additions & 0 deletions start-site/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,16 @@ initializr:
links:
- rel: reference
href: https://docs.spring.io/spring-boot/docs/{bootVersion}/reference/htmlsingle/index.html#actuator.metrics.export.newrelic
- name: OTLP for metrics
id: otlp-metrics
groupId: io.micrometer
artifactId: micrometer-registry-otlp
scope: runtime
starter: false
description: Publish Micrometer metrics to an OTLP capable backend.
links:
- rel: reference
href: https://docs.spring.io/spring-boot/reference/actuator/metrics.html#actuator.metrics.export.otlp
- name: Prometheus
id: prometheus
groupId: io.micrometer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class ObservabilityActuatorBuildCustomizerTests extends AbstractExtensionTests {
private static final String SPRING_BOOT_VERSION = "3.3.0";

@ParameterizedTest
@ValueSource(strings = { "datadog", "dynatrace", "influx", "graphite", "new-relic", "distributed-tracing", "zipkin",
"wavefront" })
@ValueSource(strings = { "datadog", "dynatrace", "influx", "graphite", "new-relic", "otlp-metrics",
"distributed-tracing", "zipkin", "wavefront" })
void actuatorIsAddedWithObservabilityEntries(String dependency) {
assertThat(generateProject(SPRING_BOOT_VERSION, dependency)).mavenBuild()
.hasDependency(getDependency("actuator"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ void registersActuatorStarterIfActuatorsIsPresent() {
}

@ParameterizedTest
@ValueSource(
strings = { "actuator", "datadog", "graphite", "influx", "new-relic", "prometheus", "wavefront", "zipkin" })
@ValueSource(strings = { "actuator", "datadog", "graphite", "influx", "new-relic", "otlp-metrics", "prometheus",
"wavefront", "zipkin" })
void registersObservabilityStarterIfObservabilityDependencyIsPresent(String dependency) {
Build build = createBuild("modulith");
build.dependencies().add(dependency);
Expand Down

0 comments on commit 3d7aa9a

Please sign in to comment.