CrateStack Telemetry
Status
Implemented current-state documentation for the generated tracing slice. CrateStack currently emits structuredtracing spans and events from generated server code, but it does not install or
configure a subscriber for the host application.
Current Coverage
Generated telemetry currently covers:- generated procedure authorization and invocation wrappers
- generated Axum procedure routes
- generated Axum model list routes, including
@@pagedlist responses
- generated model detail routes
- generated model create, update, or delete routes
- metrics export, OpenTelemetry export, or a dedicated telemetry abstraction layer
Host Setup
CrateStack re-exportstracing as cratestack::tracing, but subscriber setup stays host-owned.
Minimal example:
cratestack=debug if you want to see procedure authorization events in addition to the default route and invocation
completion events.
Generated Procedure Telemetry
Generated procedure wrappers emit:debugon successfulauthorize(...)warnon failedauthorize(...)debugon successfulauthorize_with_db(...)info/warnoninvoke(...)completion or failureinfo/warnoninvoke_with_db(...)completion or failure
- an
info_span!namedcratestack_procedure_route warnevents for transport preflight, auth, or decode failuresinfo/warnon route completion or failure
cratestack_procedure_invokecratestack_procedure_invoke_with_db
Generated Model List Telemetry
Generated model list handlers emit:- an
info_span!namedcratestack_model_list_route warnevents for response negotiation failureswarnevents for auth failureswarnevents for query parsing or selection validation failureswarnevents whenlimitoroffsetare negativeinfo/warnon list completion or failure
@@paged models, the completion event also records the paged result shape and total-count metadata.
Event Fields
Current generated fields include:
All current generated events use the
cratestack tracing target.
Current Boundaries
This telemetry slice is intentionally narrow:- it is generated directly with
tracingmacros instead of a framework-specific telemetry trait - it focuses on route, authorization, and list/procedure execution visibility rather than metrics or distributed tracing
- it documents the current implemented behavior only, not a future observability roadmap