Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ the respective markdown files.
If you want to update existing tables, just run the following commands:

```bash
make table-generation registry-generation
make generate-all
```

When defining new telemetry signals (spans, metrics, events, resources) in YAML,
Expand All @@ -187,7 +187,7 @@ code-snippet into the markdown file:
Then run markdown generation commands:

```bash
make table-generation registry-generation
make generate-all
```

#### Hugo frontmatter
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -343,3 +343,7 @@ areas-table-generation:
.PHONY: areas-table-check
areas-table-check:
docker run --rm -v ${PWD}:/repo -w /repo python:3-alpine python internal/tools/scripts/update-areas-table.py --install --check;

.PHONY: generate-all
generate-all: table-generation registry-generation areas-table-generation generate-gh-issue-templates

23 changes: 16 additions & 7 deletions model/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# YAML model for semantic conventions

The YAML descriptions of semantic convention contained in this directory are intended to
The YAML descriptions of semantic conventions contained in this directory are intended to
be used by the various OpenTelemetry language implementations to aid in automatic
generation of semantics-related code.

Expand All @@ -23,24 +23,33 @@ A schema file for VS code is configured in the `/.vscode/settings.json` of this
repository, enabling auto-completion and additional checks. Refer to
[the generator README](https://github.com/open-telemetry/weaver/blob/main/schemas/semconv-syntax.md) for what extension you need.

When defining semantic conventions, follow [contributing guide](/CONTRIBUTING.md#1-modify-the-yaml-model):
When defining semantic conventions, follow the [contributing guide](/CONTRIBUTING.md#1-modify-the-yaml-model):

- If new attributes are necessary, define them in the [attribute registry](/docs/registry/attributes/README.md).
Attributes can only be defined inside groups with `attribute_group` type and with `id` starting with `registry.` prefix.
- Define new spans, metrics, events, resources, and other conventions using appropriate group type. See
- Define new spans, metrics, events, resources, and other conventions using the appropriate group type. See
[semantic convention groups](/docs/general/semantic-convention-groups.md) for more details.

## Generating markdown

These YAML files are used by the make targets `attribute-registry-generation` and `table-generation` to generate consistently
These YAML files are used by the make targets `registry-generation` and `table-generation` to generate consistently
formatted Markdown tables for all semantic conventions in the specification. Run it from the root of this repository using the command

```bash
make registry-generation table-generation
```
make attribute-registry-generation table-generation

Or, for convenience, run

```bash
make generate-all
```

For more information, see the [Weaver](https://github.com/open-telemetry/weaver)
as our code generations tool.
that executes both targets along with other markdown generation targets that
update [areas](/AREAS.md) and GitHub area labels.

For more information, see [Weaver](https://github.com/open-telemetry/weaver)
as our code generation tool.

## Validating semantic conventions

Expand Down
Loading