Architecture
This page documents Orleans.Lattice.Api.Telemetry.Grpc 10.5.0, in the documentation for Orleans.Lattice 10.5.0 (release line 10.5), built 2026-12-05. It is also published as markdown, with every table and list, at architecture.md, and llms.txt lists every page.The binding projects the in-process ILatticeTelemetry facade onto a code-first gRPC service for remote heads such as the Explorer. It relays: it adds wire marshalling, a coarse admission check, credential and active-tenant bridging, the auth-scheme advertisement and status mapping, but it derives no tenant, adds no query text, and returns the facade's pinned scope unchanged. It depends only on the shared contract, so it resolves on a host that registers nothing but an ILatticeTelemetry implementation.
Wire contract
The service is bound from C# definitions under the gRPC service name orleans.lattice.api.telemetry and has three unary RPCs: GetCatalog, Query and GetAuthScheme. Messages are Orleans-serialized records; the server and LatticeTelemetryApiGrpcClient build their method definitions from the same serializers. Query carries the contract's own request and response unchanged, so the wire has no field through which query text or a second tenant assertion could arrive.
Request path
sequenceDiagram
participant C as Client
participant I as Authorization interceptor
participant S as Telemetry service
participant F as ILatticeTelemetry facade
C->>I: RPC with metadata
alt GetAuthScheme
I->>S: passed through without a check
S-->>C: advertisement from ILatticeTelemetryApiAuthSchemeSource
else GetCatalog or Query
I->>I: ILatticeTelemetryApiAuthorizer (when RequireAuthorization)
I->>S: admitted call
S->>S: stamp active tenant and credential scopes
S->>F: GetCatalogAsync or QueryAsync
F-->>S: catalogue, response with pinned Scope, or exception
S-->>C: result, or RpcException with mapped status
end
- Admission. The interceptor acts only on methods under the
orleans.lattice.api.telemetryservice and exemptsGetAuthScheme. WhenRequireAuthorizationistrueit builds aLatticeTelemetryApiAuthorizationContext- theServerCallContext, theLatticeTelemetryApiOperation(GetCatalog,Query, orUnknownfor an unrecognised method), and aTargetIdthat is the requested query id forQueryandnullforGetCatalog- and asksILatticeTelemetryApiAuthorizer. A refusal ends the call withPermissionDenied. - Identity and tenant. The service lifts any asserted tenant from the
ActiveTenantHeaderNameheader and the caller credential throughILatticeTelemetryApiCredentialBridge, stamping each onto its ambient context for the call. Neither is interpreted here: the facade resolves the caller's subject and derives the effective tenant. - Dispatch.
GetCatalogcallsGetCatalogAsync;Queryforwards the request, includingRequestedVisibilityandRequestedTenantId, verbatim toQueryAsyncand returns the response untouched, soScope.WasDowngradedandScope.IsCrossTenantreach the client. - Status mapping. Facade exceptions become explicit gRPC statuses: an unknown or unoffered query is
NotFound, a refused windowOutOfRange, a backend faultUnavailable, an authorization or tenant refusalPermissionDenied. A backend fault is logged server-side and the caller receives a fixed detail naming only its query id, because the fault's own message can carry the backend's host and port. Any unmapped exception is returned asInternalwith the original message suppressed. See the status mapping.
Two independent gates
The interceptor's authorizer decides whether a caller may reach the telemetry service at all. The facade then applies the cluster-wide Telemetry capability check and derives the tenant scope from the stamped identity, regardless of what the interceptor admitted. Admitting a call can therefore never widen the scope of its answer. See the facade architecture.
Source map
- Registration
- Service and status mapping
- Method definitions
- Authorization interceptor
- Header credential bridge
- Auth-scheme source
- Client