Skip to content

Commit

Permalink
Update OpenTelemetryMetricsTest.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 authored Oct 30, 2024
1 parent aba50b9 commit 6d5dd85
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
"GET",
AttributeKey.stringKey("path"),
"/person",
AttributeKey.longKey("http.response.status_code").asInstanceOf[AttributeKey[Long]], // Explicitly cast to Long
200L
AttributeKey.stringKey("http.response.status_code"),
"200"
) && dp.getValue == 2 =>
true
case dp
Expand All @@ -111,8 +111,8 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
"GET",
AttributeKey.stringKey("path"),
"/person",
AttributeKey.longKey("http.response.status_code").asInstanceOf[AttributeKey[Long]], // Explicitly cast to Long
400L
AttributeKey.stringKey("http.response.status_code"),
"400"
) && dp.getValue == 2 =>
true
case _ => false
Expand Down Expand Up @@ -154,8 +154,10 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
"GET",
AttributeKey.stringKey("path"),
"/person",
AttributeKey.longKey("http.response.status_code").asInstanceOf[AttributeKey[Long]], // Explicitly cast to Long
200L
AttributeKey.stringKey("http.response.status_code"),
"200",
AttributeKey.stringKey("phase"),
"body"
)
)
}
Expand Down Expand Up @@ -209,8 +211,8 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
"GET",
AttributeKey.stringKey("path"),
"/person",
AttributeKey.longKey("http.response.status_code").asInstanceOf[AttributeKey[Long]], // Explicitly cast to Long
500L
AttributeKey.stringKey("http.response.status_code"),
"500"
)
point.getValue shouldBe 1
}
Expand Down

0 comments on commit 6d5dd85

Please sign in to comment.