Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

otlp: treat OTEL_EXPORTER_OTLP_ENDPOINT='' as OpenTelemetry being disabled#41243

Merged
bobheadxi merged 1 commit into
mainfrom
otel-disable
Sep 2, 2022
Merged

otlp: treat OTEL_EXPORTER_OTLP_ENDPOINT='' as OpenTelemetry being disabled#41243
bobheadxi merged 1 commit into
mainfrom
otel-disable

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Sep 2, 2022

Copy link
Copy Markdown
Member

We need a mechanism to disable OpenTelemetry by default even if it is enabled by default (#41242), most notably for sourcegraph/server (https://github.com/sourcegraph/sourcegraph/pull/41244)

Test plan

OTEL_EXPORTER_OTLP_ENDPOINT='' sg start

[         worker] WARN tracer tracer/tracer.go:163 failed to initialize tracer {"tracerType": "opentelemetry", "debug": false, "error": "please configure an exporter endpoint with OTEL_EXPORTER_OTLP_ENDPOINT"}

@cla-bot cla-bot Bot added the cla-signed label Sep 2, 2022
@sourcegraph-bot

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff af067ef...d02df75.

Notify File(s)
@keegancsmith internal/tracer/internal/exporters/otlp.go
internal/tracer/tracer.go
@sourcegraph/dev-experience internal/tracer/internal/exporters/otlp.go
internal/tracer/tracer.go

bobheadxi added a commit that referenced this pull request Sep 2, 2022
With jaeger no longer being the default tracing mechanism (#41242), this change removes jaeger from sourcegraph/server - it is disrecommended for production use, so I think this is probably fine - and also disables OpenTelemetry (#41243) in sourcegraph/server so we don't have to figure out an OpenTelemetry deployment for it (again, this image is not recommended for production use so I don't think we need to introduce advanced capabilities like OpenTelemetry out-of-the-box for it (there is some precedent for this - cAdvisor, for example, is not included in sourcegraph/server). Users can still configure an exporter with OTEL_EXPORTER_OTLP_ENDPOINT.

Co-authored-by: Sander Ginn <sander@ginn.it>
@bobheadxi bobheadxi merged commit 21e4732 into main Sep 2, 2022
@bobheadxi bobheadxi deleted the otel-disable branch September 2, 2022 15:17
efritz pushed a commit that referenced this pull request Sep 6, 2022
With jaeger no longer being the default tracing mechanism (#41242), this change removes jaeger from sourcegraph/server - it is disrecommended for production use, so I think this is probably fine - and also disables OpenTelemetry (#41243) in sourcegraph/server so we don't have to figure out an OpenTelemetry deployment for it (again, this image is not recommended for production use so I don't think we need to introduce advanced capabilities like OpenTelemetry out-of-the-box for it (there is some precedent for this - cAdvisor, for example, is not included in sourcegraph/server). Users can still configure an exporter with OTEL_EXPORTER_OTLP_ENDPOINT.

Co-authored-by: Sander Ginn <sander@ginn.it>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants