semantic-conventions/model
..
android
app
artifact
aspnetcore
aws
azure
browser
cassandra
cicd
cli
client
cloud
cloudevents
cloudfoundry
code
container
cpu
cpython
database
deployment
destination
device
disk
dns
dotnet
elasticsearch
enduser
error
event
exceptions
faas
feature-flags
file
gcp
gen-ai
geo
go
graphql
hardware
heroku
host
http
ios
jvm
k8s
kestrel
linux
log
mainframe
messaging
network
nfs
nodejs
oci
onc_rpc
openai
opentracing
os
otel
peer
pprof
process
profile
rpc
security-rule
server
service
session
signalr
source
system
telemetry
test
thread
tls
url
user
user-agent
v8js
vcs
webengine
zos
README.md
version.properties

README.md

YAML model for semantic conventions

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

[!NOTE]

If you want to read the semantic conventions and not edit them, please see the generated markdown output in the docs folder.

Writing semantic conventions

Semantic conventions for the spec MUST adhere to the naming, attribute requirement level, and metric requirement level conventions.

Refer to the syntax for how to write the YAML files for semantic conventions and what the YAML properties mean.

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 for what extension you need.

When defining semantic conventions, follow contributing guide:

  • If new attributes are necessary, define them in the attribute registry. 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 semantic convention groups for more details.

Generating markdown

These YAML files are used by the make targets attribute-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

make attribute-registry-generation table-generation

For more information, see the Weaver as our code generations tool.

Validating semantic conventions

Semantic conventions YAML files are validated by the check-policies make target for backward compatibility, name formatting, and other policies.

You can run it with the following command:

make check-policies

See also: