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. C#, Java, Python, TypeScript, JavaScript, and Go all support delegate-backed Produce and Consume endpoints with service name, method name, method type, metadata, and deadline settings. Native gRPC execution is not available.
Tracking And Outcomes
Keep the tracking selector stable across the source and destination path. The delegate performs the real unary or streaming work and returns the produced or consumed outcome that LoadStrike uses for correlation and reporting.
Use Your Existing Client
Use the delegate to call your generated gRPC client and apply the project's authentication, service discovery, serialization, and status mapping. Remove a previous NativeClient block and provide the matching Produce or Consume delegate instead. Without it, initialization reports `Native gRPC execution is not available in this SDK version. Provide the endpoint Produce/Consume delegate instead.`
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 for delegate-backed gRPC Produce or Consume endpoints. Every SDK requires the matching mode delegate. Without one, initialization fails with `Native gRPC execution is not available in this SDK version. Provide the endpoint Produce/Consume delegate instead.`
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;
using LoadStrike.CrossPlatform;
// Native gRPC execution is not available in this SDK version.
// Provide the endpoint Produce/Consume delegate instead.
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"
)
// Native gRPC execution is not available in this SDK version.
// Provide the endpoint Produce/Consume delegate instead.
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;
// Native gRPC execution is not available in this SDK version.
// Provide the endpoint Produce/Consume delegate instead.
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
# Native gRPC execution is not available in this SDK version.
# Provide the endpoint Produce/Consume delegate instead.
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";
// Native gRPC execution is not available in this SDK version.
// Provide the endpoint Produce/Consume delegate instead.
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");
// Native gRPC execution is not available in this SDK version.
// Provide the endpoint Produce/Consume delegate instead.
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.
Provide Produce or Consume for Go, or ProduceAsync / ConsumeAsync in async-named SDKs, for the selected mode. The delegate calls your generated gRPC client and returns the LoadStrike payload result. Without it, every SDK uses the shared fail-closed diagnostic shown above.