Skip to content

Migrate tracing to OpenTelemetry and add support for standard OTel env config #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

colega
Copy link
Contributor

@colega colega commented Jun 18, 2025

This migrates this app to use OpenTelemetry tracing library instead of OpenTracing, which has been deprecated for a while.

The app will now support standard 'OTEL_' environment variables as per OTel SDK docs, and the exposition in OTLP protocol.

…v config

This migrates this app to use OpenTelemetry tracing library instead of OpenTracing, which has been deprecated for a while.

The app will now support standard 'OTEL_' environment variables as per OTel SDK docs, and the exposition in OTLP protocol.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the app’s tracing implementation from OpenTracing to OpenTelemetry while adding support for standard OTEL environment variables.

  • Replace OpenTracing calls with OpenTelemetry invocations.
  • Update HTTP transport instrumentation and environment variables in deployment manifests.
  • Adjust dependency management in go.mod to include new OTel packages.

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/instrumentation/kubernetes_api_client.go Switches HTTP transport instrumentation to OpenTelemetry.
pkg/controller/controller.go Replaces OpenTracing span with OpenTelemetry tracer in reconcile.
pkg/admission/zone_tracker.go Updates tracing for config map operations using OpenTelemetry tracer.
pkg/admission/prep_downscale.go Migrates several OpenTracing spans to OpenTelemetry spans.
pkg/admission/no_downscale.go Introduces an OpenTelemetry tracer for the admission package.
go.mod Updates dependencies to include OpenTelemetry libraries.
development/rollout-operator-deployment.yaml Updates environment variables to support OTEL endpoints.
development/jaeger-service.yaml Removes Jaeger UDP port and adds OTLP HTTP endpoint.
cmd/rollout-operator/main.go Adapts service name configuration and initializes tracing accordingly.
CHANGELOG.md Documents the migration to OpenTelemetry.
Comments suppressed due to low confidence (1)

go.mod:9

  • [nitpick] Although the migration replaces direct OpenTracing calls, the opentracing dependencies are still present as indirect dependencies. If they are no longer needed, consider removing them to reduce dependency clutter.
	github.com/grafana/dskit v0.0.0-20250611075409-46f51e1ce914

Comment on lines +44 to +45
- name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
value: http://jaeger.rollout-operator-development.svc.cluster.local.:4318/v1/traces
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewers: jaeger also supports otlp, and I didn't replace it with something else because having something that has a frontend to query comes in handy in this dev env.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega merged commit e3a55a4 into main Jun 18, 2025
10 checks passed
@colega colega deleted the migrate-tracing-to-opentelemetry-and-add-support-for-standard-otel-env-config branch June 18, 2025 13:36
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