mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:31:48 +00:00
Uses the refactors from #63528 and the new RPC proposed in #63531 to implement the existing GraphQL query for getting Cody Gateway usage stats using Enterprise Portal. Also adds some basic instrumentation on `codygatewayevents.Service`. Closes https://linear.app/sourcegraph/issue/CORE-201 Requires https://github.com/sourcegraph/managed-services/pull/1685 ## Test plan Without setting any new vars: ```sh $ sg run enterprise-portal # ... [enterprise-...l] WARN service.codygatewayevents service/codygatewayevents.go:11 CodyGatewayEvents service is not configured ``` Add to `sg.config.overwrite.yaml`: ```yaml enterprise-portal: env: CODY_GATEWAY_EVENTS_PROJECT_ID: telligentsourcegraph ``` The client auths by default credentials, so if you have access to the dataset everything will "just work". Request S2 data by subscription ID at `:6081/debug/grpcui/`: <img width="1065" alt="Screenshot 2024-06-28 at 1 55 49 PM" src="https://github.com/sourcegraph/sourcegraph/assets/23356519/29549807-c3e1-4a2a-a6e6-a2414687f3bc"> --------- Co-authored-by: Erik Seliger <erikseliger@me.com> |
||
|---|---|---|
| .. | ||
| codygatewayactor | ||
| codygatewayevents | ||
| BUILD.bazel | ||
| client_test.go | ||
| client.go | ||
| consts.go | ||
| types.go | ||