Skip to content

Commit

Permalink
fix(exporter): address comments.
Browse files Browse the repository at this point in the history
Fix indenting in the configuration templates.
Remove leftover config from ExporterCfg.
Invert order of events to filter in order to avoid decoding broken events.

(cherry picked from commit 663685c)
  • Loading branch information
rodrigo-lourenco-lopes committed Mar 5, 2024
1 parent db2d8fa commit c560d1f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private void initContainers() throws Exception {
container.configureExporter();
}

eventFilter = createEventFilter(containers).and(positionsToSkipFilter);
eventFilter = positionsToSkipFilter.and(createEventFilter(containers));
LOG.debug("Set event filter for exporters: {}", eventFilter);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import java.util.Map;
import java.util.Objects;
import java.util.Set;

/**
* Exporter component configuration. To be expanded eventually to allow enabling/disabling
Expand All @@ -26,8 +25,6 @@ public final class ExporterCfg implements ConfigurationEntry {
/** fully qualified class name pointing to the class implementing the exporter interface */
private String className;

private Set<Long> skipRecords;

/** map of arguments to use when instantiating the exporter */
private Map<String, Object> args;

Expand All @@ -50,14 +47,6 @@ public void setJarPath(final String jarPath) {
this.jarPath = jarPath;
}

public Set<Long> getSkipRecords() {
return skipRecords != null ? skipRecords : Set.of();
}

public void setSkipRecords(final Set<Long> skipRecords) {
this.skipRecords = skipRecords;
}

public String getClassName() {
return className;
}
Expand Down
17 changes: 7 additions & 10 deletions dist/src/main/config/broker.standalone.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -685,16 +685,13 @@
# exporting:
# This section contains definitions common to all exporters.
#
# Skip records Exporter ------------
#
# Enable the exporters to skip record position
#
# These setting can also be overridden using the environment variables "ZEEBE_BROKER_EXPORTING_SKIPRECORDS"
# Allows to skip certain records by their position. This is useful for debugging or skipping a record that is
# preventing processing or exporting to continue.
# Record positions defined to skip in this definition will be skipped in all exporters.
# The value is a comma-separated list of records ids to skip. Whitespace is ignored.
# skipRecords:
# Enable the exporters to skip record position.
# These setting can also be overridden using the environment variables "ZEEBE_BROKER_EXPORTING_SKIPRECORDS"
# Allows to skip certain records by their position. This is useful for debugging or skipping a record that is
# preventing processing or exporting to continue.
# Record positions defined to skip in this definition will be skipped in all exporters.
# The value is a comma-separated list of records ids to skip. Whitespace is ignored.
# skipRecords:

# exporters:
# Configure exporters below
Expand Down
17 changes: 7 additions & 10 deletions dist/src/main/config/broker.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -576,16 +576,13 @@
# exporting:
# This section contains definitions common to all exporters.
#
# Skip records Exporter ------------
#
# Enable the exporters to skip record position
#
# These setting can also be overridden using the environment variables "ZEEBE_BROKER_EXPORTING_SKIPRECORDS"
# Allows to skip certain records by their position. This is useful for debugging or skipping a record that is
# preventing processing or exporting to continue.
# Record positions defined to skip in this definition will be skipped in all exporters.
# The value is a comma-separated list of records ids to skip. Whitespace is ignored.
# skipRecords:
# Enable the exporters to skip record position.
# These setting can also be overridden using the environment variables "ZEEBE_BROKER_EXPORTING_SKIPRECORDS"
# Allows to skip certain records by their position. This is useful for debugging or skipping a record that is
# preventing processing or exporting to continue.
# Record positions defined to skip in this definition will be skipped in all exporters.
# The value is a comma-separated list of records ids to skip. Whitespace is ignored.
# skipRecords:

# exporters:
# Configure exporters below
Expand Down

0 comments on commit c560d1f

Please sign in to comment.