Skip to content

Release v22.42.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 13:36
f1c2c77

Commands and queries now show up in traces and metrics in the terms of your application: the span for each command or query carries its type or name, the outcome and the reason for it, and duration and outcome metrics are recorded per type. Span names stay the stable operation names, so dashboards built on them keep working.

Added

  • WellKnownDiagnostics.ActivitySourceName and WellKnownDiagnostics.MeterName for registering Arc with OpenTelemetry without repeating "Cratis.Arc" (part of #2915)
  • WellKnownTelemetryNames and WellKnownOperationOutcomes with every span, attribute, event, metric and outcome name Arc records, for dashboards, alerts and tests (part of #2915)
  • Child spans for authorization (cratis.arc.command.authorize), validators (cratis.arc.validator.invoke), Provide() (cratis.arc.command.provide) and Handle() (cratis.arc.command.handle), each carrying the command or validator type. A validator gets one span per validation rather than one per item it validates, and one validation adds at most 16 (part of #2915)
  • Command and query spans carry cratis.arc.command.type or cratis.arc.query.name, cratis.arc.query.transport (snapshot or observable), cratis.correlation_id, cratis.tenant once the pipeline has established it, and an outcome of success, validation, authorization, append_rejected, cancelled or error (part of #2915)
  • With the Chronicle integration, command spans carry cratis.arc.command.key.type, the type the command declares its event source id as and never the id itself (part of #2915)
  • Rejected commands and queries add cratis.arc.validation.failed events (member, severity and reason, never the message) or a cratis.arc.authorization.denied event, and an exception adds an exception event with the exception type only. Only an error sets a span's status to Error: validation, authorization and append rejections, an IValidationFailure thrown from Handle(), Provide() or a validator, and a cancelled operation leave it unset (part of #2915)
  • Metrics on the Cratis.Arc meter: cratis.arc.command.duration and cratis.arc.query.duration histograms and a cratis.arc.command.outcomes counter, limited to a fixed 1,000 command types or query names each, with the rest recorded as _other. HTTP requests turned away while Arc prepares authorization are traced and measured too. See Observability (part of #2915)

Changed

  • The query_name attribute on cratis.arc.query.perform spans is _other for a query name that matches no query, instead of the name the caller sent (part of #2915)