Repository navigation
One mini-demo run as a single trace, across gRPC, the JSON Ledger API and PQS #100
monsieurleberre
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is one run of the mini-demo (v0.7.0, LocalNet 0.9.1-1) in Grafana's Tempo view. It is a single trace of 40 spans, all under one parent
mini-demo run. It contains the gRPC submits (SubmissionClient.*), the JSON Ledger API calls (POST/GET) and the PQS reads (PqsQuerywith their Npgsqlpostgresqlchildren).What it shows is the client side only. The spans come from the SDK, and the demo's own parent activity is what ties them together. There are no Canton or PQS server-side spans in it. The two red spans are the failure lane's deliberate duplicate-command rejections.
Reproducing it. The demo doesn't export OTLP out of the box, so I used a throwaway copy with a small patch: two package references (
Canton.Ledger.OpenTelemetry,OpenTelemetry.Exporter.OpenTelemetryProtocol) and this inProgram.cs:Then, from the LocalNet clone:
Grafana is at http://localhost:3030. LocalNet doesn't publish the collector's OTLP port (14001) to the host, so I added that port mapping with a compose override.
In your own app,
AddCantonLedgerInstrumentation()registers all five SDK ActivitySources (Canton.Ledger.Grpc.Client.LedgerClient,...Grpc.Client.AdminClient,...Rest.Client.RestLedgerClient,...Rest.Client.RestAdminClient,Canton.Ledger.Pqs.Client.PqsClient) plusNpgsql.AddSource("Canton.Ledger.*")also works. Docs: Observability.Questions are welcome below.
All reactions