Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/semantic-conventions/mypy-1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova authored Jun 27, 2024
2 parents 3267cec + e09677f commit aa430d5
Show file tree
Hide file tree
Showing 74 changed files with 83 additions and 1,170 deletions.
5 changes: 4 additions & 1 deletion semantic-conventions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Please update the changelog as part of any significant pull request.

## Unreleased

## 0.24.0
- BREAKING: Remove unused semantic convention types: `UnitSemanticConvention`, `MetricGroupSemanticConvention` and `ScopeSemanticConvention`
([#309](https://github.com/open-telemetry/build-tools/pull/309))

## v0.24.0

- BREAKING: Add `stability` (required) and `deprecated` (optional) properties to `EnumMember`
([#267](https://github.com/open-telemetry/build-tools/pull/267))
Expand Down
13 changes: 6 additions & 7 deletions semantic-conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ for which we want to generate the table.
After `{semantic_convention_id}`, optional parameters enclosed in parentheses can be added to customize the output:

- `tag={tag}`: prints only the attributes that have `{tag}` as a tag;
- `full`: prints attributes and constraints inherited from the parent semantic conventions or from included ones;
- `full`: prints attributes inherited from the parent semantic conventions or from included ones;
- `ref`: prints attributes that are referenced from another semantic convention;
- `remove_constraint`: does not print additional constraints of the semantic convention.

By default markdown tables are rendered with stability badges (like ![Stable](https://img.shields.io/badge/-stable-lightgreen) or ![Experimental](https://img.shields.io/badge/-experimental-blue)) which can be disabled with `--md-disable-stable-badge`, `--md-disable-experimental-badge`, `--md-disable-deprecated-badge`.
When badges are disabled, the stability column contains plain text representation of stability or deprecation status.
Expand All @@ -74,18 +73,18 @@ When badges are disabled, the stability column contains plain text representatio

These examples assume that a semantic convention with the id `http.server` extends another semantic convention with the id `http`.

`<!-- semconv http.server -->` will print only the attributes and constraints of the `http.server` semantic
`<!-- semconv http.server -->` will print only the attributes of the `http.server` semantic
convention.

`<!-- semconv http.server(full) -->` will print the attributes and constraints of the `http` semantic
convention and also the attributes and constraints of the `http.server` semantic convention.
`<!-- semconv http.server(full) -->` will print the attributes of the `http` semantic
convention and also the attributes of the `http.server` semantic convention.

`<!-- semconv http.server() -->` is equivalent to `<!-- semconv http.server -->`.

`<!-- semconv http.server(tag=network) -->` will print the constraints and attributes of the `http.server` semantic
`<!-- semconv http.server(tag=network) -->` will print the attributes of the `http.server` semantic
convention that have the tag `network`.

`<!-- semconv http.server(tag=network, full) -->` will print the constraints and attributes of both `http` and `http.server`
`<!-- semconv http.server(tag=network, full) -->` will print the attributes of both `http` and `http.server`
semantic conventions that have the tag `network`.

`<!-- semconv metric.http.server.active_requests(metric_table) -->` will print a table describing a single metric
Expand Down
6 changes: 3 additions & 3 deletions semantic-conventions/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
black==24.3.0
black==24.4.2
mypy==1.10.0
pytest==8.1.1
pytest==8.2.2
flake8==7.0.0
pylint==3.1.0
pylint==3.2.3
isort==5.13.2
60 changes: 3 additions & 57 deletions semantic-conventions/semconv.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@
"span",
"resource",
"metric",
"metric_group",
"event",
"scope",
"attribute_group"
],
"description": "The (signal) type of the semantic convention"
Expand Down Expand Up @@ -84,51 +82,9 @@
},
"description": "list of attributes that belong to the semconv"
},
"constraints": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"any_of"
],
"properties": {
"any_of": {
"type": "array",
"description": " accepts a list of sequences. Each sequence contains a list of attribute ids that are required. any_of enforces that all attributes of at least one of the sequences are set.",
"items": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"include"
],
"properties": {
"include": {
"type": "string",
"description": "accepts a semantic conventions id. It includes as part of this semantic convention all constraints and required attributes that are not already defined in the current semantic convention."
}
}
}
]
}
"display_name": {
"type": "string",
"description": "the display name / title of the attribute group."
}
}
},
Expand Down Expand Up @@ -169,16 +125,6 @@
{"required": ["name"]}
]
},
"MetricGroupSemanticConvention": {
"allOf": [{ "$ref": "#/definitions/SemanticConventionBase" }],
"required": ["type"],
"properties": {
"type": {
"type": "string",
"const": "metric_group"
}
}
},
"MetricSemanticConvention": {
"allOf": [{ "$ref": "#/definitions/SemanticConventionBase" }],
"required": [
Expand Down

This file was deleted.

Loading

0 comments on commit aa430d5

Please sign in to comment.