gRPC Endpoint
Use the gRPC endpoint when a workflow is started or completed by a gRPC call and the project wants LoadStrike correlation around that call. Available on Business and Enterprise plans.
Matching docs
Search across docs titles, summaries, groups, and section headings.
Use Up and Down Arrow to move through results, then press Enter to open the active page.
No indexed docs matched that search. Try a broader term or open the docs hub.
What this page helps you do
What this page helps you do
Use the gRPC endpoint when a workflow is started or completed by a gRPC call and the project wants LoadStrike correlation around that call. Available on Business and Enterprise plans.
Who this is for
Teams defining the transport-specific source or destination side of a correlated transaction.
Prerequisites
- A stable tracking field shared between the producer side and the consumer or completion side
By the end
A transport definition that matches the transaction you need to measure.
Use this page when
Use this page when gRPC Endpoint is the source or destination side of the transaction and you need the documented endpoint fields before wiring the scenario.
Visual guide
Guide
Delegate Backed
The gRPC endpoint is delegate backed. Your test code owns the gRPC client call and returns the produced or consumed tracking payload to LoadStrike so the run can still correlate source and destination activity.
Service And Method
Set Target, ServiceName, MethodName, and MethodType so reports, logs, and team reviews clearly identify the remote procedure being exercised. Deadline controls the maximum time allowed for the callback.
Tracking Extraction
TrackingField and optional GatherByField use the same header or JSON selector contract as the other endpoints. Preserve the same business identifier across the produced and consumed payloads.
Plan Gate
The gRPC endpoint is available on Business and above.
Endpoint definition samples
Use these samples to see how gRPC Endpoint is represented as a source or destination endpoint before you attach it to a correlated scenario.
If you run these examples locally, add a valid runner key before execution starts. Set it with WithRunnerKey("...") or the config key LoadStrike:RunnerKey.
gRPC Endpoint
using LoadStrike;
using LoadStrike.CrossPlatform.Grpc;
using LoadStrike.CrossPlatform.Delegates;
var endpoint = new GrpcEndpointDefinition
{
Name = "orders-grpc",
Mode = TrafficEndpointMode.Produce,
TrackingField = TrackingFieldSelector.Parse("json:$.trackingId"),
Target = "https://grpc.example.com",
ServiceName = "orders.OrderService",
MethodName = "CreateOrder",
MethodType = "Unary",
ProduceAsync = (request, _) => Task.FromResult(new ProducedMessageResult { IsSuccess = true })
};
_ = endpoint;
package main
import (
"context"
loadstrike "loadstrike.com/sdk/go"
)
var grpcEndpoint = &loadstrike.EndpointSpec{
Kind: "Grpc",
Name: "orders-grpc",
Mode: "Produce",
TrackingField: "json:$.trackingId",
Grpc: &loadstrike.GrpcEndpointOptions{
Target: "https://grpc.example.com",
ServiceName: "orders.OrderService",
MethodName: "CreateOrder",
MethodType: "Unary",
Produce: func(_ context.Context, payload loadstrike.TrackingPayload) (loadstrike.EndpointProduceResult, error) {
return loadstrike.EndpointProduceResult{IsSuccess: true, Payload: payload}, nil
},
},
}
import com.loadstrike.runtime.GrpcEndpointDefinition;
import com.loadstrike.runtime.LoadStrikeCorrelation.TrackingFieldSelector;
import com.loadstrike.runtime.LoadStrikeTransports;
import com.loadstrike.runtime.LoadStrikeTransports.ProducedMessageResult;
var endpoint = new GrpcEndpointDefinition();
endpoint.name = "orders-grpc";
endpoint.mode = LoadStrikeTransports.TrafficEndpointMode.Produce;
endpoint.trackingField = TrackingFieldSelector.parse("json:$.trackingId");
endpoint.target = "https://grpc.example.com";
endpoint.serviceName = "orders.OrderService";
endpoint.methodName = "CreateOrder";
endpoint.methodType = "Unary";
endpoint.produceAsync = request -> {
var result = new ProducedMessageResult();
result.isSuccess = true;
return result;
};
from loadstrike_sdk import GrpcEndpointDefinition
endpoint = GrpcEndpointDefinition(
name="orders-grpc",
mode="Produce",
tracking_field="json:$.trackingId",
target="https://grpc.example.com",
service_name="orders.OrderService",
method_name="CreateOrder",
method_type="Unary",
produce_async=lambda request: {"IsSuccess": True},
)
import { GrpcEndpointDefinition } from "@loadstrike/loadstrike-sdk";
const endpoint = new GrpcEndpointDefinition({
Name: "orders-grpc",
Mode: "Produce",
TrackingField: "json:$.trackingId",
Target: "https://grpc.example.com",
ServiceName: "orders.OrderService",
MethodName: "CreateOrder",
MethodType: "Unary",
ProduceAsync: async () => ({ isSuccess: true })
});
void endpoint;
const { GrpcEndpointDefinition } = require("@loadstrike/loadstrike-sdk");
const endpoint = new GrpcEndpointDefinition({
Name: "orders-grpc",
Mode: "Produce",
TrackingField: "json:$.trackingId",
Target: "https://grpc.example.com",
ServiceName: "orders.OrderService",
MethodName: "CreateOrder",
MethodType: "Unary",
ProduceAsync: async () => ({ isSuccess: true })
});
void endpoint;
gRPC endpoint fields and parameters
Required endpoint identifier. It appears in correlation tables, sink exports, and troubleshooting messages, so choose a stable descriptive name.
Choose Produce when LoadStrike should create traffic, or Consume when it should listen for downstream traffic. Run mode validation checks that the selected mode matches the source or destination role.
Selector that extracts the correlation id from a header or JSON body. It is normally required, but can be omitted when UseLoadStrikeTraceIdHeader is true so LoadStrike uses header:loadstrike-trace-id for generated source traffic. Selector prefixes such as header: and json: are parsed case-insensitively, but the header name or JSON path segments after the prefix must match exact casing. The extracted value is matched case-sensitively by default unless TrackingFieldValueCaseSensitive is turned off on the tracking configuration.
Optional destination-only selector used for grouped correlation reports. It follows the same selector-casing rules as TrackingField. Group values are grouped case-sensitively by default unless GatherByFieldValueCaseSensitive is turned off on the tracking configuration.
Defaults to true. When the source payload does not already contain the tracked id, LoadStrike can inject one so the generated traffic still produces a correlation key.
Defaults to false. When true and TrackingField is omitted, produced source messages receive a loadstrike-trace-id header with a GUID value. Consume-mode source endpoints and CorrelateExistingTraffic runs do not inject this header; they only observe it if the existing traffic already contains it.
Controls how often a consumer-style endpoint polls for new messages. The value must stay greater than zero whenever you set it explicitly.
Optional headers that are written with produced traffic and also influence tracking extraction when the selector targets headers. Header names are preserved exactly as you set them, and header selectors later match using that same exact casing.
Optional object or body value sent by producer-style endpoints. This is the payload your scenario is actually placing on the wire.
Optional type hint used when JSON selectors need typed parsing. Leave it unset when dynamic JSON parsing is enough.
Optional serializer settings for System.Text.Json or Newtonsoft.Json. Use them only when the payload shape or naming strategy requires custom parsing behavior.
Optional explicit content type for custom payload handling. This is most helpful for delegate-style transports or non-default HTTP body shapes.
Required absolute gRPC target used by your client callback.
Required service name that identifies the gRPC service under test.
Required method name that identifies the gRPC call under test.
Required method shape label, such as Unary or a streaming method shape used by your callback.
Maximum callback deadline. It must be greater than zero when configured.
Optional gRPC metadata values that your callback can use when issuing the call.
Required callback for the selected endpoint mode. Produce starts the workflow; Consume observes the downstream gRPC outcome.
Optional free-form dictionary for endpoint connection hints and diagnostics.