Skip to content

Commit 30f71c6

Browse files
Liudmila Molkovatraskjoaopgrassi
authored
[editorial] A few random doc fixes (#1704)
Co-authored-by: Trask Stalnaker <[email protected]> Co-authored-by: Joao Grassi <[email protected]>
1 parent 05b4c17 commit 30f71c6

File tree

10 files changed

+62
-35
lines changed

10 files changed

+62
-35
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ requirements and recommendations.
2020
- [Schema files](#schema-files)
2121
- [2. Update the markdown files](#2-update-the-markdown-files)
2222
- [Hugo frontmatter](#hugo-frontmatter)
23-
- [3. Verify the changes before committing](#3-verify-the-changes-before-committing)
24-
- [4. Changelog](#4-changelog)
23+
- [3. Check new convention](#3-check-new-convention)
24+
- [4. Verify the changes before committing](#4-verify-the-changes-before-committing)
25+
- [5. Changelog](#5-changelog)
2526
- [When to add a Changelog Entry](#when-to-add-a-changelog-entry)
2627
- [Examples](#examples)
2728
- [Adding a Changelog Entry](#adding-a-changelog-entry)
@@ -32,7 +33,6 @@ requirements and recommendations.
3233
- [Markdown style](#markdown-style)
3334
- [Misspell check](#misspell-check)
3435
- [Markdown link check](#markdown-link-check)
35-
- [Version compatibility check](#version-compatibility-check)
3636
- [Updating the referenced specification version](#updating-the-referenced-specification-version)
3737
- [Making a Release](#making-a-release)
3838
- [Merging existing ECS conventions](#merging-existing-ecs-conventions)
@@ -126,6 +126,8 @@ The YAML (model definition) and Markdown (documentation) files are organized in
126126
│ │ ├── ....md
127127
├── model
128128
│ ├── {root-namespace}
129+
│ │ ├── deprecated
130+
│ │ | ├── registry-deprecated.yaml
129131
│ │ ├── events.yaml
130132
│ │ ├── metrics.yaml
131133
│ │ ├── registry.yaml
@@ -146,6 +148,9 @@ HTTP spans are defined in `model/http/spans.yaml`.
146148
YAML definitions could be broken down into multiple files. For example, AWS spans
147149
are defined in `/model/aws/lambda-spans.yaml` and `/model/aws/sdk-spans.yaml` files.
148150

151+
Deprecated conventions should be placed under `/model/{root-namespace}/deprecated`
152+
folder.
153+
149154
#### Schema files
150155

151156
When making changes to existing semantic conventions (attributes, metrics, etc)
@@ -157,6 +162,7 @@ For details, please read
157162
You can also take examples from past changes inside the `schemas` folder.
158163

159164
> [!WARNING]
165+
>
160166
> DO NOT add your changes to files inside the `schemas` folder. Always add your
161167
> changes to the `schema-next.yaml` file.
162168
@@ -187,7 +193,21 @@ When creating new markdown files, you should provide the `linkTitle` attribute.
187193
This is used to generate the navigation bar on the website,
188194
and will be listed relative to the "parent" document.
189195

190-
### 3. Verify the changes before committing
196+
### 3. Check new convention
197+
198+
Semantic conventions are validated for name formatting and backward compatibility with last released versions.
199+
Here's [the full list of compatibility checks](./policies/compatibility.rego).
200+
201+
Removing attributes, metrics, or enum members is not allowed, they should be deprecated instead.
202+
It applies to stable and experimental conventions and prevents semantic conventions auto-generated libraries from introducing breaking changes.
203+
204+
You can run backward compatibility check (along with other policies) in all yaml files with the following command:
205+
206+
```bash
207+
make check-policies
208+
```
209+
210+
### 4. Verify the changes before committing
191211

192212
Before sending a PR with your changes, make sure to run the automated checks:
193213

@@ -198,7 +218,7 @@ make check
198218
Alternatively, you can run each check individually.
199219
Refer to the [Automation](#automation) section for more details.
200220

201-
### 4. Changelog
221+
### 5. Changelog
202222

203223
#### When to add a Changelog Entry
204224

@@ -361,18 +381,6 @@ To check the validity of links in all markdown files, run the following command:
361381
make markdown-link-check
362382
```
363383

364-
### Version compatibility check
365-
366-
Semantic conventions are validated for backward compatibility with last released versions. Here's [the full list of compatibility checks](./policies/compatibility.rego).
367-
Removing attributes, metrics, or enum members is not allowed, they should be deprecated instead.
368-
It applies to stable and experimental conventions and prevents semantic conventions auto-generated libraries from introducing breaking changes.
369-
370-
You can run backward compatibility check (along with other policies) in all yaml files with the following command:
371-
372-
```bash
373-
make check-policies
374-
```
375-
376384
## Updating the referenced specification version
377385

378386
1. Open the `./internal/tools/update_specification_version.sh` script.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ fix-format:
183183
# Run all checks in order of speed / likely failure.
184184
# As a last thing, run attribute registry generation and git-diff for differences.
185185
.PHONY: check
186-
check: misspell markdownlint check-format markdown-toc compatibility-check markdown-link-check check-policies attribute-registry-generation
186+
check: misspell markdownlint check-format markdown-toc markdown-link-check check-policies attribute-registry-generation
187187
git diff --exit-code ':*.md' || (echo 'Generated markdown Table of Contents is out of date, please run "make markdown-toc" and commit the changes in this PR.' && exit 1)
188188
@echo "All checks complete"
189189

docs/attributes-registry/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ The attributes registry is the place where attributes are defined. An attribute
1616
- a `brief` description of the attribute and optionally a longer `note`
1717
- example values
1818

19-
Attributes defined in the registry can be used in different semantic conventions. Attributes should be included in this registry before they are used in semantic conventions. Semantic conventions may override all the properties of an attribute except for the `id` and `type` in case it's required for a particular context. In addition, semantic conventions specify the requirement level of an attribute in the corresponding context.
19+
Attributes defined in the registry can be used in different semantic conventions. Attributes should be included in this registry before they are used in semantic conventions. Semantic conventions may override all the properties of an attribute except for the `id`, `type` and `stability` in case it's required for a particular context. In addition, semantic conventions specify the requirement level of an attribute in the corresponding context.
2020

2121
A definition of an attribute in the registry doesn't necessarily imply that the attribute is used in any of the semantic conventions.
2222

2323
If applicable, application developers are encouraged to use existing attributes from this registry. See also [these recommendations][developers recommendations] regarding attribute selection and attribute naming for custom use cases.
2424

2525
All registered attributes are listed by namespace in this registry.
2626

27-
> **Warning**
27+
> [!WARNING]
28+
>
2829
> The following registry overview is a work in progress.
2930
>
3031
> Further attribute namespaces are currently being migrated and will appear in this registry soon.
@@ -45,12 +46,12 @@ Currently, the following namespaces exist:
4546
- [Code](code.md)
4647
- [Container](container.md)
4748
- [CPU](cpu.md)
48-
- [Db](db.md)
49+
- [DB](db.md)
4950
- [Deployment](deployment.md)
5051
- [Destination](destination.md)
5152
- [Device](device.md)
5253
- [Disk](disk.md)
53-
- [Dns](dns.md)
54+
- [DNS](dns.md)
5455
- [Dotnet](dotnet.md)
5556
- [Enduser](enduser.md)
5657
- [Error](error.md)

docs/attributes-registry/db.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
55
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->
66

7-
# Db
7+
# DB
88

99
- [General Database Attributes](#general-database-attributes)
1010
- [Cassandra Attributes](#cassandra-attributes)

docs/attributes-registry/dns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
55
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->
66

7-
# Dns
7+
# DNS
88

99
## DNS Attributes
1010

docs/gen-ai/gen-ai-events.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@ linkTitle: Generative AI events
2525

2626
GenAI instrumentations MAY capture user inputs sent to the model and responses received from it as [events](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/specification/logs/api.md#emit-an-event).
2727

28-
<<<<<<< HEAD
29-
> [!NOTE]
30-
> Event API is experimental and not yet available in some languages. Check [spec-compliance matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md#events) to see the implementation status in corresponding language.
31-
=======
3228
> Note:
3329
> Event API is experimental and not yet available in some languages. Check [spec-compliance matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.40.0/spec-compliance-matrix.md#logs) to see the implementation status in corresponding language.
34-
>>>>>>> 75746bc9 (reword)
3530
3631
Instrumentations MAY capture inputs and outputs if and only if application has enabled the collection of this data.
3732
This is for three primary reasons:
File renamed without changes.

model/README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ The YAML descriptions of semantic convention contained in this directory are int
44
be used by the various OpenTelemetry language implementations to aid in automatic
55
generation of semantics-related code.
66

7-
⚠ If you want to read the semantic conventions and not edit them, please see
8-
the generated markdown output in the [docs](../docs/README.md) folder.
7+
> [!NOTE]
8+
>
9+
> If you want to read the semantic conventions and not edit them, please see
10+
> the generated markdown output in the [docs](../docs/README.md) folder.
911
1012
## Writing semantic conventions
1113

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

26+
When defining semantic conventions, follow [contributing guide](/CONTRIBUTING.md#1-modify-the-yaml-model):
27+
28+
- If new attributes are necessary, define them in the [attribute registry](/docs/attributes-registry/README.md).
29+
Attributes can only be defined inside groups with `attribute_group` type and with `id` starting with `registry.` prefix.
30+
- Define new spans, metrics, events, resources, and other conventions using appropriate group type. See
31+
[semantic convention groups](/docs/general/semantic-convention-groups.md) for more details.
32+
2433
## Generating markdown
2534

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

2938
```
30-
make table-generation
39+
make attribute-registry-generation table-generation
3140
```
3241

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

45+
## Validating semantic conventions
46+
47+
Semantic conventions YAML files are validated by the `check-policies` make target for backward compatibility,
48+
name formatting, and other policies.
49+
50+
You can run it with the following command:
51+
52+
```
53+
make check-policies
54+
```
55+
3656
See also:
3757

3858
* [Markdown Templates](../templates/registry/markdown)

templates/registry/markdown/readme.md.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ The attributes registry is the place where attributes are defined. An attribute
1717
- a `brief` description of the attribute and optionally a longer `note`
1818
- example values
1919

20-
Attributes defined in the registry can be used in different semantic conventions. Attributes should be included in this registry before they are used in semantic conventions. Semantic conventions may override all the properties of an attribute except for the `id` and `type` in case it's required for a particular context. In addition, semantic conventions specify the requirement level of an attribute in the corresponding context.
20+
Attributes defined in the registry can be used in different semantic conventions. Attributes should be included in this registry before they are used in semantic conventions. Semantic conventions may override all the properties of an attribute except for the `id`, `type` and `stability` in case it's required for a particular context. In addition, semantic conventions specify the requirement level of an attribute in the corresponding context.
2121

2222
A definition of an attribute in the registry doesn't necessarily imply that the attribute is used in any of the semantic conventions.
2323

2424
If applicable, application developers are encouraged to use existing attributes from this registry. See also [these recommendations][developers recommendations] regarding attribute selection and attribute naming for custom use cases.
2525

2626
All registered attributes are listed by namespace in this registry.
2727

28-
> **Warning**
28+
> [!WARNING]
29+
>
2930
> The following registry overview is a work in progress.
3031
>
3132
> Further attribute namespaces are currently being migrated and will appear in this registry soon.

templates/registry/markdown/weaver.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ acronyms:
1414
- CLR
1515
- CPU
1616
- CSI
17+
- DB
18+
- DNS
1719
- DynamoDB
1820
- ECS
1921
- EKS

0 commit comments

Comments
 (0)