Evidence doc gains the #55 section (root cause of no logs, 0.3.0 contents + SHA256,
per-app commits, collector output per app: service.version, site.id, node.role and
log records on OtOpcUa, HistorianGateway, ScadaBridge Site and MxAccessGateway).
GAPS, current-state, SPEC, the Telemetry CLAUDE.md and the index row updated;
infra/otel-collector gains otelidentity.py (Resource per signal + log samples).
Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
`ExportLogs`, `ResourceAttributes:<key>` from an app's own `<App>:Telemetry` section. Absent keys keep the
code defaults, so the four hand-written exporter parsers are gone.
- **Logs follow `AddZbTelemetry`**: `AddZbTelemetry` registers its options in DI. `AddZbSerilog` resolves them
inside its `AddSerilog` callback (so call order does not matter), and when its own options do not select
OTLP, the OTLP log sink uses that registration's endpoint and Resource. `ExportLogs = false` keeps logs
local. Levels and the configuration-driven sinks are unchanged.
- **0.2.1 shipped in the same release.** It holds the P3 review fixes: redaction after `ConfigureLogger`,
dictionary-key collisions, and the stricter endpoint check (`collector:4317` without a scheme now fails at
startup when `Exporter=Otlp`). It is a minor bump because it adds API and changes behaviour. No checked-in
config in any of the four repos sets an OTLP endpoint. The check is a no-op unless `Exporter=Otlp`, and no
wonder tier has a collector yet (#54), so no deployed box can trip it.
- **Tests**: 42 → **77** in Release (Telemetry 38, Serilog 39). They include a loopback OTLP/gRPC receiver on
Kestrel that proves a log record arrives with `service.version`/`site.id`/`node.role`/an extra attribute, an
`ExportLogs=false` case with a metrics positive control, and a Prometheus case.
Mutation checks, each caught by the named tests:
- Drop the DI lookup → the e2e log test fails.
- Drop the version default → the pipeline-Resource and e2e tests fail.
- Drop `ResourceAttributes` → 2 attribute tests and the e2e test fail.
- Ignore `ExportLogs` → the decision test and the e2e test fail.
- Disable the reserved-key check → 7 theory cases fail.
- Drop `ApplyConfiguration`'s attribute or `SiteId` read → its test fails.
## Apps (all pushed to their default branch; no wonder-box deploys)
| App | Commit | Pin | Identity wiring |
|---|---|---|---|
| OtOpcUa | `master``412da27c` | 0.1.0 → 0.3.0 | `site.id` = the application Cluster id (the `cluster-<ClusterId>` role suffix; omitted on a legacy node); `node.role` = the plain roles, sorted (`admin,driver`); Program passes its `EffectiveRoles`. |
| MxAccessGateway | `main``d9d9ff48` | 0.1.0 → 0.3.0 (csproj) | `node.role=standalone` (one gateway per box); `site.id` from `MxGateway:Telemetry:SiteId` (there is no node identity in its config, so it is omitted unless set). |
| HistorianGateway | `main``ae1dbcc` | 0.1.0 → 0.3.0 (csproj) | Same as mxgw, under the root-level `Telemetry:` section. |
| ScadaBridge | `main``a633005f` | 0.2.0 → 0.3.0 | Unchanged `site.id`/`node.role`. The new `ScadaBridgeTelemetryConfig` fills both `AddZbTelemetry` and the pre-host `AddZbSerilog` logger. The logger is built on its own container with no `AddZbTelemetry` to follow, so the exporter is passed to it explicitly. |
LOG {"severity": "Error", "body": "Health check worker-executable with status Unhealthy completed after 4.6339ms with message 'Worker executable ...", "traceId": "b76b4059dd4f33c88e556ec5ef2e4083"}
```
The live `MxAccessGw` service stayed `Running` with `:5130/health/ready` = 200 throughout. Its gateway PID
(9148) and worker PIDs (`14700,22108`) were unchanged before and after. The scratch copy and `C:\otel55` were
deleted.
On every app, log records carry `traceId` when written inside a request, so logs join their spans in the
backend. The Resource is byte-identical across the three signals of each process.
| `service.version` | `ServiceVersion` | Defaults (Telemetry 0.3.0+) to the entry assembly's `AssemblyInformationalVersion` — the git SHA every family app stamps; set a value to override, `""` to omit |
| `service.instance.id` | _(auto)_ | Always populated from `ZbResource.InstanceId` — a deterministic `MachineName:ProcessId`. The OTel SDK's random-GUID default is disabled so every signal from the same process carries an identical, restart-stable instance id for cross-signal correlation |
| `site.id` | `SiteId` | Optional; identifies the physical/logical site |
| _(any other)_ | `ResourceAttributes` | Optional extra attributes (0.3.0+); the keys above are reserved |
| `host.name` | _(auto)_ | Always populated from `Environment.MachineName` |
The same `SiteId` and `NodeRole` values are passed to the Serilog enrichers (§4) so a
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.