sourcegraph/lib
Robert Lin 5fa93155fc
telemetry-gateway: migrate to MSP runtime (#58814)
This change migrates Telemetry Gateway to use the MSP runtime library for service initialization, which now handles Sentry, OpenTelemetry, etc and offers a simpler interface for defining services.

Because we now only expose 1 port (i.e. no debugserver port), I've made the default in local dev `6080`, because my browser was complaining about `10080`.

## Test plan

```sh
sg run telemetry-gateway
curl http://localhost:6080/-/version
# 0.0.0+dev%                                                  
curl http://localhost:6080/-/healthz
# unauthorized%                                              
curl -H 'Authorization: bearer sekret' http://localhost:6080/-/healthz
# healthz: ok%                                            
```

Also visit http://localhost:6080/debug/grpcui/ and http://localhost:6080/metrics, which are expected to be enabled in local dev.

Then try with full Sourcegraph stack:

```
sg start
```

<img width="660" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/23356519/9e799c58-4d02-4752-9f9f-da3108ba762f">
2023-12-08 12:14:34 -08:00
..
api enterprise: Move last directory out (#57392) 2023-10-05 20:15:40 +00:00
background telemetry-gateway: migrate to MSP runtime (#58814) 2023-12-08 12:14:34 -08:00
batches code-search: handle changeset fork when creating a batch change via src-cli (#58156) 2023-11-08 09:55:05 +01:00
cliutil sg: improve positional completions (#58569) 2023-11-27 16:30:59 -08:00
codeintel Cleanup: use new go 1.21 features (#58617) 2023-11-28 13:49:38 -07:00
errors migrator: exit 0 if autoupgrade set on up (#53175) 2023-06-13 20:51:09 +00:00
gitservice gitservice: use an error hook instead of a logger (#56611) 2023-09-14 12:36:05 +02:00
iterator ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
managedservicesplatform telemetry-gateway: migrate to MSP runtime (#58814) 2023-12-08 12:14:34 -08:00
output lib/output: Remove Style interface (#54163) 2023-06-26 14:32:23 +00:00
pointers dev/msp: add CloudSQL integration (#58420) 2023-11-22 15:32:53 -08:00
process vcssyncer: Move clone implementation details into syncer (#57688) 2023-10-27 20:55:59 +02:00
servicecatalog Remove GitHub proxy service (#56485) 2023-09-14 19:43:40 +02:00
go.mod msp/runtime: add OpenTelemetry, make submodule (#58518) 2023-11-24 21:26:17 +00:00
go.sum msp/runtime: add OpenTelemetry, make submodule (#58518) 2023-11-24 21:26:17 +00:00
README.md lib: Introduce non-enterprise lib directory (#18992) 2021-03-10 19:41:33 -06:00
tools.go build with go 1.17 (#24566) 2021-09-03 14:46:55 +00:00

Sourcegraph lib module

This directory is the root of a separate go module from the primary module rooted at sourcegraph/sourcegraph. This module exists to hold code that we want to reuse outside of the sourcegraph/sourcegraph repo.

Code in this module should not import from sourcegraph/sourcegraph or from other Sourcegraph repositories to avoid complicated dependency relationships. Instead consider moving code from elsewhere into this module.