use of com.newrelic.agent.introspec.TracedMetricData in project newrelic-java-agent by newrelic.
the class SqsClientTest method checkScopedMetricCount.
public static void checkScopedMetricCount(String transactionName, String metricName, int expected) {
TracedMetricData data = InstrumentationTestRunner.getIntrospector().getMetricsForTransaction(transactionName).get(metricName);
Assert.assertEquals(expected, data.getCallCount());
}
use of com.newrelic.agent.introspec.TracedMetricData in project newrelic-java-agent by newrelic.
the class JaxRsTests method testTransactionNamePost.
@Test
public void testTransactionNamePost() {
assertEquals("Posted it!", App.callClassResourcePostInTransaction());
Introspector introspector = InstrumentationTestRunner.getIntrospector();
String expectedTransactionName = "OtherTransaction/RestWebService/class (POST)";
Map<String, TracedMetricData> metricsForTransaction = introspector.getMetricsForTransaction(expectedTransactionName);
assertEquals(1, metricsForTransaction.get("Java/com.nr.instrumentation.javax.ws.rs.api.ClassResource/postIt").getCallCount());
}
use of com.newrelic.agent.introspec.TracedMetricData in project newrelic-java-agent by newrelic.
the class JaxRsTests method testTransactionNameInterfaceWithImpl.
@Test
public void testTransactionNameInterfaceWithImpl() {
assertEquals("Returning from getPeople", App.callInterfaceWithImplResourceInTransaction());
Introspector introspector = InstrumentationTestRunner.getIntrospector();
String expectedTransactionName = "OtherTransaction/RestWebService/v1/people/getPeople (GET)";
Map<String, TracedMetricData> metricsForTransaction = introspector.getMetricsForTransaction(expectedTransactionName);
assertEquals(1, metricsForTransaction.get("Java/com.nr.instrumentation.javax.ws.rs.api.PeopleResource/getPeople").getCallCount());
}
use of com.newrelic.agent.introspec.TracedMetricData in project newrelic-java-agent by newrelic.
the class JaxRsTests method testTransactionNamePut.
@Test
public void testTransactionNamePut() {
assertEquals("Put it!", App.callClassResourcePutInTransaction());
Introspector introspector = InstrumentationTestRunner.getIntrospector();
String expectedTransactionName = "OtherTransaction/RestWebService/class (PUT)";
Map<String, TracedMetricData> metricsForTransaction = introspector.getMetricsForTransaction(expectedTransactionName);
assertEquals(1, metricsForTransaction.get("Java/com.nr.instrumentation.javax.ws.rs.api.ClassResource/putIt").getCallCount());
}
use of com.newrelic.agent.introspec.TracedMetricData in project newrelic-java-agent by newrelic.
the class JaxRsTests method testTransactionNameClassException.
@Test
public void testTransactionNameClassException() {
assertEquals("Got it!", App.callExceptionClassResourceInTransaction());
Introspector introspector = InstrumentationTestRunner.getIntrospector();
String expectedTransactionName = "OtherTransaction/RestWebService/class (GET)";
Map<String, TracedMetricData> metricsForTransaction = introspector.getMetricsForTransaction(expectedTransactionName);
assertEquals(1, metricsForTransaction.get("Java/com.nr.instrumentation.javax.ws.rs.api.ClassResource/exceptionTest").getCallCount());
}
Aggregations