sourcegraph/monitoring
Jean-Hadrien Chabran 3d36d34b3d
ci: re-enable race detection (#52776)
The previous approach to enable race detection was too radical and
accidently led to build our binaries with the race flage enabled, which
caused issues when building images down the line.

This happened because putting a `test --something` in bazelrc also sets
it on `build` which is absolutely not what we wanted. Usually folks get
this one working by having a `--stamp` config setting that fixes this
when releasing binaries, which we don't at this stage, as we're still
learning Bazel.

Luckily, this was caught swiftly. The current approach insteads takes a
more granular approach, which makes the `go_test` rule uses our own
variant, which injects the `race = "on"` attribute, but only on
`go_test`.


## Test plan

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

CI, being a main-dry-run, this will cover the container building jobs,
which were the ones failing.

---------

Co-authored-by: Alex Ostrikov <alex.ostrikov@sourcegraph.com>
2023-06-05 20:41:47 +02:00
..
command bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
definitions Revert "Revert "grpc: create interceptors to log / chart errors that seem like they come from go-grpc (#51749) (#52083)" (#52090) 2023-05-17 20:04:10 +00:00
grafanaclient bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
monitoring ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
.gitattributes Add missing .gitattributes files for various generated files (#30092) 2022-01-25 16:36:21 +05:30
BUILD.bazel Switch to OCI/Wolfi based image (#52693) 2023-06-02 12:12:52 +02:00
CODENOTIFY CODENOTIFY: re-route distribution subscriptions to delivery (#38524) 2022-07-11 02:47:45 +00:00
generate_config_test.sh Switch to OCI/Wolfi based image (#52693) 2023-06-02 12:12:52 +02:00
go.mod syntax-highlighter: initial ctags work (w/ musl scip-ctags) (#52643) 2023-05-30 17:19:39 -04:00
go.sum syntax-highlighter: initial ctags work (w/ musl scip-ctags) (#52643) 2023-05-30 17:19:39 -04:00
main.go ci: enable bazel builds for docker images (#51241) 2023-04-28 10:41:13 +02:00
README.md Update handbook links in doc (#26848) 2021-11-02 00:09:49 +08:00

Sourcegraph monitoring generator

This page documents usage (running the generator) and development (of the generator itself). For background and feature documentation, see the generator overview. To learn about how to find, add, and use monitoring, see the Sourcegraph observability developer guide.

Usage

From this directory:

go generate ./...

Logging output supports the Sourcegraph log level flags. Other configuration options can be customized via flags declared in main.go.

Development

The Sourcegraph monitoring generator consists of three components:

All features and capabilities for developed for the generator should align with the Sourcegraph monitoring pillars.