OTLP export not yet proven for the Central role (scadaproj#13 proved Site only) #133
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed in
dd4f1c2a(main, rebased one36cd605). Owner decision, approved 2026-11-12: take the recommendation.What changed
AlarmConditionState.Severityis higher = more urgent for every kind. NewCommons.Types.Alarms.AlarmPriorityBands.ToSeverityis OtOpcUa'sGalaxyAlarmPriority.Map(lmxopcua#887,b61f3e05) value for value: 1–250 → 1000, 251–500 → 750, 501–750 → 500, 751–999 → 250, with ≤ 0 → 1000 and > 999 → 250. It is used byMxGatewayAlarmMapper(the gatewayseverityis the AVEVA priority) and byAlarmConditionStateFactory.ForComputed(PriorityLevel). The OPC UA path is unchanged. OtOpcUa's history-only "not an alarm" row (AVEVA severity 0 → 1) has no live counterpart, so it is not ported.AlarmConditionState.Priority(new, trailingint?),AlarmStateChanged.PriorityandScriptAlarm.Priority(new, trailing) all carry exactly the pre-#129 Severity: the AVEVA priority clamped to 0–1000,PriorityLevel, or Part 9 Severity for OPC UA. There is no proto change.AlarmStateUpdate.prioritykeeps its meaning, and central derives Severity by kind (SeverityFromPriority), so the decode is right for un-upgraded sites too. The Debug View snapshot decode restoresCondition.Priority.NativeAlarmActorupgrades pre-#129native_alarm_staterows on rehydrate.Priority, neverSeverity. A test pinsPriority== pre-#129Severityfor every input fromint.MinValuetoint.MaxValue, so the band selects identical alarms. The rig scriptsdocker/seed-mes-alarm-demo.shandseed-mes-test-machine.shnow usea.Priorityfor the filters and the MESSeverityfield, so their output is unchanged. Deployed scripts must make the same switch: deploy gate #131.AlarmActorraise event-log severity is now banded severity ≥ 700 (was raw priority ≥ 700);SiteStreamGrpcClient.ConvertToDomainEvent;SiteCommandDtoMapper.FromProto;ScriptRuntimeContext.ToScriptAlarm;NativeAlarmActor(Emit/rehydrate).NativeAlarmActor.ErrorSeverityThreshold,AlarmSummaryServiceworst = max,AlarmSummary.razor>=filter and descending sort,AlarmStateBadges.debug snapshotPriority column (raw, labelled),AlarmContext.Priority(raw),PriorityLevelauthoring in UI/CLI/Transport. Notifications, Inbound API host code and Flow Debugger have no severity sort or filter.docs/plans/2026-06-30-mes-alarm-status-api.md, CLAUDE.md, CLI README.Tests (Release, rebased tree): Commons 977/977, DataConnectionLayer 549/549, Communication 834/834, SiteRuntime 1055/1055, CentralUI (bUnit) 1545/1545, IntegrationTests
SiteAlarmStream2/2. One unrelated DCL flake (TagResolutionCounts_ConnectionLevelFailureThenRecovery…) failed once and passed on its own and in every later full run.Priority, legacy-row rehydrate, the computed and native event-log thresholds, Alarm Summary worst/sort.ToSeverityto the old clamp turned 62 tests red across all five projects, bUnit included. KeyingPriorityoff the new Severity turned the MES-band test (plus 3 others) red. Both were restored.Consumer impact: see the previous comment. No deploys were made.
Update from scadaproj#55 (2026-11-12): ScadaBridge
maina633005fpins Telemetry0.3.0. WithScadaBridge:Telemetry:Exporter=Otlp, logs now go to the collector as well, alongside metrics and traces. The Resource also carriesservice.version. This is proven on a throwaway Site node (78 log records withsite.id/node.role/service.version).Central still not run. The docker rig was busy with the #132 failover drills (
sb132-p/sb132-probewere running, and the centrals had been recreated minutes earlier). The "Do" above still applies; when it is run, also check for log records withnode.role=Central, e.g.python3 ../otelidentity.py scadabridgeon the collector host.Done: Central role over OTLP is proven on the docker rig (2026-11-12). Evidence: scadaproj
components/observability/2026-11-12-otlp-end-to-end-evidence.md, section "ScadaBridge Central role over OTLP" (scadaprojmaind93ca7b).Run: the rig image predated Telemetry 0.3.0 (its Telemetry dll was
0.2.0), so it was rebuilt withdocker/deploy.shfrom a cleanmainat482ac665. A temporary compose override setScadaBridge__Telemetry__Exporter=Otlp+OtlpEndpoint=http://10.100.0.35:4317on central-a and central-b, and both were recreated together. Activity: 9 rejected inbound calls (401), 3 authorizedPOST /api/SimpleAlarmStatus(200) with a temporary scoped key (deleted afterwards), onedeploy instance --id 1492(Success), and CLI/UI/health traffic.Arrived at
zb-otel-collector. The Resource is identical across metrics, traces and logs:service.name=scadabridge,service.namespace=ZB.MOM.WW,service.version=1.0.0,node.role=Central,site.id=central,service.instance.id/host.name= container id.Central instruments (central-a, cumulative):
scadabridge.deployments.applied= 1;scadabridge.inbound_api.requests{SimpleAlarmStatus} = 3, {<unauthorized>} = 9. These match the activity exactly. Alsocentral.transport.import_sessions.openand the shared gauges. The standby exports only the gauges. Spans include the CentralControlService gRPC server calls (Heartbeat/SubmitNotification/IngestAuditEvents/ReportSiteHealth),POST /management,POST /api/{methodName}, the deployment config fetch, and the gRPC client spansSiteCommandService/ExecuteRoute/ExecuteLifecycle. The first log record is the pre-hostStarting ScadaBridge host as Central on scadabridge-central-a.Allowlist:
ObservedMeterscovers every meter in the repo (ZB.MOM.WW.ScadaBridge+ LocalDb), and there is no appActivitySource. No defect, no code change.Restored: both centrals were recreated together on the default config (0 telemetry env vars). All 8 nodes
/health/ready200, one active per pair, centralmemberCount 2 / unreachableCount 0, Traefik/health/active200. The new central processes send nothing to the collector (negative control). The rig stays on the rebuilt482ac665image.Follow-ups filed:
service.versionwithout the+<sha>, because.dockerignoreexcludes.git/. Rig-only.LogsService/Exportcalls are traced as gRPC client spans in all four apps. It is a library fix inZB.MOM.WW.Telemetry.Closing.