sourcegraph/monitoring
Varun Gandhi 2c3e813a31
chore: Add tests documenting error invariants (#62992)
Based on the [discussion in Slack](https://sourcegraph.slack.com/archives/C02UC4WUX1Q/p1717067410264679),
 thought it would be useful to solidify the invariants that hold
between errors.As, errors.Is and errors.HasType
(and provide counter-examples for things which you think
ought to hold but don't actually hold) in code itself, instead of 
just via docs. So this PR adds property-based tests for
quickly generating different kinds of error shapes, and check
which invariants hold and which ones don't.

It also adds better documentation for errors.Is and errors.As
2024-06-03 19:46:53 +08:00
..
command bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
definitions fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
grafanaclient bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
monitoring fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
.gitattributes Add missing .gitattributes files for various generated files (#30092) 2022-01-25 16:36:21 +05:30
BUILD.bazel bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
CODENOTIFY chore: Remove old CODENOTIFY entries (#57658) 2023-10-17 09:49:21 +00:00
generate_config_test.sh shell: /bin/bash -> /usr/bin/env bash (#53000) 2023-06-06 13:51:55 +01:00
go.mod lib/enterpriseportal: initial service API for RFC 885 (#62263) 2024-05-15 12:58:55 -07:00
go.sum chore: Add tests documenting error invariants (#62992) 2024-06-03 19:46:53 +08:00
main.go logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
README.md fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02: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.