Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed May 14, 2024
1 parent 9c72cf9 commit f87356a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ void databaseQuery() {
traceAssert ->
traceAssert.hasSpansSatisfyingExactly(
span -> span.hasName("server"),
span -> span.satisfies(s -> assertThat(s.getName()).endsWith(".getConnection")),
span ->
span.hasKind(SpanKind.CLIENT)
.hasAttribute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.util.Optional;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
Expand All @@ -26,15 +25,12 @@ public class OtelSpringStarterSmokeTestController {
public static final String METER_SCOPE_NAME = "scope";
private final LongHistogram histogram;
private final Optional<RestTemplate> restTemplate;
private final JdbcTemplate jdbcTemplate;
private final Optional<ServletWebServerApplicationContext> server;

public OtelSpringStarterSmokeTestController(
OpenTelemetry openTelemetry,
RestTemplateBuilder restTemplateBuilder,
JdbcTemplate jdbcTemplate,
Optional<ServletWebServerApplicationContext> server) {
this.jdbcTemplate = jdbcTemplate;
this.server = server;
Meter meter = openTelemetry.getMeter(METER_SCOPE_NAME);
histogram = meter.histogramBuilder(TEST_HISTOGRAM).ofLongs().build();
Expand Down

0 comments on commit f87356a

Please sign in to comment.