Skip to content

Commit d981cf1

Browse files
author
Liudmila Molkova
authored
Switch to weaver to generate semantic conventions (#4091)
1 parent 2c85dbd commit d981cf1

37 files changed

+530
-543
lines changed

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/aws_attributes.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -219,70 +219,70 @@
219219
"""
220220
The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations.
221221
Note: The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter.
222-
This applies to almost all S3 operations except `list-buckets`.
222+
This applies to almost all S3 operations except `list-buckets`.
223223
"""
224224

225225
AWS_S3_COPY_SOURCE: Final = "aws.s3.copy_source"
226226
"""
227227
The source object (in the form `bucket`/`key`) for the copy operation.
228228
Note: The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter
229-
of the [copy-object operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
230-
This applies in particular to the following operations:
229+
of the [copy-object operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
230+
This applies in particular to the following operations:
231231
232-
- [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
233-
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
232+
- [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
233+
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
234234
"""
235235

236236
AWS_S3_DELETE: Final = "aws.s3.delete"
237237
"""
238238
The delete request container that specifies the objects to be deleted.
239239
Note: The `delete` attribute is only applicable to the [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) operation.
240-
The `delete` attribute corresponds to the `--delete` parameter of the
241-
[delete-objects operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
240+
The `delete` attribute corresponds to the `--delete` parameter of the
241+
[delete-objects operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
242242
"""
243243

244244
AWS_S3_KEY: Final = "aws.s3.key"
245245
"""
246246
The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations.
247247
Note: The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter.
248-
This applies in particular to the following operations:
249-
250-
- [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
251-
- [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
252-
- [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
253-
- [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
254-
- [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
255-
- [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
256-
- [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
257-
- [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
258-
- [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
259-
- [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
260-
- [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
261-
- [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
262-
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
248+
This applies in particular to the following operations:
249+
250+
- [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
251+
- [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
252+
- [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
253+
- [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
254+
- [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
255+
- [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
256+
- [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
257+
- [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
258+
- [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
259+
- [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
260+
- [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
261+
- [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
262+
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
263263
"""
264264

265265
AWS_S3_PART_NUMBER: Final = "aws.s3.part_number"
266266
"""
267267
The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000.
268268
Note: The `part_number` attribute is only applicable to the [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
269-
and [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) operations.
270-
The `part_number` attribute corresponds to the `--part-number` parameter of the
271-
[upload-part operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
269+
and [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) operations.
270+
The `part_number` attribute corresponds to the `--part-number` parameter of the
271+
[upload-part operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
272272
"""
273273

274274
AWS_S3_UPLOAD_ID: Final = "aws.s3.upload_id"
275275
"""
276276
Upload ID that identifies the multipart upload.
277277
Note: The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter
278-
of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) multipart operations.
279-
This applies in particular to the following operations:
280-
281-
- [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
282-
- [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
283-
- [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
284-
- [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
285-
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
278+
of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) multipart operations.
279+
This applies in particular to the following operations:
280+
281+
- [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
282+
- [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
283+
- [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
284+
- [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
285+
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
286286
"""
287287

288288

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/browser_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
"""
3737
The platform on which the browser is running.
3838
Note: This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent.
39-
The list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [`os.type` and `os.name` attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides.
39+
The list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [`os.type` and `os.name` attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides.
4040
"""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/cloud_attributes.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,22 @@
4747
"""
4848
Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP).
4949
Note: On some cloud providers, it may not be possible to determine the full ID at startup,
50-
so it may be necessary to set `cloud.resource_id` as a span attribute instead.
50+
so it may be necessary to set `cloud.resource_id` as a span attribute instead.
5151
52-
The exact value to use for `cloud.resource_id` depends on the cloud provider.
53-
The following well-known definitions MUST be used if you set this attribute and they apply:
52+
The exact value to use for `cloud.resource_id` depends on the cloud provider.
53+
The following well-known definitions MUST be used if you set this attribute and they apply:
5454
55-
* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
56-
Take care not to use the "invoked ARN" directly but replace any
57-
[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
58-
with the resolved function version, as the same runtime instance may be invokable with
59-
multiple different aliases.
60-
* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)
61-
* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function,
62-
*not* the function app, having the form
63-
`/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
64-
This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
65-
a TracerProvider.
55+
* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
56+
Take care not to use the "invoked ARN" directly but replace any
57+
[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
58+
with the resolved function version, as the same runtime instance may be invokable with
59+
multiple different aliases.
60+
* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)
61+
* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function,
62+
*not* the function app, having the form
63+
`/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
64+
This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
65+
a TracerProvider.
6666
"""
6767

6868

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/container_attributes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
"""
4646
Runtime specific image identifier. Usually a hash algorithm followed by a UUID.
4747
Note: Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint.
48-
K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
49-
The ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes.
48+
K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
49+
The ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes.
5050
"""
5151

5252
CONTAINER_IMAGE_NAME: Final = "container.image.name"

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/db_attributes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"""
6767
The name of a collection (table, container) within the database.
6868
Note: If the collection name is parsed from the query, it SHOULD match the value provided in the query and may be qualified with the schema and database name.
69-
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
69+
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
7070
"""
7171

7272
DB_CONNECTION_STRING: Final = "db.connection_string"
@@ -161,8 +161,8 @@
161161
"""
162162
The name of the database, fully qualified within the server address and port.
163163
Note: If a database system has multiple namespace components, they SHOULD be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces SHOULD NOT be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid.
164-
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
165-
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
164+
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
165+
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
166166
"""
167167

168168
DB_OPERATION: Final = "db.operation"
@@ -180,7 +180,7 @@
180180
"""
181181
The query parameters used in `db.query.text`, with `<key>` being the parameter name, and the attribute value being the parameter value.
182182
Note: Query parameters should only be captured when `db.query.text` is parameterized with placeholders.
183-
If a parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based index.
183+
If a parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based index.
184184
"""
185185

186186
DB_QUERY_TEXT: Final = "db.query.text"

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/deployment_attributes.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"""
1919
Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier).
2020
Note: `deployment.environment` does not affect the uniqueness constraints defined through
21-
the `service.namespace`, `service.name` and `service.instance.id` resource attributes.
22-
This implies that resources carrying the following attribute combinations MUST be
23-
considered to be identifying the same service:
21+
the `service.namespace`, `service.name` and `service.instance.id` resource attributes.
22+
This implies that resources carrying the following attribute combinations MUST be
23+
considered to be identifying the same service:
2424
25-
* `service.name=frontend`, `deployment.environment=production`
26-
* `service.name=frontend`, `deployment.environment=staging`.
25+
* `service.name=frontend`, `deployment.environment=production`
26+
* `service.name=frontend`, `deployment.environment=staging`.
2727
"""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/error_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
@deprecated(reason="Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.error_attributes.ErrorTypeValues`.") # type: ignore
2727
class ErrorTypeValues(Enum):
2828
OTHER = "_OTHER"
29-
"""A fallback error value to be used when the instrumentation doesn't define a custom value."""
29+
"""Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.error_attributes.ErrorTypeValues.OTHER`."""

opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/faas_attributes.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@
8484
"""
8585
The name of the single function that this runtime instance executes.
8686
Note: This is the name of the function as configured/deployed on the FaaS
87-
platform and is usually different from the name of the callback
88-
function (which may be stored in the
89-
[`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes)
90-
span attributes).
87+
platform and is usually different from the name of the callback
88+
function (which may be stored in the
89+
[`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes)
90+
span attributes).
9191
92-
For some cloud providers, the above definition is ambiguous. The following
93-
definition of function name MUST be used for this attribute
94-
(and consequently the span name) for the listed cloud providers/products:
92+
For some cloud providers, the above definition is ambiguous. The following
93+
definition of function name MUST be used for this attribute
94+
(and consequently the span name) for the listed cloud providers/products:
9595
96-
* **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
97-
followed by a forward slash followed by the function name (this form
98-
can also be seen in the resource JSON for the function).
99-
This means that a span attribute MUST be used, as an Azure function
100-
app can host multiple functions that would usually share
101-
a TracerProvider (see also the `cloud.resource_id` attribute).
96+
* **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
97+
followed by a forward slash followed by the function name (this form
98+
can also be seen in the resource JSON for the function).
99+
This means that a span attribute MUST be used, as an Azure function
100+
app can host multiple functions that would usually share
101+
a TracerProvider (see also the `cloud.resource_id` attribute).
102102
"""
103103

104104
FAAS_TIME: Final = "faas.time"
@@ -116,13 +116,13 @@
116116
The immutable version of the function being executed.
117117
Note: Depending on the cloud provider and platform, use:
118118
119-
* **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
120-
(an integer represented as a decimal string).
121-
* **Google Cloud Run (Services):** The [revision](https://cloud.google.com/run/docs/managing/revisions)
122-
(i.e., the function name plus the revision suffix).
123-
* **Google Cloud Functions:** The value of the
124-
[`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
125-
* **Azure Functions:** Not applicable. Do not set this attribute.
119+
* **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
120+
(an integer represented as a decimal string).
121+
* **Google Cloud Run (Services):** The [revision](https://cloud.google.com/run/docs/managing/revisions)
122+
(i.e., the function name plus the revision suffix).
123+
* **Google Cloud Functions:** The value of the
124+
[`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
125+
* **Azure Functions:** Not applicable. Do not set this attribute.
126126
"""
127127

128128

0 commit comments

Comments
 (0)