Skip to content

docs(monitoring): state what OTLP log records carry and test the logs startup gate - #326

Merged
M0Rf30 merged 3 commits into
mainfrom
docs/otlp-logs-review-followup
Oct 28, 2026
Merged

M0Rf30 merged 3 commits into
mainfrom
docs/otlp-logs-review-followup

Conversation

@gjed

@gjed gjed commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #321, which was merged before these review fixes landed. Refs #192.

Resolves the four review threads of #321:

  • docs(upgrading): Unreleased note that telemetry.otlp.logs now exports every log line on upgrade, and that OTEL_LOGS_EXPORTER=none keeps the old behaviour.
  • docs(monitoring): the startup banner and the unencrypted-secrets warning are logged before telemetry is set up and are not exported. The exported attributes (path, remote_addr, request_id, exception.message) are the line fields unfiltered; scrubbing is left to the Collector, as OpenTelemetry's sensitive-data guidance says.
  • test(telemetry): TestSetupTelemetryBridgesLogsOnlyWhenLogsAreOn runs setupTelemetry against an httptest OTLP/HTTP endpoint. A line logged through a.log reaches /v1/logs with logs on and does not with only audit on. It fails if the a.log = log swap is dropped and if the otlp.Logs gate is inverted.

The commits are the rebased versions of those cited in the #321 replies:

#321 reply here
80916baa ad9ea22b
0c3fb514 dd9ecdd3
9fab46d9 a61a20e0

make lint reports one hit, pkg/rpm/dependencies.go:72 (nolintlint), which this PR does not touch.

@gjed gjed self-assigned this Oct 28, 2026
@gjed
gjed requested a review from M0Rf30 October 28, 2026 15:49
@github-actions

Copy link
Copy Markdown

Coverage

Coverage vs main
Go, unit + integration 80.4% ±0.0
Go, unit tests only 66.8% ±0.0
Go, integration tests only 58.1% ±0.0
Web, lines 87.7% ±0.0
Web, functions 82.9% ±0.0
Go by area
Area Coverage vs main
cmd/docgen 82.0% ±0.0
cmd/genformats 86.4% ±0.0
cmd/oa 79.7% ±0.0
cmd/resetpw 0.0% ±0.0
cmd/server 71.3% +0.4
internal/ai 87.2% ±0.0
internal/api 73.4% ±0.0
internal/apkkeys 77.1% ±0.0
internal/attest 84.7% ±0.0
internal/audit 92.9% ±0.0
internal/auth 90.5% ±0.0
internal/backup 65.7% ±0.0
internal/bgtask 96.2% ±0.0
internal/branding 93.4% ±0.0
internal/clientsetup 93.1% ±0.0
internal/config 95.6% ±0.0
internal/cron 90.2% ±0.0
internal/crypto 90.7% ±0.0
internal/database 67.9% ±0.0
internal/declarative 75.5% ±0.0
internal/dtrack 85.1% ±0.0
internal/federation 80.9% -0.2
internal/format 78.1% ±0.0
internal/gpgkeys 87.3% +0.3
internal/group 89.0% ±0.0
internal/httpcache 100.0% ±0.0
internal/httpx 100.0% ±0.0
internal/importmeta 93.3% ±0.0
internal/iocopy 100.0% ±0.0
internal/license 99.4% ±0.0
internal/licensemeta 94.3% ±0.0
internal/licensepolicy 92.6% ±0.0
internal/mcp 87.1% ±0.0
internal/metrics 96.2% ±0.0
internal/middleware 93.5% ±0.0
internal/netutil 94.0% ±0.0
internal/ocimanifest 100.0% ±0.0
internal/ocipath 100.0% ±0.0
internal/passwd 86.5% ±0.0
internal/pathseg 100.0% ±0.0
internal/pkgdeps 91.9% ±0.0
internal/presign 99.0% ±0.0
internal/promote 86.4% ±0.0
internal/proxy 86.2% ±0.0
internal/pypisimple 97.3% ±0.0
internal/quarantine 100.0% ±0.0
internal/quota 87.8% ±0.0
internal/recovery 84.5% -0.1
internal/replication 76.3% ±0.0
internal/repodispatch 85.1% ±0.0
internal/repotype 95.5% ±0.0
internal/sbom 89.6% ±0.0
internal/scanexport 95.6% ±0.0
internal/search 90.6% ±0.0
internal/secrets 87.7% ±0.0
internal/storage 83.6% ±0.0
internal/telemetry 87.7% ±0.0
internal/tiering 81.4% ±0.0
internal/trash 96.7% ±0.0
internal/urlparams 100.0% ±0.0
internal/vuln 88.5% +0.1
internal/webhook 84.7% ±0.0
internal/worker 82.8% ±0.0
internal/xzutil 80.0% ±0.0
pkg/apk 96.0% ±0.0
pkg/cargo 95.3% ±0.0
pkg/compactindex 97.6% ±0.0
pkg/conan 99.2% ±0.0
pkg/conda 94.2% ±0.0
pkg/deb 76.1% ±0.0
pkg/delta 71.4% ±0.0
pkg/gpg 86.7% ±0.0
pkg/helm 95.9% ±0.0
pkg/logger 93.8% ±0.0
pkg/maven 96.7% ±0.0
pkg/npm 89.4% ±0.0
pkg/nuget 97.6% ±0.0
pkg/pacman 89.8% ±0.0
pkg/rpm 91.8% ±0.0
pkg/rpmsign 90.5% ±0.0
pkg/rubymarshal 86.7% ±0.0
tests/integration 79.2% ±0.0
web 95.5% ±0.0
Web by area (lines)
Area Coverage vs main
src 23.5% ±0.0
src/api 88.2% ±0.0
src/components 85.9% ±0.0
src/composables 91.5% ±0.0
src/i18n 96.5% ±0.0
src/lib 98.6% ±0.0
src/pages 87.8% ±0.0
src/pwa 98.8% ±0.0
src/router 99.3% ±0.0
src/stores 98.9% ±0.0

Full report (HTML, merged profile) in the CI run artifacts

@M0Rf30 M0Rf30 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks. The privacy section is accurate against main (path without query, remote_addr, request_id, Terraform tickets in the path), the upgrade note is right, and TestSetupTelemetryBridgesLogsOnlyWhenLogsAreOn is a real behaviour test (the audit-only negative case is the useful one).

Still open from my #321 review, fine as a follow-up:

  1. No test that an error field becomes exception.message on the exported record (the docs state it; it relies on otelzap). E.g. Errorw(..., "error", err) and assert exception.message in the collector body.
  2. Document that a .Named() logger creates a new instrumentation scope, hence a new scope value on the drop counter (no .Named( in code today).

Nit: the test's doc comment should start with the test name.

@M0Rf30
M0Rf30 merged commit 8450be8 into main Oct 28, 2026
19 checks passed
@M0Rf30
M0Rf30 deleted the docs/otlp-logs-review-followup branch October 28, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants