Skip to content

Commit

Permalink
Update OpenTelemetryMetricsTest.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 authored Nov 8, 2024
1 parent 6a7662f commit 64987e6
Showing 1 changed file with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
AttributeKey.stringKey("http.request.method"),
"GET",
AttributeKey.stringKey("path"),
"/person"
"/person",
AttributeKey.stringKey("url.scheme"),
"http"
)
point.getValue shouldBe 1

Expand All @@ -65,7 +67,9 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
AttributeKey.stringKey("http.request.method"),
"GET",
AttributeKey.stringKey("path"),
"/person"
"/person",
AttributeKey.stringKey("url.scheme"),
"http"
)
point.getValue shouldBe 0
}
Expand Down Expand Up @@ -101,8 +105,12 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
"GET",
AttributeKey.stringKey("path"),
"/person",
AttributeKey.stringKey("url.scheme"),
"http",
AttributeKey.stringKey("http.response.status_code"),
"200"
"200",
AttributeKey.stringKey("error.type"),
""
) && dp.getValue == 2 =>
true
case dp
Expand All @@ -111,8 +119,12 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
"GET",
AttributeKey.stringKey("path"),
"/person",
AttributeKey.stringKey("url.scheme"),
"http",
AttributeKey.stringKey("http.response.status_code"),
"400"
"400",
AttributeKey.stringKey("error.type"),
""
) && dp.getValue == 2 =>
true
case _ => false
Expand Down Expand Up @@ -157,7 +169,11 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
AttributeKey.stringKey("http.response.status_code"),
"200",
AttributeKey.stringKey("phase"),
"body"
"body",
AttributeKey.stringKey("url.scheme"),
"http",
AttributeKey.stringKey("error.type"),
""
)
)
}
Expand Down Expand Up @@ -211,8 +227,12 @@ class OpenTelemetryMetricsTest extends AnyFlatSpec with Matchers {
"GET",
AttributeKey.stringKey("path"),
"/person",
AttributeKey.stringKey("url.scheme"),
"http",
AttributeKey.stringKey("http.response.status_code"),
"500"
"500",
AttributeKey.stringKey("error.type"),
""
)
point.getValue shouldBe 1
}
Expand Down

0 comments on commit 64987e6

Please sign in to comment.