Repository navigation
feat(observability): identify the process in telemetry - #820
Conversation
📝 Summary
Merge Risk: 🔵 Low · up to
|
📚 Docs preview✅ Live: https://pr-820-wavehouse-docs.wave-rf.workers.dev (follows this PR) |
Code Coverage OverviewLanguages: Go GoThe overall line coverage in commit 17fae0d in the Show a line coverage summary of the most impacted files.
Updated |
…s-identity-oyqtjm # Conflicts: # AGENTS.md # docs/src/content/docs/architecture.md # docs/src/content/docs/configuration.mdx
|
The test is timing-sensitive, so this looks like a one-off. No fix exists yet because nothing points to a real defect. I'll re-run the failed job once when the run finishes, and treat a second failure as real. Generated by Claude Code |
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
f30789fd-545c-4d18-a9aa-28aeaec18e85
📒 Files selected for processing (18)
AGENTS.mdCHANGELOG.mdcmd/wavehouse/main.goconfig.yamldocs/src/content/docs/architecture.mddocs/src/content/docs/configuration.mdxdocs/src/content/docs/deployment.mdinternal/app/app.gointernal/app/wire.gointernal/app/wire_identity.gointernal/app/wire_identity_test.gointernal/config/config.gointernal/observability/identity.gointernal/observability/identity_test.gointernal/observability/provider.gointernal/observability/provider_test.gointernal/testutil/otlp.gotests/integration/otel_test.go
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📜 Review details
🧰 Additional context used
📚 Code guidelines (5)
docs/src/content/docs/deployment.md — auto-discovered
AGENTS.md — auto-discovered
docs/src/content/docs/development.md — auto-discovered
.github/copilot-instructions.md — auto-discovered
CONTRIBUTING.md — auto-discovered
📓 Path-based instructions (8)
Source excerpt: All images use multi-stage builds (Go Alpine builder → distroless runtime) for minimal attack surface.
📄 CodeRabbit inference engine (docs/src/content/docs/deployment.md)
Files:
docs/src/content/docs/deployment.md
Source excerpt: Add the field to the appropriate struct in `internal/config/config.go` with `yaml` and `env` tags, and put a non-zero default in `defaults()` there.
📄 CodeRabbit inference engine (AGENTS.md)
Files:
internal/config/config.go
Source excerpt: **In MDX, leave a blank line between a JSX tag and a code fence.**
📄 CodeRabbit inference engine (AGENTS.md)
Files:
docs/src/content/docs/configuration.mdx
Source excerpt: **Integration test needing Docker** → add a subtest under `tests/integration/` (e.g.
📄 CodeRabbit inference engine (docs/src/content/docs/development.md)
Files:
tests/integration/otel_test.go
See [AGENTS.md](../AGENTS.md) for project conventions, architecture notes, and AI agent instructions.
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
AGENTS.md
Source excerpt: **Docs prose**: never hard-wrap Markdown — one paragraph is one line.
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
docs/src/content/docs/configuration.mdx
Source excerpt: Run `make fix` to apply them.
📄 CodeRabbit inference engine (docs/src/content/docs/development.md)
Files:
CHANGELOG.mddocs/src/content/docs/deployment.mddocs/src/content/docs/configuration.mdxdocs/src/content/docs/architecture.mdAGENTS.md
Source excerpt: **Editors see WH001 in `.md` only.**
📄 CodeRabbit inference engine (AGENTS.md)
Files:
CHANGELOG.mddocs/src/content/docs/deployment.mddocs/src/content/docs/architecture.mdAGENTS.md
🪛 LanguageTool
CHANGELOG.md
[typographical] ~44-~44: Consider using an em dash in dialogues and enumerations.
Context: - **Every span, metric series and log rec...
(DASH_RULE)
docs/src/content/docs/configuration.mdx
[typographical] ~286-~286: The word ‘When’ starts a question. Add a question mark (“?”) at the end of the sentence.
Context: ... you can run traces-only, logs-only, etc. Prometheus exposition is configured in ...
(WRB_QUESTION_MARK)
[style] ~286-~286: Since ownership is already implied, this phrasing may be redundant.
Context: ... Prometheus exposition is configured in its own top-level prometheus b...
(PRP_OWN)
[typographical] ~296-~296: The word ‘When’ starts a question. Add a question mark (“?”) at the end of the sentence.
Context: ...ized regardless of the sub-toggles below. The OTLP endpoint, TLS, custom CA, mutu...
(WRB_QUESTION_MARK)
AGENTS.md
[style] ~43-~43: Since ownership is already implied, this phrasing may be redundant.
Context: ...as behavior; a new backend runs it from its own test, with mqtest.Caps only where its...
(PRP_OWN)
Requested by Taite · project thread
Summary
Before: the OpenTelemetry resource carried only
service.name(the constantwavehouse),OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTESwere ignored,instance_idwas logged once at boot and nowhere else, and the build was visible only on/version. Two replicas of one role pushing over OTLP were indistinguishable.After: every span, metric series and OTLP log record carries
service.version,service.instance.id(the boot config'sinstance_id),wavehouse.roles(sorted),wavehouse.git_commitandwavehouse.build_timealongsideservice.name, and the standard env vars override or extend them (a malformedOTEL_RESOURCE_ATTRIBUTESis logged, never fatal). A newwavehouse_build_infogauge (always 1;version,git_commit,build_time,roles; no instance or tenant label, since the resource carries the instance) shows a mixed-version rollout. Every log line after the boot config loads carriesinstance_id, stdout included.How:
observability.Identity(newidentity.go) builds the resource withresource.WithFromEnv()merged last and registers the build-info gauge on the meter provider;InitProvidertakes anIdentityinstead of a service name.internal/app/wire_identity.go(new) builds it from the boot config and build info. Because #712 and #770 editwire.goandapp.go, those touches are minimal:wire.gochanges two lines insidewireObservability(theInitProviderargument and the OTLP logger'sWith), neither in a region those PRs edit;app.godrops the now-duplicateinstance_idkey from theprocess rolesline (line 184), separated by an unchanged line from #712's nearest hunk. Agit merge-treeagainst both PR heads showed no new conflicts.Test plan
make build,go vet ./...(and with-tags integration)go testforinternal/observability,internal/app,internal/config,cmd/wavehouse: resource attributes, env override key by key, empty fields omitted, malformed env non-fatal, Prometheus scrape showswavehouse_build_infoandtarget_infowithservice_instance_idship_itmake ci(not run here: needs Docker; owner runs it locally).golangci-lintcould not be downloaded in this environment either.tests/integration/otel_test.gogains build_info/target_info assertions that run there.Related Issues
Closes #772
Part of #777
🤖 Generated with Claude Code
https://claude.ai/code/session_0174TPmnzAJSxK7ej3Q9q1i8
Generated by Claude Code