command module
Version: v0.5.0 Latest Latest

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 15 Imported by: 0


Go Semantic Convention Generator

This tool is designed to generate constants in a semantic convention package for the Go API and the collector. It may be used by other systems, but it's primary function beyond invoking the template processor is to ensure that generated identifiers conform to Go's naming idiom, particularly with respect to initialisms and acronyms. Other users may be served just as well by using the template processor directly.


$ go get


$ semconvgen -i <path to spec YAML> -t <path to template> -o <path to output>

A full list of available options:

  -c, --container string   Container image ID (default "otel/semconvgen")
  -f, --filename string    Filename for templated output. If not specified 'basename(inputPath).go' will be used.
  -i, --input string       Path to semantic convention definition YAML. Should be a directory in the specification git repository.
  -o, --output string      Path to output target. Must be either an absolute path or relative to the repository root. If unspecified will output to a sub-directory with the name matching the version number specified via --specver flag.
  -s, --specver string     Version of semantic convention to generate. Must be an existing version tag in the specification git repository.
  -t, --template string    Template filename (default "template.j2")


The Go Gopher

There is no documentation for this package.

Source Files

Jump to

Keyboard shortcuts

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