Skip to content

Commit

Permalink
Add: trace peerforwarder config (opensearch-project#4992)
Browse files Browse the repository at this point in the history
* ADD: trace peerforwarder config

Signed-off-by: George Chen <[email protected]>

---------

Signed-off-by: George Chen <[email protected]>
  • Loading branch information
chenqi0805 authored Oct 1, 2024
1 parent 54ede84 commit ccd0e24
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import static org.opensearch.dataprepper.logging.DataPrepperMarkers.NOISY;
import org.opensearch.dataprepper.model.annotations.DataPrepperPlugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ plugins {

dependencies {
implementation project(':data-prepper-api')
implementation 'com.fasterxml.jackson.core:jackson-core'
implementation 'com.fasterxml.jackson.core:jackson-databind'
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
import java.util.Collection;
import java.util.Collections;

@DataPrepperPlugin(name = "trace_peer_forwarder", pluginType = Processor.class)
@DataPrepperPlugin(name = "trace_peer_forwarder", pluginType = Processor.class,
pluginConfigurationType = TracePeerForwarderProcessorConfig.class)
public class TracePeerForwarderProcessor extends AbstractProcessor<Record<Event>, Record<Event>> implements RequiresPeerForwarding {

@DataPrepperPluginConstructor
public TracePeerForwarderProcessor(PluginMetrics pluginMetrics) {
public TracePeerForwarderProcessor(final PluginMetrics pluginMetrics) {
super(pluginMetrics);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.opensearch.dataprepper.plugins.processor;

import com.fasterxml.jackson.annotation.JsonClassDescription;

@JsonClassDescription("The <code>trace_peer_forwarder</code> processor is used with peer forwarder to reduce by half " +
"the number of events forwarded in a <a href=\"https://opensearch.org/docs/latest/data-prepper/common-use-cases/trace-analytics/\">Trace Analytics</a> pipeline. ")
public class TracePeerForwarderProcessorConfig {
}

0 comments on commit ccd0e24

Please sign in to comment.