mdatagen

command module
v0.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

README

Metadata Generator

Receivers can contain a metadata.yaml file that documents the metrics that may be emitted by the receiver.

Current examples:

  • hostmetricsreceiver scrapers like the cpuscraper

See metric-metadata.yaml for file format documentation.

If adding a new receiver a codegen.go file should also be added to trigger the generation. See below for details.

Build

When go generate is run (it is run automatically in the make build targets) there are a few special build directives in codegen.go files:

make install-tools results in cmd/mdatagen being installed to GOBIN

/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/codegen.go runs mdatagen for the hostmetricsreceiver metadata.yaml which generates the /receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata package which has Go files containing metric and label metadata.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
third_party

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL