use of com.newrelic.agent.instrumentation.custom.ExtensionClassAndMethodMatcher in project newrelic-java-agent by newrelic.
the class PointCutConfigTest method classMethodMetricNameFormat.
@Test
public void classMethodMetricNameFormat() throws Exception {
PointCutConfig config = new PointCutConfig(new ByteArrayInputStream("pre:\n class_matcher: !exact_class_matcher 'java/lang/String'\n method_matcher: !exact_method_matcher [ 'concat', '(Ljava/lang/String;)Ljava/lang/String;' ]\n metric_name_format: !class_method_metric_name_format".getBytes(StandardCharsets.UTF_8)));
List<ExtensionClassAndMethodMatcher> pcs = config.getPointCuts();
Assert.assertEquals(1, pcs.size());
Assert.assertNotNull(config.getPointCuts().get(0));
}
Aggregations