Skip to content

Commit

Permalink
Merge branch 'hotfix' into 'master'
Browse files Browse the repository at this point in the history
Hotfix: Fix bug of creating EventFilter based on empty properties

See merge request hercules/hercules!351
  • Loading branch information
gnkoshelev committed Aug 9, 2021
2 parents 069331e + ceb3246 commit 41f79ac
Show file tree
Hide file tree
Showing 47 changed files with 77 additions and 69 deletions.
2 changes: 1 addition & 1 deletion hercules-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-cassandra-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-cassandra-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-clickhouse-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-clickhouse-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-configuration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-curator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-elastic-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-elastic-sink/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sink.consumer.max.partition.fetch.bytes=52428800
sink.consumer.max.poll.interval.ms=370000
sink.consumer.metric.reporters=ru.kontur.vostok.hercules.kafka.util.metrics.GraphiteReporter

sink.filter.list=ru.kontur.vostok.hercules.elastic.sink.LogEventFilter
sink.filter.0.class=ru.kontur.vostok.hercules.elastic.sink.LogEventFilter

sink.sender.pingPeriodMs=60000

Expand Down
2 changes: 1 addition & 1 deletion hercules-elastic-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
import ru.kontur.vostok.hercules.protocol.Event;
import ru.kontur.vostok.hercules.protocol.EventBuilder;
import ru.kontur.vostok.hercules.protocol.Variant;
import ru.kontur.vostok.hercules.sink.filter.EventFilter;
import ru.kontur.vostok.hercules.util.time.TimeUtil;

import java.util.List;
import java.util.Properties;

/**
Expand Down Expand Up @@ -125,4 +127,14 @@ private EventBuilder getEventBuilder() {
TimeUtil.millisToTicks(System.currentTimeMillis()),
"00000000-0000-0000-0000-000000000000");
}

@Test
public void shouldInitializeListOfFiltersFromProperties() {
Properties properties = new Properties();
properties.setProperty("0.class", "ru.kontur.vostok.hercules.elastic.sink.LogEventFilter");

List<EventFilter> filters = EventFilter.from(properties);
Assert.assertEquals(1, filters.size());
Assert.assertEquals(LogEventFilter.class, filters.get(0).getClass());
}
}
2 changes: 1 addition & 1 deletion hercules-gate-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-gate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
7 changes: 4 additions & 3 deletions hercules-graphite-sink/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ sink.sender.graphite.connector.local.connection.limit.per.endpoint=3
sink.sender.graphite.connector.local.socket.timeout.ms=2000
sink.sender.graphite.connector.remote.endpoints=

sink.filter.list=ru.kontur.vostok.hercules.graphite.sink.filter.MetricEventFilter,ru.kontur.vostok.hercules.graphite.sink.filter.MetricAclEventFilter
sink.filter.1.acl.path=file://metrics.acl
sink.filter.1.acl.defaultStatement=PERMIT
sink.filter.0.class=ru.kontur.vostok.hercules.graphite.sink.filter.MetricEventFilter
sink.filter.1.class=ru.kontur.vostok.hercules.graphite.sink.filter.MetricAclEventFilter
sink.filter.1.props.acl.path=file://metrics.acl
sink.filter.1.props.acl.defaultStatement=PERMIT

metrics.graphite.server.addr=localhost
metrics.graphite.server.port=2003
Expand Down
2 changes: 1 addition & 1 deletion hercules-graphite-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-health/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-init/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-kafka-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-management-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-meta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-partitioner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-sd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
10 changes: 6 additions & 4 deletions hercules-sentry-sink/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ sink.sender.readTimeoutMs=25000
sink.consumer.bootstrap.servers=localhost:9092,localhost:9093,localhost:9094
sink.consumer.metric.reporters=ru.kontur.vostok.hercules.kafka.util.metrics.GraphiteReporter

sink.filter.list=ru.kontur.vostok.hercules.sentry.sink.filter.LevelEventFilter,ru.kontur.vostok.hercules.sentry.sink.filter.SentryWhitelistEventFilter,ru.kontur.vostok.hercules.sentry.sink.filter.SentryBlacklistEventFilter
sink.filter.0.level=ERROR
sink.filter.1.patterns=*:*:*
sink.filter.2.patterns=test_project:testing:test_subproject
sink.filter.0.class=ru.kontur.vostok.hercules.sentry.sink.filter.LevelEventFilter
sink.filter.1.class=ru.kontur.vostok.hercules.sentry.sink.filter.SentryWhitelistEventFilter
sink.filter.2.class=ru.kontur.vostok.hercules.sentry.sink.filter.SentryBlacklistEventFilter
sink.filter.0.props.level=ERROR
sink.filter.1.props.patterns=*:*:*
sink.filter.2.props.patterns=test_project:testing:test_subproject

sink.pattern=logs_*

Expand Down
2 changes: 1 addition & 1 deletion hercules-sentry-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-stream-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-stream-manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-stream-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-tags/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-throttling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-timeline-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-timeline-manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-timeline-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-tracing-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-tracing-sink-clickhouse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hercules-tracing-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hercules</artifactId>
<groupId>ru.kontur.vostok.hercules</groupId>
<version>0.48.0-SNAPSHOT</version>
<version>0.48.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading

0 comments on commit 41f79ac

Please sign in to comment.