Skip to content

Commit

Permalink
create modules for counted and timed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan-tree-zhou committed May 30, 2024
1 parent 4271e31 commit 5ffc6ce
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void testExampleWithUnitAndDefaultValue() {
void testExampleWithDescription() {
new TimedExample().exampleWithDescription();
testing.waitAndAssertMetrics(
"io.opentelemetry.opentelemetry-instrumentation-annotations-1.16",
TIMED_INSTRUMENTATION_NAME,
metric ->
metric.hasName("example.with.description.duration").hasDescription(METRIC_DESCRIPTION));
}
Expand All @@ -68,15 +68,15 @@ void testExampleWithDescription() {
void testExampleWithUnit() {
new TimedExample().exampleWithUnit();
testing.waitAndAssertMetrics(
"io.opentelemetry.opentelemetry-instrumentation-annotations-1.16",
TIMED_INSTRUMENTATION_NAME,
metric -> metric.hasName("example.with.unit.duration").hasUnit(METRIC_UNIT));
}

@Test
void testExampleWithAdditionalAttributes1() {
new TimedExample().exampleWithAdditionalAttributes1();
testing.waitAndAssertMetrics(
"io.opentelemetry.opentelemetry-instrumentation-annotations-1.16",
TIMED_INSTRUMENTATION_NAME,
metric ->
metric
.hasName(TIMED_DEFAULT_NAME)
Expand All @@ -99,7 +99,7 @@ void testExampleWithAdditionalAttributes1() {
void testExampleWithAdditionalAttributes2() {
new TimedExample().exampleWithAdditionalAttributes2();
testing.waitAndAssertMetrics(
"io.opentelemetry.opentelemetry-instrumentation-annotations-1.16",
TIMED_INSTRUMENTATION_NAME,
metric ->
metric
.hasName(TIMED_DEFAULT_NAME)
Expand Down

0 comments on commit 5ffc6ce

Please sign in to comment.