Skip to content

Latest commit

 

History

History
76 lines (52 loc) · 2.48 KB

DEVELOPMENT.md

File metadata and controls

76 lines (52 loc) · 2.48 KB

Synthetic Monitoring agent development

Building

Everything is built using:

$ make

this will include verifying the Go modules, so it hits the network. If you need to skip that step, you can use:

$ make build

The documentation for other targets is available thru:

$ make help

Linting

Code linters are run by using:

$ make lint

Because this can be slow, linting is not run as part of default lint target.

Tests

All the tests are run using:

$ make test

Code generation

Some of the code and support files are generated, especifically:

  • internal/scraper/testdata/*.txt
  • pkg/accounting/data.go
  • pkg/pb/synthetic_monitoring/checks.pb.go

In order to update internal/scraper/testdata/*.txt you can use the testdata target in the Makefile.

pkg/accounting/data.go and pkg/pb/synthetic_monitoring/checks.pb.go are updated by the generate target in the Makefile.

Code generation is not run automatically, but there are some tests that try to detect discrepancies.

Architecture

The agent obtains configuration information from the synthetic-monitoring-api and uses it to build a configuration for blackbox_exporter, which is how checks are executed.

agent process