sourcegraph/internal/httpcli
Camden Cheek 084a10ba3b
Tracing: final cleanups (#54694)
This will be my last PR related to the backend tracing work I've been
doing. This is a set of small cleanups to the `trace` package that I've
collecting as I have worked on tracing and used tracing. Following this
PR, the `trace` package is just a very lightweight wrapper around the
standard OpenTelemetry APIs. I think it's best to keep the package
around rather than using opentelemetry directly because it easy to add
convenience methods (which I would be sad to lose).

Each commit is self-contained and has a descriptive message.

If anyone wants to pick up where I'm leaving off, here are a few things
left undone:
- Convert Zoekt to use OpenTelemetry rather than OpenTracing
- Add OpenTelemetry support to other services like syntect-server
- Merge the `internal/trace` and `internal/tracer` packages
- Consider adding a type that conforms to the OpenTelemetry `Span`
interface but also writes to `x/net/trace` that can be enabled when
tracing is not available.
- Remove unrelated code from the `trace` and `tracer` package (see
[here](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@a6759b95dbd8e5e3a604f7fd452b0b85f37091d9/-/blob/internal/tracer/tracer.go?L75-83)
and
[here](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@769fbbf5008e8decc63967dbff53f26333620265/-/blob/internal/trace/buckets.go?L3-7))
- Noodle on a `Traceable` interface (one that impls `Attr()` or
`Attrs()`) so types can be easily added with `SetAttributes()`
- Experiment with sampling
- Experiment with replacing `policy.ShouldTrace` with native
opentelemetry tools

## Test plan

Tested manually that tracing still looks good locally. Will test on
other instances when it rolls out.

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
2023-07-13 10:16:11 +02:00
..
BUILD.bazel Tracing: remove opentracing (#52978) 2023-06-06 11:02:15 -06:00
client_test.go Add handling for 429 Retry-After errors in httpcli (#51743) 2023-05-11 01:40:33 +02:00
client.go Tracing: final cleanups (#54694) 2023-07-13 10:16:11 +02:00
CODENOTIFY all: remove tsenart from CODENOTIFY (#41035) 2022-08-30 09:35:14 +02:00
doc.go Rename pkg to internal (#5898) 2019-10-07 15:36:41 -07:00
external.go Tracing: final cleanups (#54694) 2023-07-13 10:16:11 +02:00
noop_response_cache.go Use uncached doer for downloading packages (#48977) 2023-03-22 18:56:31 +00:00
redis_logger_middleware_test.go Fix bug where a nil reader could crash the redis middleware logger (#49571) 2023-03-17 09:53:10 +02:00
redis_logger_middleware.go Fix bug where a nil reader could crash the redis middleware logger (#49571) 2023-03-17 09:53:10 +02:00
transport.go httpcli: introduce mutable, wrapped transports (#39775) 2022-08-02 13:12:10 +00:00