feat(telemetry): stamp service identity into webhook alerts#1078
Merged
Aaronontheweb merged 3 commits intoMay 19, 2026
Merged
Conversation
82df432 to
59568b8
Compare
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.
59568b8 to
9eaa8dd
Compare
Aaronontheweb
commented
May 19, 2026
Collaborator
Author
Aaronontheweb
left a comment
There was a problem hiding this comment.
LGTM - decided to use the OTEL standard for this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resource'sservice.*attributes (service.name,service.namespace,service.instance.id,service.version) into a sharedServiceIdentityand stamps it onto operational webhook alert payloads — so alerts from multiple netclaw instances posting to the same Slack channel / endpoint can be told apart.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.Telemetry:ServiceNameconfig property added in feat(telemetry): configurable service.name and emit service.version #1042; theTelemetrysection keeps onlyEnabledandOtlp:Endpoint.serviceobject (additive — existing fields unchanged); Slack Block Kit alerts gain aServicefield plus version (and namespace / instance id when present) in the context footer.Related
webhook-service-identityis included in this PR (proposal/design/specs/tasks).Test plan
dotnet build(solution) — clean, 0 warningsNetclaw.Daemon.Tests— 563 pass (incl. newServiceIdentityProjectionTests)Netclaw.Cli.TestsDoctor/schema — 137 passdotnet slopwatch analyze— 0 issues; copyright headers verifiedOTEL_SERVICE_NAME(and/orOTEL_RESOURCE_ATTRIBUTES), restart the daemon, confirm thedaemon.startedwebhook alert carries the service identity