use of com.microsoft.applicationinsights.agent.internal.configuration.Configuration.ProcessorAction in project ApplicationInsights-Java by microsoft.
the class ExporterWithAttributeProcessorTest method invalidRegexTest.
@Test
void invalidRegexTest() {
MockExporter mockExporter = new MockExporter();
ProcessorConfig config = new ProcessorConfig();
config.type = ProcessorType.ATTRIBUTE;
config.id = "invalidRegex";
config.include = new ProcessorIncludeExclude();
config.include.matchType = MatchType.REGEXP;
config.include.spanNames = Collections.singletonList("***");
ProcessorAction action = new ProcessorAction("testKey", ProcessorActionType.UPDATE, "redacted", null, null, null);
List<ProcessorAction> actions = new ArrayList<>();
actions.add(action);
config.actions = actions;
assertThatThrownBy(() -> new ExporterWithAttributeProcessor(config, mockExporter)).isInstanceOf(FriendlyException.class);
}
Aggregations