Skip to content

feat(telemetry): stamp service identity into webhook alerts#1078

Merged
Aaronontheweb merged 3 commits into
netclaw-dev:devfrom
Aaronontheweb:claude-wt-agent-identity-webhooks
May 19, 2026
Merged

feat(telemetry): stamp service identity into webhook alerts#1078
Aaronontheweb merged 3 commits into
netclaw-dev:devfrom
Aaronontheweb:claude-wt-agent-identity-webhooks

Conversation

@Aaronontheweb
Copy link
Copy Markdown
Collaborator

@Aaronontheweb Aaronontheweb commented May 18, 2026

Summary

  • Projects the OpenTelemetry Resource's service.* attributes (service.name, service.namespace, service.instance.id, service.version) into a shared ServiceIdentity and stamps it onto operational webhook alert payloads — so alerts from multiple netclaw instances posting to the same Slack channel / endpoint can be told apart.
  • Service identity is sourced purely from the standard OpenTelemetry environment variables (OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES) via the OTel resource detectors — the same way every other OpenTelemetry service is configured. No netclaw-owned identity config.
  • Removes the Telemetry:ServiceName config property added in feat(telemetry): configurable service.name and emit service.version #1042; the Telemetry section keeps only Enabled and Otlp:Endpoint.
  • Generic JSON payloads gain a nested service object (additive — existing fields unchanged); Slack Block Kit alerts gain a Service field plus version (and namespace / instance id when present) in the context footer.

Related

Test plan

  • dotnet build (solution) — clean, 0 warnings
  • Netclaw.Daemon.Tests — 563 pass (incl. new ServiceIdentityProjectionTests)
  • Netclaw.Cli.Tests Doctor/schema — 137 pass
  • dotnet slopwatch analyze — 0 issues; copyright headers verified
  • Manual: set OTEL_SERVICE_NAME (and/or OTEL_RESOURCE_ATTRIBUTES), restart the daemon, confirm the daemon.started webhook alert carries the service identity

@Aaronontheweb Aaronontheweb added observability config Configuration issues, netclaw doctor, schema validation. labels May 18, 2026
@Aaronontheweb Aaronontheweb marked this pull request as ready for review May 18, 2026 23:58
@Aaronontheweb Aaronontheweb force-pushed the claude-wt-agent-identity-webhooks branch from 82df432 to 59568b8 Compare May 19, 2026 00:41
Project the OpenTelemetry resource's service.* attributes (service.name,
service.namespace, service.instance.id, service.version) into a shared
ServiceIdentity and stamp it onto operational webhook alert payloads, so
alerts from multiple netclaw instances posting to the same destination
can be told apart.

Service identity is sourced from the standard OpenTelemetry environment
variables (OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES). When those are
unset, a NetclawResourceDetector (IResourceDetector) contributes
assembly/runtime defaults: service.name=netclawd,
service.instance.id={hostname}:{processId}, service.version from the
build. The resolved identity is logged once at startup.

No netclaw-owned identity config; this also removes the
Telemetry:ServiceName property added in netclaw-dev#1042.
@Aaronontheweb Aaronontheweb force-pushed the claude-wt-agent-identity-webhooks branch from 59568b8 to 9eaa8dd Compare May 19, 2026 01:07
Copy link
Copy Markdown
Collaborator Author

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - decided to use the OTEL standard for this

@Aaronontheweb Aaronontheweb merged commit 5093b0a into netclaw-dev:dev May 19, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration issues, netclaw doctor, schema validation. observability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant