gRPC Protocol Guide
Use this guide when gRPC services are part of the workflow and you need unary or streaming calls to participate in the same LoadStrike tracking and reporting model.
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 this guide when gRPC services are part of the workflow and you need unary or streaming calls to participate in the same LoadStrike tracking and reporting model.
Who this is for
Teams deciding how a protocol or browser runtime should fit inside one transaction-aware scenario.
Prerequisites
- A transport or browser flow that already matters to the workload
By the end
A clearer protocol-specific path that still fits the same scenario and reporting model.
Use this page when
Use this page when gRPC Protocol Guide belongs inside the transaction story and you need the supported path into the same scenario model.
Visual guide
Guide
What This Guide Covers
Use this guide when gRPC is the source, destination, or one important hop in the transaction. LoadStrike supports gRPC endpoint configuration with service name, method name, method type, metadata, deadlines, TLS settings, and native-client options for unary, server streaming, client streaming, and bidirectional streaming shapes where supported by the SDK runtime.
Tracking And Status Mapping
Keep the tracking selector stable across the source and destination path. gRPC status codes are mapped into LoadStrike success or failure semantics so reports can show protocol status, latency, message counts, stream duration, and bytes alongside normal scenario results.
When To Use Native Options
Use native gRPC options when the SDK can call the service directly from proto or descriptor metadata. Use delegate-backed endpoints when your team already has a generated client, custom authentication, service discovery, or test harness that should own the actual call. Both shapes keep the same scenario, report, portal, and sink output model.
Plan Gate
gRPC endpoint support is available on Pro and above. Runs still validate any extra features used by the scenario, such as portal reporting, sinks, thresholds, or distributed cluster settings.
Protocol setup samples
Use these samples to compare native and delegate-backed gRPC endpoint setup across the supported SDKs.
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 Protocol Setup
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;
Goal
Name the gRPC service and method so the endpoint represents the exact protocol call being measured.
Choose unary, server streaming, client streaming, or bidirectional streaming based on the workflow shape.
Use stable metadata or message fields so gRPC work can be correlated with the rest of the transaction.