Chronicle OpenTelemetry configuration
Chronicle exports metrics, traces, and logs through the OpenTelemetry Protocol (OTLP) so you can investigate event processing and observer failures in your telemetry backend. Instrumentation is always enabled; use standard OpenTelemetry environment variables to configure export.
Signals
Section titled “Signals”Chronicle exports the following signals:
| Signal | Description |
|---|---|
| Metrics | Application and infrastructure metrics (event sequences, observers, .NET runtime) |
| Traces | Distributed traces for Chronicle operations (gRPC, HTTP, Orleans) |
| Logs | Structured application logs |
Configuration
Section titled “Configuration”Telemetry is configured using standard OpenTelemetry environment variables:
| Variable | Default | Description |
|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT |
exporter default | OTLP receiver endpoint (e.g. http://localhost:4317) |
OTEL_EXPORTER_OTLP_PROTOCOL |
grpc |
Export protocol: grpc or http/protobuf |
OTEL_EXPORTER_OTLP_HEADERS |
none | Additional headers (e.g. API keys for cloud backends) |
OTEL_SERVICE_NAME |
Chronicle |
Service name reported to the telemetry backend |
Set OTEL_EXPORTER_OTLP_ENDPOINT to the receiver you want Chronicle to use. Leaving it unset is not an opt-out: Chronicle registers OTLP exporters without requiring this variable.
Event source ids and log levels
Section titled “Event source ids and log levels”Before exporting traces, decide whether your backend should receive original event source ids. Chronicle uses Raw by default; choose Hashed for keyed correlation or Omitted to leave the id out. Apply the choice separately in the kernel and each client.
The kernel removes Orleans grain-instance id tags before span export, and Chronicle append metrics do not use event source ids as dimensions. Logs can still contain raw ids and exception details. Follow event source ids in telemetry to configure the policy and plan key rotation; protect log access and retention separately.
Local development with .NET Aspire Dashboard
Section titled “Local development with .NET Aspire Dashboard”For a local telemetry viewer, use the .NET Aspire Dashboard service in Source/Kernel/Server/docker-compose.yml. It receives OTLP data and displays metrics, traces, and logs. The example below allows anonymous access, so keep it local and do not expose its ports publicly.
aspire-dashboard: image: mcr.microsoft.com/dotnet/aspire-dashboard:latest environment: - DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS=true - ALLOW_UNSECURED_TRANSPORT=true ports: - 18888:18888 # dashboard UI - 4317:18889 # OTLP/gRPC receiverFrom Source/Kernel/Server, start the services:
docker compose up -dWhen running the kernel on your host machine, set the endpoint to the dashboard’s published OTLP port:
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 dotnet runOpen the Aspire Dashboard at http://localhost:18888 to view metrics, traces, and logs.
Example: Prometheus and Grafana
Section titled “Example: Prometheus and Grafana”To view Chronicle metrics in Grafana through Prometheus, send them to an OTLP receiver with Prometheus export configured, such as the OpenTelemetry Collector:
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317Example: cloud observability backends
Section titled “Example: cloud observability backends”Most cloud observability backends (Datadog, Honeycomb, Grafana Cloud, Azure Monitor) accept OTLP. Set the endpoint and any required authentication headers:
OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.example.comOTEL_EXPORTER_OTLP_HEADERS=x-api-key=your-api-keyInstrument names and migration
Section titled “Instrument names and migration”Kernel metrics default to Telemetry:MetricNames=Legacy, preserving their existing names, units, descriptions, and dimension keys. The tables below describe these default series. Set Telemetry:MetricNames=Convention to opt into cratis.chronicle.* names, explicit UCUM units, and shared attribute keys. For example, cratis.chronicle.observer.successful_observations has unit {observation}. A Prometheus exporter using default translation is expected to expose it as cratis_chronicle_observer_successful_observations_total; descriptions remain HELP metadata, not part of the name. Chronicle consumes Cratis.Metrics.Roslyn 7.34.0, which includes the instrument-name fix released in 7.20.0. Translation depends on the backend: check the name exposed by your backend before writing a query, because OTLP serialization alone does not verify Prometheus exposition or HELP text.
Use Telemetry:MetricNames=Both only as a temporary migration mode. It creates both instrument sets at producer construction and records each measurement to each set with its own dimensions. The single modes publish only their selected set. No listener bridge translates measurements. Both increases telemetry volume and series count; never sum legacy and convention series.
{ "Telemetry": { "MetricNames": "Convention" }}Use the telemetry name reference to migrate dashboard queries and alerts, changing names and dimensions together. Restart the kernel after changing the mode. Convention names are planned to become the default in the next major version, when legacy names and keys are planned for removal. The observer failure counters and the suspected-undelivered queue counter are hand-written to preserve their failure-path initialization and observer tagging. They retain their existing recording points and do not emit initial zero measurements.
Metrics instrumented
Section titled “Metrics instrumented”Chronicle instruments the following meters:
| Meter | Description |
|---|---|
Cratis.Chronicle |
Chronicle application metrics (events appended, observers, etc.) |
Microsoft.Orleans |
Orleans distributed actor framework metrics |
Grpc.AspNetCore.Server |
gRPC server request metrics |
| .NET runtime | GC, thread pool, and memory metrics from the .NET runtime |
SQL startup, contention and live queries
Section titled “SQL startup, contention and live queries”SQL storage publishes these instruments on the Cratis.Chronicle meter:
| Instrument | Kind | Tags | Meaning |
|---|---|---|---|
chronicle-sql-schema-lock-wait |
Histogram (seconds) | provider, outcome |
Elapsed database schema-lock acquisition time, including failed waits. Outcomes are acquired and failed. |
chronicle-sql-upsert-collisions-recovered |
Counter | operation |
Concurrent inserts handled by an existing SQL recovery or idempotency path. Unhandled conflicts and ordinary updates do not increment it. |
chronicle-sql-encryption-key-identifiers-refused |
Counter | none | Encryption key operations refused because their identifier is under review. |
chronicle-sql-live-query-poll-failures |
Counter | query, kind |
A failed SQL live-query poll. The query is retried with backoff (polling interval doubling to 30 s, or the polling interval if longer) and the subscription stays open. kind is transient or other; a sustained other rate needs an operator. |
Schema-lock timing excludes opening the connection, migration execution, and the in-process migration semaphore. SQLite has no database schema lock and emits no schema-lock wait measurement. Collision operation labels identify storage paths, not individual rows, event stores, or namespaces.
The Cratis.Chronicle.Storage.Sql.Database logger emits an Information event for
each EF migration it starts applying, with Node (machine name), ProcessId,
Store (physical database name), and Migration. An attempt can still fail or
roll back; this event is not proof of completion. Already-applied migrations emit
no event. Connection strings and credentials are not included.
The kernel health endpoint reports healthy only after the host signals that startup has completed, including startup migrations and silo initialization. It reports unhealthy during shutdown. Later on-demand schema work does not reopen the startup readiness gate.
Observer failure metrics
Section titled “Observer failure metrics”Chronicle counts observer failures on the Cratis.Chronicle meter. Every one of these instruments carries the tags EventStore, Namespace, ObserverId and EventSequenceId, and no others. Neither the partition nor the event source id is a tag, so the number of series depends on the number of observers and never on how many partitions fail.
| Instrument | Prometheus name | Counts |
|---|---|---|
chronicle-observer-partitions-failed |
chronicle_observer_partitions_failed_total |
Every failed handling attempt of a partition, including the failure of each retry. It is not a count of failed partitions. |
chronicle-observer-partition-retry-attempts |
chronicle_observer_partition_retry_attempts_total |
Every time a failed partition was evaluated for retry. It is recorded together with each failed attempt, whether or not a retry ends up being scheduled, so it does not count retries that ran. |
chronicle-observer-partitions-quarantined |
chronicle_observer_partitions_quarantined_total |
Partitions that ran out of retry attempts and were quarantined. It does not count an observer being quarantined. |
chronicle-observer-quarantined |
chronicle_observer_quarantined_total |
Times an observer was quarantined. |
The Prometheus names are what the OpenTelemetry Collector’s Prometheus exporter and Prometheus’s own OTLP receiver produce by default. These four instruments have no unit and carry their description, so a Prometheus HELP line explains each of them. Earlier Kernels created them with the description in the unit position, which gave them long names such as chronicle_observer_partitions_failed_Number_of_failed_partitions_per_observer_in_a_given_event_store_and_namespace_total and an empty HELP.
An observer has a series on these instruments from its first failure, not before: Chronicle records nothing when an observer starts, so healthy observers add no series and the number of series follows the number of observers that fail. The first value a backend receives for an observer is therefore already 1, and alerts on these counters should not depend on seeing a 0 first. The alerting guide shows how.
The SDK limits each instrument to Telemetry:MetricSeriesLimit series, 500 by default. Beyond that it folds the excess into one series without the tags, carrying only the attribute otel.metric.overflow=true, which can no longer be attributed to an observer. That takes more than 500 failing observer instances since the process started, counted across observers, namespaces and event stores. How many series to expect explains how to raise the limit.
Observer state, jobs and append latency
Section titled “Observer state, jobs and append latency”The failure counters above say how often something went wrong. The gauges below say how things stand now: how many partitions an observer has failing at this moment, what state it is in, how far its catch-up or replay has come and how many observers a process keeps in memory. Each process reports only the observers and jobs it hosts. A per-observer series therefore comes from the one silo that hosts the observer; sum across silos for cluster totals.
These instruments are new, so they have no legacy name. They are published under the names and attribute keys below whatever Telemetry:MetricNames selects.
| Instrument | Kind | Tags | Meaning |
|---|---|---|---|
cratis.chronicle.observer.failed_partitions |
Gauge {partition} |
event store, namespace, event sequence, observer | Failed partitions of the observer now, quarantined ones included. Reported only while above 0. |
cratis.chronicle.observer.quarantined_partitions |
Gauge {partition} |
event store, namespace, event sequence, observer | Quarantined partitions of the observer now. Reported only while above 0. |
cratis.chronicle.observer.running_state |
Gauge 1 |
event store, namespace, event sequence, observer, cratis.chronicle.observer.state |
1 while the observer is in the state named by cratis.chronicle.observer.state. Reported only for quarantined and suspended. |
cratis.chronicle.observer.resident |
Gauge {observer} |
event store, namespace, cratis.observer.type, cratis.chronicle.observer.state |
Observers resident in the process, in every state. |
cratis.chronicle.observer.lag_distance |
Gauge {event} |
event store, namespace, event sequence, observer | Event sequence slots between the observer’s cursor and the end of the event sequence when the watchdog last sampled it. The unit annotation is {event}, but the value counts event sequence slots, including events of types the observer does not handle, so it is an upper bound on what the observer still has to handle. 0 means caught up. |
cratis.chronicle.observer.stalled |
Gauge 1 |
event store, namespace, event sequence, observer | 1 while the watchdog’s current sample says the observer is stalled, 0 while it says lagging or caught up. |
cratis.chronicle.observer.dormant |
Gauge {observer} |
event store, namespace | Observers held as dormant by the appended events queues of the silo: subscribed, with no activation. See Releasing dormant observers. |
cratis.chronicle.job.running |
Gauge {job} |
event store, namespace, cratis.chronicle.job.type |
Running catch-up and replay jobs. |
cratis.chronicle.observer.job.handled_steps |
Gauge {step} |
event store, namespace, event sequence, observer, cratis.chronicle.job.type |
Completed steps, successful or failed, of the observer’s running jobs of that type. |
cratis.chronicle.observer.job.total_steps |
Gauge {step} |
event store, namespace, event sequence, observer, cratis.chronicle.job.type |
Steps of the observer’s running jobs of that type. |
cratis.chronicle.grain.calls.running |
Gauge {call} |
cratis.chronicle.grain.type, event store |
Calls running on the grains of this silo, interleaved or not. The event store is left out for a grain whose key does not carry one. |
cratis.chronicle.grain.calls.pending |
Gauge {call} |
cratis.chronicle.grain.type, event store |
Calls this silo has made to grains that have not been answered: running or queued at the grain. |
cratis.chronicle.grain.calls.oldest_pending_age |
Gauge s |
cratis.chronicle.grain.type, event store |
How long the oldest unanswered call this silo made to a grain has been waiting. |
cratis.chronicle.kernel.load_status |
Gauge 1 |
none | 0 accepting, 1 degraded, 2 recovering. See Kernel overload. |
cratis.chronicle.grpc.streams.open |
Gauge {stream} |
none | gRPC streaming calls this silo is serving. |
cratis.chronicle.registration.pending |
Gauge {registration} |
event store | Registrations the kernel has accepted and not applied yet, as seen by the silo that holds the event store’s registration inbox. Reports 0 once it has drained. |
cratis.chronicle.registration.oldest_pending_age |
Gauge s |
event store | How long the oldest accepted registration that has not been applied has been waiting. A value that keeps growing means registrations are accepted faster than the kernel applies them, or one cannot be applied and is being retried. |
cratis.chronicle.job.failed |
Counter {job} |
cratis.chronicle.job.type |
Jobs that ended with failed steps or could not prepare their steps, by job type. Counted by the silo that ran the job, when the job completes. |
cratis.chronicle.event_sequence.append.duration |
Histogram s |
event store, namespace, event sequence | Duration of an append or append-many call, from validation to its outcome, rejected appends included. |
The tags use the shared keys cratis.event_store.name, cratis.event_store.namespace, cratis.event_sequence.id and cratis.observer.id. No partition, event source or job id is ever a tag. cratis.observer.type is reactor, reducer, projection, external or unknown; cratis.chronicle.observer.state uses the lowercase state names, such as active, quarantined and changing_definition; cratis.chronicle.job.type is catch_up or replay on the gauges, and on cratis.chronicle.job.failed also catch_up_partition, replay_partition, retry_failed_partition, operator_command, import_events, copy_event_source_events, backfill_event_type_generations, migrate_existing_events_for_type or reindex_constraints.
When the per-observer gauges report
Section titled “When the per-observer gauges report”The three per-observer gauges report an observer only while it needs attention, so healthy observers cost no series:
failed_partitionsandquarantined_partitionsreport an observer while its count is above 0.running_statereports1for an observer while it is quarantined or suspended, with the state incratis.chronicle.observer.state. Disconnected and replaying observers are normal during deployments and replays, so they appear only incratis.chronicle.observer.resident.- When an observer recovers, or the process releases it while it is abnormal, its series reports
0for three minutes and then stops. The first collection after the recovery reports the0even when the export or scrape interval is three minutes or longer. With several readers, such as an OTLP exporter and a Prometheus endpoint, only the first reader to collect after the recovery is certain to see that0, so a reader that collects less often than every three minutes can miss it. A backend therefore sees the value fall to0instead of keeping the last abnormal value until the series goes stale. Alert on the value, not on whether the series exists.
cratis.chronicle.observer.lag_distance and cratis.chronicle.observer.stalled publish the watchdog’s own measurement of a resident observer, the same one the Workbench shows, and measure nothing new. They differ from the gauges above in what a missing series means:
- A caught-up observer reports a
lag_distanceof0and astalledof0: caught up is a measurement. An observer with no current sample reports neither series. That is not the same as caught up. - There is no sample for an observer that has not been measured yet, is disconnected, replaying, inactive or quarantined, whose tail could not be read, or whose sample expired. A sample expires two watchdog intervals after it was taken, as
GetObserverLagalso treats it, so an observer the watchdog stops sampling goes absent rather than keeping its last value. - Starting a catch-up withdraws the sample at once, and a stalled sample does not come back until the watchdog takes a new one. An observer that is catching up is never reported stalled.
- A
lag_distancetoo large for a signed 64-bit integer is omitted rather than wrapped or clamped. Thestalledseries is still reported. - The series carry only event store, namespace, event sequence and observer. There is no status, cause, timestamp, cursor or partition tag, and no zero tail: a series that stops being measurable simply stops.
- Only an observer resident in the process that serves it reports, and a collection reads only what the observer last published; it never calls the observer or storage.
cratis.chronicle.observer.resident and cratis.chronicle.job.running report 0 for a combination of event store, namespace, type and state they have reported before, rather than leaving it out once it empties.
The dormant observer counters are published under their Telemetry:MetricNames names (see Telemetry names): observer.dormant_releases, observer.dormant_wakes with cratis.chronicle.observer.wake_cause (event or safety_net), observer.dormant_wakes_delayed, observer.dormant_safety_net_checks with cratis.chronicle.observer.safety_net_outcome (up_to_date, behind, unverified or full_wake) and observer.dormant_resumes with cratis.chronicle.observer.resume_outcome (cursor, catch_up or stale_record). Releasing dormant observers says what to read from them.
How many series to expect
Section titled “How many series to expect”With cumulative temporality, the OpenTelemetry SDK keeps a series’ slot until the process stops, even after the series is no longer reported. The number of series an instrument holds is therefore the number of distinct series it has reported since the process started, not the number it reports now:
| Instrument | Series held per process |
|---|---|
observer.failed_partitions, observer.quarantined_partitions |
Observers that had failed or quarantined partitions at some point since the process started. |
observer.running_state |
Observers that were quarantined or suspended since the process started, once per state. |
observer.job.handled_steps, observer.job.total_steps |
Observers that ran a catch-up or replay since the process started, once per job type. |
observer.successful_observations |
Observers that delivered at least one event since the process started, twice in Convention mode when they also replayed (cratis.replay true and false). |
observer.resident, job.running |
Event stores × namespaces × types × states. Small whatever the number of observers. |
observer.lag_distance, observer.stalled |
At most one current series per resident observer that has a current sample. Under cumulative temporality the SDK holds a slot for every observer that was ever sampled in the process, so the bound is the resident observers over the process lifetime, before the series limit. |
registration.pending, registration.oldest_pending_age |
Event stores whose registration inbox this silo has held since the process started. |
job.failed |
Job types, a fixed list. |
Each instrument is limited to Telemetry:MetricSeriesLimit series, 500 by default. Beyond the limit, the SDK folds the excess into one series whose only attribute is otel.metric.overflow=true, which can no longer be attributed to an observer. A process with thousands of observers that deliver events needs a higher limit for observer.successful_observations and the job-progress gauges. A process where hundreds of observers fail at once needs a higher limit for the failure instruments. Raise the limit with Cratis:Chronicle:Telemetry:MetricSeriesLimit, or the environment variable Cratis__Chronicle__Telemetry__MetricSeriesLimit. The SDK reserves memory for the full limit on every instrument, so raise it only as far as needed. cratis.chronicle.observer.resident stays small whatever the number of observers, and is the one to use for memory planning.
A catch-up whose observer delivers pages across partitions, projections among them, runs as one step, so its progress moves from 0 to 1 of 1. Partitioned observers have one step per partition.
The append-duration histogram uses the explicit buckets 1, 2.5, 5, 10, 25, 50, 100, 250 and 500 milliseconds, and 1, 2.5, 5 and 10 seconds.
Successful observations include recovery work
Section titled “Successful observations include recovery work”The successful observations counter now counts catch-up, replay and retry deliveries as well as live ones. Earlier Kernels counted live deliveries only. Expect dashboards built on this counter to show throughput spikes after a deployment, during a replay and while failed partitions are retried. The convention series (cratis.chronicle.observer.successful_observations) carry cratis.replay, true for replay deliveries, so cratis.replay="false" excludes replays but still includes catch-up and retries. The legacy series (chronicle-observer-successful-observations) keep their four tags, so recovery work raises them without a way to tell it apart.
Suspected skipped events
Section titled “Suspected skipped events”Two counters on the Cratis.Chronicle meter show how often an observer’s position moved past a live event without any delivery path covering it. The first has the observer tags EventStore, Namespace, ObserverId and EventSequenceId, and no others. The second has the appended-events queue tags EventStore, Namespace, EventSequenceId and QueueId, plus ObserverId.
| Instrument | Prometheus name | Counts |
|---|---|---|
chronicle-observer-events-suspected-skipped |
chronicle_observer_events_suspected_skipped_total |
Live events an observer’s position moved past without the observer seeing any delivery path cover them. |
chronicle-appended-events-queue-suspected-undelivered-events |
chronicle_appended_events_queue_suspected_undelivered_events_total |
Event deliveries to an observer whose dispatch failed. One event counts once for each observer it was dispatched to. |
These counters show suspicions, not proof. A catch-up job may have delivered an event without reporting it, and a dispatch that failed may still have reached the observer before it failed. Counting changes nothing about delivery. The counters count every suspicion, while the matching warnings are rate-limited to 10 per observer, or per queue, per minute, with a summary of how many were not logged. Like the failure counters, they only have a series once something is suspected.
When one of them increases, see An observer may have skipped events.
Spills to catch-up
Section titled “Spills to catch-up”The appended-events queue counts every time it moves an observer from live delivery to catch-up. The instrument has the appended-events queue tags EventStore, Namespace, EventSequenceId and QueueId, plus ObserverId and Reason.
| Instrument | Prometheus name | Counts |
|---|---|---|
chronicle-appended-events-queue-observers-spilled-to-catchup |
chronicle_appended_events_queue_observers_spilled_to_catchup_total |
Observers moved from live delivery to catch-up, once per observer and spill. |
Reason is QueueFull when the queue overflowed, DispatchFailed when delivery to the observer failed, and FragmentedBacklog when the observer’s share of one dispatch would have needed more than 256 sequential per-partition deliveries. Like the failure counters, an observer only has a series once it has been spilled.
Open alert incident metrics
Section titled “Open alert incident metrics”Open alert incident metrics are enabled by default. To opt out, set
Cratis__Chronicle__Alerts__IncidentMetricsEnabled=false on every silo and restart
all silos. Alternatively, set Alerts.IncidentMetricsEnabled to false in
chronicle.json:
{ "Alerts": { "IncidentMetricsEnabled": false }}This startup setting prevents registration of both incident gauges, owner keepalive
pings, periodic sampling, and incident-storage reads for metrics. It does not merely
filter exported data. It leaves alert raising, incident materialization, incident
queries, observer failure counters, and other telemetry unchanged. Setting
Alerts.Enabled=false controls alert raising, not incident metrics. To restore
incident metrics, set IncidentMetricsEnabled to true and restart every silo.
A mixed cluster can still collect and publish metrics from enabled silos; complete
the restart before relying on the opt-out. Disable or adjust alerts that depend on
these gauges, including availability alerts, because disabled gauges are absent,
not zero.
Chronicle publishes the number of open alert incidents on the Cratis.Chronicle meter. The chronicle-alerts-open-incidents gauge is exported to Prometheus as chronicle_alerts_open_incidents (a gauge has no _total suffix). It has one series per bucket, tagged EventStore, Namespace, ObserverId, EventSequenceId, Condition and Severity, and no others. The Severity tag holds the incident’s severity (Warning or Critical).
The value is sampled from incident storage, not counted from live events. One owner grain in the cluster aggregates the open incident rows every 30 seconds and publishes the result; a scrape reads that snapshot and does no storage I/O. An escalation moves an incident between Severity buckets without changing the total.
- A snapshot older than 90 seconds publishes nothing, rather than zero. The same applies to a refresh that cannot run: while incident materialization is catching up or degraded, or storage fails, Chronicle keeps the previous snapshot until it ages out. Absence of the series therefore means “unknown”, not “no incidents”.
- A bucket that empties reports
0for 5 minutes and is then retired. chronicle-alerts-open-incidents-available(chronicle_alerts_open_incidents_available, no tags) is1while the instance that owns the snapshot has a fresh one and0while its snapshot is missing or stale. Instances that do not own the snapshot report no series.
Aggregate across instances with max, never sum. A silo that is partitioned or hung can keep publishing its last snapshot for up to 90 seconds after another instance has taken ownership, so more than one instance can report a series for a short time. Summing would double count; max by (EventStore, Namespace, ObserverId, EventSequenceId, Condition, Severity) does not.
When the silo that owns the snapshot dies, another silo re-activates the owner within about 30 seconds. The new owner starts with no memory of the buckets that were retiring, so a series can disappear without ever reporting 0, and a backend’s lookback can keep returning the last value briefly. Do not depend on seeing a 0 before a series ends.
Like the other instruments, this gauge is limited to Telemetry:MetricSeriesLimit series per process, 500 by default. The series count is the number of observers with incidents, times the conditions and severities they hold.
To be alerted when an observer’s partitions keep failing or run out of retries, see Get alerted when observers stop processing.
Traces instrumented
Section titled “Traces instrumented”These are the server’s sources. The Chronicle client in your application emits its own spans on the Cratis.Chronicle.Client source, which you register yourself; see Trace Chronicle client operations with OpenTelemetry.
Failed append and observer handle operations set Error status and error.type to an exception type or a low-cardinality failure code, without recording exception messages. Append spans also carry cratis.chronicle.append.outcome: success, error, concurrency_violation, or constraint_violation.
Chronicle traces the following activity sources:
| Source | Description |
|---|---|
Cratis.Chronicle |
Chronicle internal operations |
Microsoft.Orleans.Runtime |
Orleans runtime activities (opt-in) |
Microsoft.Orleans.Application |
Orleans grain-call activities (opt-in) |
| HTTP client | Outgoing HTTP requests |
| ASP.NET Core | Incoming HTTP and unary gRPC requests, excluding health checks and connection keep-alive |
| gRPC client | Outgoing gRPC calls (opt-in) |
Trace volume defaults
Section titled “Trace volume defaults”Chronicle excludes connection keep-alive requests, the configured health endpoint (including its /live
and /ready routes), and all client-streaming, server-streaming, or duplex gRPC requests from server
traces. Streaming calls can remain open for the lifetime of a client; tracing them would produce
long-running spans rather than useful delivery traces. Reactor and reducer registration is traced
as a separate root operation, without the untraced stream request as its parent.
Queue enqueue and dispatch operations do not create spans. Accepted, non-empty observer deliveries
produce cratis.chronicle.observer.handle spans with cratis.observer.id, cratis.eventstore.name,
cratis.eventstore.namespace, cratis.eventsequence.id, cratis.observer.type, and the numeric
cratis.event.count tags.
Kernel gRPC client instrumentation is disabled by default to reduce trace volume. To opt in, set
Cratis:Chronicle:Telemetry:GrpcClientTracing to true. This example shows the full configuration
hierarchy used in appsettings.json; in chronicle.json, use only the inner telemetry section:
{ "cratis": { "chronicle": { "telemetry": { "grpcClientTracing": true } } }}The equivalent environment variable is Cratis__Chronicle__Telemetry__GrpcClientTracing=true.
HTTP client tracing remains enabled. These exclusions do not disable metrics or change OTLP
exporter, endpoint, or resource configuration.
Orleans trace volume
Section titled “Orleans trace volume”Chronicle’s telemetry setup (AddChronicleTelemetry) leaves Orleans runtime and grain-call spans
out of exports by default to reduce trace volume. Chronicle spans remain enabled, and Orleans
AddActivityPropagation() keeps trace context flowing across grain calls without exporting the
Orleans activities that carry it. Chronicle spans in the called grain keep the caller’s trace id,
but their direct parent is an unexported Orleans span, so a trace viewer may show a missing
intermediate parent. Calls outside an existing trace do not create carrier activities.
To include Orleans spans, set Cratis:Chronicle:Telemetry:OrleansTracing=true. As above, this is the
full configuration hierarchy; omit the cratis and chronicle wrappers in chronicle.json:
{ "cratis": { "chronicle": { "telemetry": { "orleansTracing": true } } }}The equivalent environment variable is Cratis__Chronicle__Telemetry__OrleansTracing=true.
OTEL_TRACES_SAMPLER and OTEL_TRACES_SAMPLER_ARG retain their OpenTelemetry behavior; Chronicle
sets no sampler override. Exporter, endpoint, resource, and metric configuration are unchanged.
The default applies only to AddChronicleTelemetry. The public TracerProviderBuilder.AddChronicleInstrumentation()
extension is unchanged and still adds both Orleans sources; pass false to its bool overload to leave them out.