Skip to content

Commit

Permalink
Update OpenTelemetryMetricsBackendTest.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 authored Oct 29, 2024
1 parent 112fe30 commit 6fe900a
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,8 @@ class OpenTelemetryMetricsBackendTest extends AnyFlatSpec with Matchers with Opt
(0 until 5).foreach(_ => basicRequest.get(uri"http://127.0.0.1/foo").send(backend))

// then
val histogram = getHistogramValue(reader, OpenTelemetryMetricsBackend.DefaultLatencyHistogramName).value
val attributes = histogram.getAttributes
attributes.get(AttributeKey.stringKey("http.request.method")) shouldBe "GET"
attributes.get(AttributeKey.stringKey("server.address")) shouldBe "127.0.0.1"
attributes.get(AttributeKey.longKey("http.response.status_code")) shouldBe 200L
val metrics = reader.collectAllMetrics().asScala.toList
specTest(metrics, OpenTelemetryMetricsBackend.DefaultLatencyHistogramName)
}

it should "use error counter when http error is thrown" in {
Expand Down

0 comments on commit 6fe900a

Please sign in to comment.