Skip to content

Add telemetry off-switch to amc_server.xml - #87

Merged
alexanderoster merged 1 commit into
alexanderoster:developfrom
krixkrix:feature/telemetry-off-switch
Oct 23, 2026
Merged

alexanderoster merged 1 commit into
alexanderoster:developfrom
krixkrix:feature/telemetry-off-switch

Conversation

@krixkrix

Copy link
Copy Markdown

Telemetry recording is unconditional and unbounded: every state machine state and signal slot records on every cycle, which can reach gigabytes per day and fill the disk of a long-running machine. Add an optional telemetry attribute on the node:

"on" or omitted keeps current behaviour; "off" creates no telemetry_*.data file and writes no entries; any other value fails at startup with INVALIDTELEMETRYSETTING.

The flag is passed via new DataModel::SetTelemetryEnabled/GetTelemetryEnabled methods rather than a new InitialiseDatabase parameter, so a mismatched libmcdata fails with COULDNOTFINDLIBRARYEXPORT instead of misreading arguments, and existing InitialiseDatabase callers are unchanged.

Entries are dropped in CTelemetryWriter::writeEntry, not at marker creation, because the signal slot reaction/finish/acknowledge timing parameters are computed from the in-memory marker statistics. Channel registration is also unchanged, so an "off" session stays readable by TelemetryReader.

Retention of existing telemetry/journal files and the session_metrics table are out of scope.

Telemetry recording is unconditional and unbounded: every state machine
state and signal slot records on every cycle, which can reach gigabytes
per day and fill the disk of a long-running machine. Add an optional
telemetry attribute on the <data> node:

  <data directory="data/" database="sqlite" sqlitedb="storage.db" telemetry="off" />

"on" or omitted keeps current behaviour; "off" creates no telemetry_*.data
file and writes no entries; any other value fails at startup with
INVALIDTELEMETRYSETTING.

The flag is passed via new DataModel::SetTelemetryEnabled/GetTelemetryEnabled
methods rather than a new InitialiseDatabase parameter, so a mismatched
libmcdata fails with COULDNOTFINDLIBRARYEXPORT instead of misreading
arguments, and existing InitialiseDatabase callers are unchanged.

Entries are dropped in CTelemetryWriter::writeEntry, not at marker
creation, because the signal slot reaction/finish/acknowledge timing
parameters are computed from the in-memory marker statistics. Channel
registration is also unchanged, so an "off" session stays readable by
TelemetryReader.

Retention of existing telemetry/journal files and the session_metrics
table are out of scope.
@alexanderoster
alexanderoster merged commit 7ad38f4 into alexanderoster:develop Oct 23, 2026
2 checks passed
@krixkrix
krixkrix deleted the feature/telemetry-off-switch branch October 23, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants