Gather By Field
Configure destination-only grouping for correlation analytics and grouped latency views.
Usage
Set Destination.GatherByField to header:... or json:... to group report rows by business dimensions such as tenant, region, or event type.
Report Output
Grouped correlation summaries include Total/Success/Failure and P50/P80/P85/P90/P95/P99 latency columns with trend charts.
Feature Usage Samples
How to use snippets for Gather By Field.
Switch between C#, Java, Python, TypeScript, and JavaScript to see the native SDK shape for this sample.
Licensing note: every runnable sample requires a valid runner key via WithRunnerKey("...") or config key LoadStrike:RunnerKey.
GatherByField
var destination = new KafkaEndpointDefinition
{
Name = "orders-events",
Mode = TrafficEndpointMode.Consume,
TrackingField = TrackingFieldSelector.Parse("json:$.trackingId"),
GatherByField = TrackingFieldSelector.Parse("json:$.tenantId"),
BootstrapServers = "localhost:9092",
Topic = "orders.completed",
ConsumerGroupId = "orders-tests"
};
import com.loadstrike.runtime.KafkaEndpointDefinition;
import com.loadstrike.runtime.LoadStrikeCorrelation.TrackingFieldSelector;
import com.loadstrike.runtime.LoadStrikeTransports;
var destination = new KafkaEndpointDefinition();
destination.name = "orders-events";
destination.mode = LoadStrikeTransports.TrafficEndpointMode.Consume;
destination.trackingField = TrackingFieldSelector.parse("json:$.trackingId");
destination.gatherByField = TrackingFieldSelector.parse("json:$.tenantId").toString();
destination.bootstrapServers = "localhost:9092";
destination.topic = "orders.completed";
destination.consumerGroupId = "orders-tests";
destination = {
"Kind": "Kafka",
"Name": "orders-events",
"Mode": "Consume",
"TrackingField": "json:$.trackingId",
"GatherByField": "json:$.tenantId",
"BootstrapServers": "localhost:9092",
"Topic": "orders.completed",
"ConsumerGroupId": "orders-tests",
}
import { TrackingFieldSelector } from "@loadstrike/loadstrike-sdk";
const destination = {
Kind: "Kafka",
Name: "orders-events",
Mode: "Consume",
TrackingField: new TrackingFieldSelector("Json", "$.trackingId"),
GatherByField: new TrackingFieldSelector("Json", "$.tenantId"),
BootstrapServers: "localhost:9092",
Topic: "orders.completed",
ConsumerGroupId: "orders-tests"
};
const { TrackingFieldSelector } = require("@loadstrike/loadstrike-sdk");
const destination = {
Kind: "Kafka",
Name: "orders-events",
Mode: "Consume",
TrackingField: new TrackingFieldSelector("Json", "$.trackingId"),
GatherByField: new TrackingFieldSelector("Json", "$.tenantId"),
BootstrapServers: "localhost:9092",
Topic: "orders.completed",
ConsumerGroupId: "orders-tests"
};
Effect
GatherByField is applied on the destination endpoint so grouping reflects the matched downstream message.
Group rows by tenant, region, event type, or any other header/body field that identifies a business slice.
Enables grouped correlation tables and one percentile trend chart per gathered value in the HTML report.