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

internal/trace: remove net/trace integration#53795

Merged
bobheadxi merged 3 commits into
mainfrom
trace-disable-net-trace-by-default
Jun 21, 2023
Merged

internal/trace: remove net/trace integration#53795
bobheadxi merged 3 commits into
mainfrom
trace-disable-net-trace-by-default

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Jun 20, 2023

Copy link
Copy Markdown
Member

Follow-up from https://github.com/sourcegraph/sourcegraph/pull/53435#issuecomment-1597050970 and INC-214 - this removes net/trace instrumentation entirely in the next release.

It seems this gets low usage and may be difficult to use, and it seems to introduce some risk and overhead. This will also make it easier to drop our internal trace wrapper entirely and/or integrate it as part of OpenTelemetry's APIs instead of having a proprietary way of doing traces.

Test plan

Already tested in https://github.com/sourcegraph/sourcegraph/pull/53435

@bobheadxi bobheadxi requested review from a team, camdencheek and keegancsmith June 20, 2023 19:13
@cla-bot cla-bot Bot added the cla-signed label Jun 20, 2023
@bobheadxi bobheadxi force-pushed the trace-disable-net-trace-by-default branch from 580d308 to 5c27fbf Compare June 20, 2023 19:14
@sourcegraph-bot

sourcegraph-bot commented Jun 20, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff f989f73...39e20e8.

Notify File(s)
@keegancsmith internal/debugserver/BUILD.bazel
internal/debugserver/debug.go
internal/trace/BUILD.bazel
internal/trace/trace.go
internal/trace/tracer.go
@sourcegraph/delivery doc/admin/observability/tracing.md
@sourcegraph/dev-experience internal/trace/BUILD.bazel
internal/trace/trace.go
internal/trace/tracer.go

@camdencheek camdencheek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a way we can set this somewhere in the UI (site settings maybe) rather than with an env var? Getting changes to deployments can be a pain, so this will be tough to use if we need customers to update their config and redeploy

@bobheadxi

Copy link
Copy Markdown
Member Author

Is there a way we can set this somewhere in the UI (site settings maybe) rather than with an env var? Getting changes to deployments can be a pain, so this will be tough to use if we need customers to update their config and redeploy

Was thinking this - we can set a context and global thing a la trace policy. Will take that for a spin

@bobheadxi bobheadxi marked this pull request as draft June 20, 2023 19:26

@keegancsmith keegancsmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd consider just ripping the code out TBH. Its so broken right now given how it integrates with all tracing that turning it on doesn't help. Last few times I tried to use it wasn't fun. There is a possibility someone relies on it for customers more regularly, but its unlikely.

cc @DaedalusG do you or anyone else in your crew ever use these endpoints? I checked and we don't actually document this as a way to get insights.

@DaedalusG

DaedalusG commented Jun 21, 2023

Copy link
Copy Markdown
Contributor

@keegancsmith I think net/trace is rarely if ever used. Jaeger traces are the most commonly used tracing. Sometimes the /debug/ page is used but its inconsistent across deployments so its rarely reached for first. I hate to rip out any observability but if its causing memory leaks it can probably go.

Last few times I tried to use it wasn't fun.

I try to avoid exposing this to customers for this reason. I think maybe some of our older admins and CE's maybe use it.

@bobheadxi

Copy link
Copy Markdown
Member Author

Alright - let's remove it entirely then :)

@bobheadxi bobheadxi changed the title internal/trace: disable net/trace by default internal/trace: remove net/trace integration Jun 21, 2023
@bobheadxi bobheadxi marked this pull request as ready for review June 21, 2023 16:31
@bobheadxi

Copy link
Copy Markdown
Member Author

Updated the PR to remove net/trace entirely, PTAL! @camdencheek this might make it easier to try and drop our internal/trace interface entirely as well

@camdencheek

Copy link
Copy Markdown
Member

integrate it as part of OpenTelemetry's APIs

FWIW, I spiked out an implementation that bridges x/net/trace with the OTel interfaces, so we could add this back in the future if we wanted even if we move to more raw OpenTelemetry APIs

Comment thread doc/admin/observability/tracing.md Outdated

### net/trace

> WARNING: `net/trace` instrumentation will be removed in Sourcegraph 5.2.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should we remove this in 5.1 if we're concerned about stability issues?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, yeah let's do that, especially if it's feasible to add back if needed

@bobheadxi bobheadxi enabled auto-merge (squash) June 21, 2023 16:51
@bobheadxi bobheadxi merged commit 61ce005 into main Jun 21, 2023
@bobheadxi bobheadxi deleted the trace-disable-net-trace-by-default branch June 21, 2023 18:35
github-actions Bot pushed a commit that referenced this pull request Jun 21, 2023
Follow-up from
https://github.com/sourcegraph/sourcegraph/pull/53435#issuecomment-1597050970
and INC-214 - this removes `net/trace` instrumentation entirely in the
next release.

It seems [this gets low usage and may be difficult to
use](https://github.com/sourcegraph/sourcegraph/pull/53795#pullrequestreview-1489890896),
and it seems to introduce some risk and overhead. This will also make it
easier to drop our internal trace wrapper entirely and/or integrate it
as part of OpenTelemetry's APIs instead of having a proprietary way of
doing traces.

## Test plan

Already tested in https://github.com/sourcegraph/sourcegraph/pull/53435

(cherry picked from commit 61ce005)
ErikaRS pushed a commit that referenced this pull request Jun 22, 2023
Follow-up from
https://github.com/sourcegraph/sourcegraph/pull/53435#issuecomment-1597050970
and INC-214 - this removes `net/trace` instrumentation entirely in the
next release.

It seems [this gets low usage and may be difficult to
use](https://github.com/sourcegraph/sourcegraph/pull/53795#pullrequestreview-1489890896),
and it seems to introduce some risk and overhead. This will also make it
easier to drop our internal trace wrapper entirely and/or integrate it
as part of OpenTelemetry's APIs instead of having a proprietary way of
doing traces.

## Test plan

Already tested in https://github.com/sourcegraph/sourcegraph/pull/53435
camdencheek referenced this pull request Jun 23, 2023
Follow-up from
https://github.com/sourcegraph/sourcegraph/pull/53435#issuecomment-1597050970
and INC-214 - this removes `net/trace` instrumentation entirely in the
next release.

It seems [this gets low usage and may be difficult to
use](https://github.com/sourcegraph/sourcegraph/pull/53795#pullrequestreview-1489890896),
and it seems to introduce some risk and overhead. This will also make it
easier to drop our internal trace wrapper entirely and/or integrate it
as part of OpenTelemetry's APIs instead of having a proprietary way
of doing traces.
sanderginn pushed a commit that referenced this pull request Jun 23, 2023
Follow-up from
https://github.com/sourcegraph/sourcegraph/pull/53435#issuecomment-1597050970
and INC-214 - this removes `net/trace` instrumentation entirely in the
next release.

It seems [this gets low usage and may be difficult to
use](https://github.com/sourcegraph/sourcegraph/pull/53795#pullrequestreview-1489890896),
and it seems to introduce some risk and overhead. This will also make it
easier to drop our internal trace wrapper entirely and/or integrate it
as part of OpenTelemetry's APIs instead of having a proprietary way of
doing traces.

## Test plan

Already tested in https://github.com/sourcegraph/sourcegraph/pull/53435
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.

5 participants