Skip to content

Add opt-in OpenTelemetry build tracing - #902

Merged
mzihlmann merged 6 commits into
mainfrom
mz-otel-instrumentation
Jul 29, 2026
Merged

Add opt-in OpenTelemetry build tracing#902
mzihlmann merged 6 commits into
mainfrom
mz-otel-instrumentation

Conversation

@mzihlmann

@mzihlmann mzihlmann commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Kaniko builds are opaque at fleet scale. There is no way to see where a build spent its time, which Dockerfile instructions keep busting the cache, or how feature flags change performance across many builds. This adds opt-in OpenTelemetry tracing so operators can ship that data to a collector they run.

It is off by default and a no-op unless KANIKO_TELEMETRY_ENDPOINT is set, so stock behaviour is unchanged. It never phones home to a hardcoded endpoint, and auth and fleet labels reuse the standard OTEL_EXPORTER_OTLP_HEADERS and OTEL_RESOURCE_ATTRIBUTES. Each build becomes one trace: a root span plus a span per timing phase, with cache hit or miss, cache key, instruction line, stage, and FF_KANIKO_* flags as attributes, and the Dockerfile attached verbatim. Spans stream as they end, so a build that is killed still reports what it finished, and a violated assertion flushes and is recorded on the build span before the panic escapes. Per-file hashing and snapshot sub-steps are kept out of the trace to avoid flooding it.

Summary by CodeRabbit

  • New Features
    • Added optional OpenTelemetry build tracing (spans for build phases and Dockerfile instructions) with build metadata, cache details, instruction source line numbers, and assertion-violation events.
    • Tracing is opt-in via KANIKO_TELEMETRY_ENDPOINT, supports standard OTEL collector auth and labeling variables, and exports “best effort” (disabled by default; never fails builds).
  • Bug Fixes
    • Improved timing instrumentation so push/build timers stop reliably on all return paths.
  • Documentation
    • Updated README with a new Telemetry section, configuration example, and environment variable reference.

@mzihlmann
mzihlmann marked this pull request as draft July 12, 2026 21:24
@mzihlmann
mzihlmann force-pushed the mz-otel-instrumentation branch from 3cd45d6 to 13375bd Compare July 12, 2026 21:24
@mzihlmann

mzihlmann commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator Author

Dependency footprint

The vendored diff looks large (~16.5k lines), but it is almost all generated OTLP proto/gRPC code, and the binary barely grows because the OTel SDK and gRPC are already linked into kaniko via the Google Cloud libraries. Adding trace export reuses that already-present code.

Binary size (executor, CGO_ENABLED=0 -ldflags '-w -s', linux/amd64):

build size delta
main 51,650,722 B (49.3 MB) baseline
this branch 52,224,162 B (49.8 MB) +560 KB (+1.1%)

New modules

Promoted indirect → direct (already in the graph via the GCP libraries, no new binary weight):

  • go.opentelemetry.io/otel, otel/sdk, otel/trace @ v1.44.0

Newly pulled in for OTLP/HTTP export:

  • go.opentelemetry.io/otel/exporters/otlp/otlptrace + .../otlptracehttp @ v1.44.0
  • go.opentelemetry.io/proto/otlp @ v1.10.0
  • github.com/grpc-ecosystem/grpc-gateway/v2 @ v2.29.0
  • github.com/cenkalti/backoff/v5 @ v5.0.3 (the exporter's retry backoff)

HTTP was chosen over the gRPC exporter deliberately: near-identical footprint (measured ~145 lines apart), but plain HTTP traverses restricted CI egress and proxies more reliably and matches the URL-style KANIKO_TELEMETRY_ENDPOINT.

Why grpc is pulled at all (upstream note)

Most of the vendored diff is grpc + grpc-gateway, pulled transitively by the OTLP proto package even though this is HTTP-only. That is a known upstream limitation: open-telemetry/opentelemetry-proto-go#100, "Split go.opentelemetry.io/proto module to exclude grpc dependencies". The generated collector/trace/v1 package bundles the message types, the gRPC service, and the grpc-gateway into one Go package, so importing the request type drags grpc and grpc-gateway.

It was resolved by publishing a grpc-free module, go.opentelemetry.io/proto/slim/otlp (its go.mod requires only google.golang.org/protobuf). But the otlptracehttp exporter still imports the grpc-bundled collector/trace/v1, so slim does not yet flow through to HTTP-only consumers. If/when the exporter adopts slim, this diff shrinks with no change on our side. The binary is unaffected either way, since the linker already strips the unused grpc/gateway paths.

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.95238% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/tracing/tracing.go 75.34% 13 Missing and 5 partials ⚠️
pkg/assert/assert.go 0.00% 5 Missing ⚠️
pkg/executor/build.go 88.37% 1 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@mzihlmann
mzihlmann marked this pull request as ready for review July 12, 2026 21:45
@mzihlmann
mzihlmann force-pushed the mz-otel-instrumentation branch 2 times, most recently from 8f681d5 to 7afff2a Compare July 12, 2026 21:51
@mzihlmann
mzihlmann requested review from 0hlov3, BobDu, babs and nejch July 12, 2026 21:53
@mzihlmann mzihlmann added the enhancement New feature or request label Jul 12, 2026
@mzihlmann

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change adds opt-in OpenTelemetry tracing around Kaniko builds, command and push timing, assertion events, OTLP export dependencies, vendored tracing infrastructure, and telemetry configuration documentation.

Changes

Build telemetry

Layer / File(s) Summary
Tracing lifecycle and instrumentation
cmd/executor/..., pkg/tracing/..., pkg/timing/..., pkg/executor/..., pkg/assert/..., README.md
Adds opt-in OTLP tracing, build and command span attributes, assertion events, timing coverage, lifecycle shutdown handling, and telemetry documentation.
Vendored telemetry and retry stack
vendor/go.opentelemetry.io/..., vendor/github.com/cenkalti/backoff/...
Adds the OTLP HTTP exporter, OpenTelemetry SDK trace pipeline, and retry/backoff implementation used by telemetry export.
Vendored gateway runtime
vendor/github.com/grpc-ecosystem/grpc-gateway/v2/...
Adds the vendored gRPC-Gateway runtime and supporting path, marshaling, metadata, routing, and query utilities.
Dependency registration
go.mod, vendor/modules.txt
Registers OpenTelemetry, OTLP protobuf, retry, and gRPC-Gateway modules and package paths.

Estimated code review effort: 5 (Critical) | ~120 minutes

Suggested labels: dependencies

Suggested reviewers: babs, bobdu, nejch

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the feature, but it does not follow the required template sections or include the checklist, fix reference, or release notes. Rewrite the PR body to match the template: add Fixes #NNN, a Description section, checklist items, Reviewer Notes, and Release Notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 69.15% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding opt-in OpenTelemetry build tracing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mz-otel-instrumentation

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/tracing/tracing.go`:
- Around line 61-84: The telemetry currently exports sensitive raw Dockerfile
and command text without an opt-out. In pkg/tracing/tracing.go:61-84, replace
the full kaniko.dockerfile.content attribute with bounded non-sensitive metadata
such as line count and the existing buildID hash, or gate raw capture behind an
explicit opt-in; in pkg/executor/build.go:574-596, apply the same policy to
kaniko.command, reusing commandHash when hashing; in README.md:1332-1343,
document the exact captured content and whether raw text requires opt-in.
- Around line 128-145: Update Shutdown to create a bounded context with an
explicit timeout before calling provider.Shutdown, and ensure the context is
canceled afterward. Replace context.Background() in the provider shutdown path
while preserving the existing warning log and cleanup behavior.
- Line 72: Remove the global otel.SetTracerProvider(provider) registration from
the tracing initialization flow, keeping the provider local to the kaniko
tracing components that explicitly use it. Ensure cloud.google.com/go/storage
and other unrelated libraries do not inherit this provider or export spans to
KANIKO_TELEMETRY_ENDPOINT.

In `@README.md`:
- Around line 1332-1343: Update the README Telemetry section to explicitly
disclose that telemetry exports the full Dockerfile content and each command’s
raw string as span attributes to the configured KANIKO_TELEMETRY_ENDPOINT,
including third-party collectors. Place this warning alongside the existing
description of exported trace data and preserve the documented best-effort
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: aa51289c-343f-4db5-ab51-9556917a3bc4

📥 Commits

Reviewing files that changed from the base of the PR and between 2e022c8 and 7afff2a.

⛔ Files ignored due to path filters (10)
  • go.sum is excluded by !**/*.sum
  • vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.gw.go is excluded by !**/*.pb.gw.go
  • vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service_grpc.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/resource/v1/resource.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go is excluded by !**/*.pb.go
  • vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go is excluded by !**/*.pb.go
  • vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go is excluded by !**/*.pb.go
  • vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (97)
  • README.md
  • cmd/executor/cmd/root.go
  • go.mod
  • pkg/executor/build.go
  • pkg/executor/push.go
  • pkg/timing/timing.go
  • pkg/tracing/tracing.go
  • pkg/util/assert.go
  • vendor/github.com/cenkalti/backoff/v5/.gitignore
  • vendor/github.com/cenkalti/backoff/v5/CHANGELOG.md
  • vendor/github.com/cenkalti/backoff/v5/LICENSE
  • vendor/github.com/cenkalti/backoff/v5/README.md
  • vendor/github.com/cenkalti/backoff/v5/backoff.go
  • vendor/github.com/cenkalti/backoff/v5/error.go
  • vendor/github.com/cenkalti/backoff/v5/exponential.go
  • vendor/github.com/cenkalti/backoff/v5/retry.go
  • vendor/github.com/cenkalti/backoff/v5/ticker.go
  • vendor/github.com/cenkalti/backoff/v5/timer.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/query.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/README.md
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/tls.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/README.md
  • vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/event.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/link.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
  • vendor/go.opentelemetry.io/proto/otlp/LICENSE
  • vendor/modules.txt

Comment thread pkg/tracing/tracing.go
Comment thread pkg/tracing/tracing.go Outdated
Comment thread pkg/tracing/tracing.go
Comment thread README.md
@mzihlmann
mzihlmann force-pushed the mz-otel-instrumentation branch from 7afff2a to 2b7031c Compare July 15, 2026 08:36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/util/assert.go`:
- Around line 53-69: Update notifyViolation and the assertion paths that call it
so the assertion hook does not synchronously shut down tracing before panic
unwinding completes. Defer the violation callback until deferred cleanup such as
timing.DefaultRun.Stop and span.End has finished, while preserving the existing
violation name and message passed to OnAssertionViolation.

In
`@vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go`:
- Around line 31-33: Correct the Go documentation for the Enabled field in the
retry configuration so it states that Enabled: true enables retrying failed
batch exports. Update the source template that generates this file, then
regenerate the generated retry.go output to keep both aligned.
- Around line 102-113: Update the retry loop around b.NextBackOff and the
computed delay so MaxElapsedTime validation uses the actual wait duration,
delay, rather than throttle. Apply the same correction in the generated source
template, then regenerate the vendor retry file while preserving existing error
propagation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2749c7e6-92ec-44d2-b1cb-8b4e0adaccfa

📥 Commits

Reviewing files that changed from the base of the PR and between 7afff2a and 2b7031c.

⛔ Files ignored due to path filters (10)
  • go.sum is excluded by !**/*.sum
  • vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.gw.go is excluded by !**/*.pb.gw.go
  • vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service_grpc.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/resource/v1/resource.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go is excluded by !**/*.pb.go
  • vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go is excluded by !**/*.pb.go
  • vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go is excluded by !**/*.pb.go
  • vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (97)
  • README.md
  • cmd/executor/cmd/root.go
  • go.mod
  • pkg/executor/build.go
  • pkg/executor/push.go
  • pkg/timing/timing.go
  • pkg/tracing/tracing.go
  • pkg/util/assert.go
  • vendor/github.com/cenkalti/backoff/v5/.gitignore
  • vendor/github.com/cenkalti/backoff/v5/CHANGELOG.md
  • vendor/github.com/cenkalti/backoff/v5/LICENSE
  • vendor/github.com/cenkalti/backoff/v5/README.md
  • vendor/github.com/cenkalti/backoff/v5/backoff.go
  • vendor/github.com/cenkalti/backoff/v5/error.go
  • vendor/github.com/cenkalti/backoff/v5/exponential.go
  • vendor/github.com/cenkalti/backoff/v5/retry.go
  • vendor/github.com/cenkalti/backoff/v5/ticker.go
  • vendor/github.com/cenkalti/backoff/v5/timer.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/query.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/README.md
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/tls.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/README.md
  • vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/event.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/link.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
  • vendor/go.opentelemetry.io/proto/otlp/LICENSE
  • vendor/modules.txt
🚧 Files skipped from review as they are similar to previous changes (87)
  • vendor/go.opentelemetry.io/otel/sdk/trace/README.md
  • vendor/github.com/cenkalti/backoff/v5/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/event.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md
  • vendor/go.opentelemetry.io/otel/sdk/trace/link.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go
  • vendor/github.com/cenkalti/backoff/v5/timer.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/README.md
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
  • vendor/github.com/cenkalti/backoff/v5/ticker.go
  • vendor/go.opentelemetry.io/proto/otlp/LICENSE
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/LICENSE
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go
  • vendor/github.com/cenkalti/backoff/v5/error.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go
  • vendor/modules.txt
  • vendor/github.com/cenkalti/backoff/v5/retry.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
  • pkg/executor/push.go
  • cmd/executor/cmd/root.go
  • vendor/github.com/cenkalti/backoff/v5/exponential.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
  • README.md
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
  • vendor/github.com/cenkalti/backoff/v5/CHANGELOG.md
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
  • vendor/github.com/cenkalti/backoff/v5/backoff.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
  • pkg/tracing/tracing.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
  • pkg/executor/build.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go
  • go.mod
  • pkg/timing/timing.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go

Comment thread pkg/assert/assert.go

@0hlov3 0hlov3 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.

LGTM, we need to merge #913 aswell.

@mzihlmann
mzihlmann force-pushed the mz-otel-instrumentation branch from 2b7031c to 7590710 Compare July 16, 2026 21:48

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
pkg/assert/assert.go (1)

28-28: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the exported callback.

Add a Go doc comment explaining when OnAssertionViolation runs and that it must not panic or block. As per coding guidelines, “Non-internal, non-test packages should have Go doc comments, usually in doc.go.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/assert/assert.go` at line 28, Document the exported OnAssertionViolation
callback with a Go doc comment, preferably in the package documentation,
describing when it is invoked and stating that the callback must not panic or
block.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go`:
- Around line 309-315: Update the float64 branch in the enum unmarshaling switch
to validate that the JSON number is integral and within the int32 range before
converting and assigning it to rv. Return an unmarshaling error for fractional
or out-of-range values; preserve successful assignment for valid enum numbers.

---

Nitpick comments:
In `@pkg/assert/assert.go`:
- Line 28: Document the exported OnAssertionViolation callback with a Go doc
comment, preferably in the package documentation, describing when it is invoked
and stating that the callback must not panic or block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7a6aa67e-dd83-4a02-aa4f-ec3589ac9abf

📥 Commits

Reviewing files that changed from the base of the PR and between 2b7031c and 7590710.

⛔ Files ignored due to path filters (10)
  • go.sum is excluded by !**/*.sum
  • vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.gw.go is excluded by !**/*.pb.gw.go
  • vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service_grpc.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/resource/v1/resource.pb.go is excluded by !**/*.pb.go
  • vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go is excluded by !**/*.pb.go
  • vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go is excluded by !**/*.pb.go
  • vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go is excluded by !**/*.pb.go
  • vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (97)
  • README.md
  • cmd/executor/cmd/root.go
  • go.mod
  • pkg/assert/assert.go
  • pkg/executor/build.go
  • pkg/executor/push.go
  • pkg/timing/timing.go
  • pkg/tracing/tracing.go
  • vendor/github.com/cenkalti/backoff/v5/.gitignore
  • vendor/github.com/cenkalti/backoff/v5/CHANGELOG.md
  • vendor/github.com/cenkalti/backoff/v5/LICENSE
  • vendor/github.com/cenkalti/backoff/v5/README.md
  • vendor/github.com/cenkalti/backoff/v5/backoff.go
  • vendor/github.com/cenkalti/backoff/v5/error.go
  • vendor/github.com/cenkalti/backoff/v5/exponential.go
  • vendor/github.com/cenkalti/backoff/v5/retry.go
  • vendor/github.com/cenkalti/backoff/v5/ticker.go
  • vendor/github.com/cenkalti/backoff/v5/timer.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/query.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/README.md
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/tls.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/README.md
  • vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/event.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/link.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
  • vendor/go.opentelemetry.io/proto/otlp/LICENSE
  • vendor/modules.txt
🚧 Files skipped from review as they are similar to previous changes (82)
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE
  • vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/link.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go
  • vendor/github.com/cenkalti/backoff/v5/timer.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/README.md
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/event.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go
  • vendor/go.opentelemetry.io/proto/otlp/LICENSE
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/README.md
  • vendor/github.com/cenkalti/backoff/v5/error.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
  • vendor/github.com/cenkalti/backoff/v5/exponential.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
  • vendor/github.com/cenkalti/backoff/v5/ticker.go
  • pkg/executor/build.go
  • pkg/executor/push.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go
  • vendor/github.com/cenkalti/backoff/v5/retry.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go
  • vendor/github.com/cenkalti/backoff/v5/backoff.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go
  • README.md
  • cmd/executor/cmd/root.go
  • pkg/timing/timing.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go
  • vendor/modules.txt
  • vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/span.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go
  • pkg/tracing/tracing.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
  • go.mod
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
  • vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go

@mzihlmann
mzihlmann force-pushed the mz-otel-instrumentation branch from 7590710 to 3d2d706 Compare July 19, 2026 10:36
- stop timers on all error paths so failed builds and --dryrun export
  their spans; the failing command's span was the one being dropped
- bound the exit flush to 5s and print the error before flushing
- flush on logrus.Fatal via an exit handler
@mzihlmann
mzihlmann force-pushed the mz-otel-instrumentation branch from 3d2d706 to 6868d5e Compare July 19, 2026 10:56
babs added 2 commits July 19, 2026 12:54
kaniko reads its tracer from the provider directly. The global
registration would silently switch on client spans in the vendored
GCS and GCR transports, polluting the trace.
- content-address build_id so it is not constant across a fleet
- low-cardinality "Command" span name, full text stays in kaniko.command
- classify phase by command type so cached RUNs are not "build"
- emit kaniko.stage as an int
- emit kaniko.cache.hit only when caching is on
- strip the FF_KANIKO_ prefix from kaniko.ff.* keys
@mzihlmann

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mzihlmann
mzihlmann requested a review from 0hlov3 July 24, 2026 09:17
@mzihlmann

Copy link
Copy Markdown
Collaborator Author

@0hlov3 I ported some changes from @babs in for this first implementation, does the approval still stand? I'd rather clarify as the title "telemetry" might give some members of the community flashbacks.

Forward KANIKO_TELEMETRY_ENDPOINT / OTEL_EXPORTER_OTLP_HEADERS /
OTEL_RESOURCE_ATTRIBUTES from the CI environment into every executor run via
KanikoEnv, and set them in the integration-tests workflow from the repo
variable/secret. Empty when unset (e.g. fork PRs) so tracing.Init no-ops and
builds still pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@0hlov3 0hlov3 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.

LGTM.

@mzihlmann
mzihlmann merged commit 7875272 into main Jul 29, 2026
22 of 25 checks passed
@mzihlmann
mzihlmann deleted the mz-otel-instrumentation branch July 29, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants