mark code.* attributes as release candidate (#1599)
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
This commit is contained in:
parent
78c42c576a
commit
d3bff0dcb5
|
|
@ -0,0 +1,22 @@
|
|||
# Use this changelog template to create an entry for release notes.
|
||||
#
|
||||
# If your change doesn't affect end users you should instead start
|
||||
# your pull request title with [chore] or use the "Skip Changelog" label.
|
||||
|
||||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
|
||||
change_type: enhancement
|
||||
|
||||
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
|
||||
component: code
|
||||
|
||||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
|
||||
note: Mark `code.*` semantic conventions as release candidate
|
||||
|
||||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
|
||||
# The values here must be integers.
|
||||
issues: [ 1377 ]
|
||||
|
||||
# (Optional) One or more lines of additional information to render under the primary note.
|
||||
# These lines will be padded with 2 spaces and then inserted directly into the document.
|
||||
# Use pipe (|) for multiline entries.
|
||||
subtext:
|
||||
|
|
@ -12,11 +12,11 @@ These attributes provide context about source code
|
|||
|
||||
| Attribute | Type | Description | Examples | Stability |
|
||||
|---|---|---|---|---|
|
||||
| <a id="code-column-number" href="#code-column-number">`code.column.number`</a> | int | The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `16` |  |
|
||||
| <a id="code-file-path" href="#code-file-path">`code.file.path`</a> | string | The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). | `/usr/local/MyApplication/content_root/app/index.php` |  |
|
||||
| <a id="code-function-name" href="#code-function-name">`code.function.name`</a> | string | The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. [1] | `com.example.MyHttpService.serveRequest`; `GuzzleHttp\Client::transfer`; `fopen` |  |
|
||||
| <a id="code-line-number" href="#code-line-number">`code.line.number`</a> | int | The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `42` |  |
|
||||
| <a id="code-stacktrace" href="#code-stacktrace">`code.stacktrace`</a> | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` |  |
|
||||
| <a id="code-column-number" href="#code-column-number">`code.column.number`</a> | int | The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `16` |  |
|
||||
| <a id="code-file-path" href="#code-file-path">`code.file.path`</a> | string | The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). | `/usr/local/MyApplication/content_root/app/index.php` |  |
|
||||
| <a id="code-function-name" href="#code-function-name">`code.function.name`</a> | string | The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. [1] | `com.example.MyHttpService.serveRequest`; `GuzzleHttp\Client::transfer`; `fopen` |  |
|
||||
| <a id="code-line-number" href="#code-line-number">`code.line.number`</a> | int | The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `42` |  |
|
||||
| <a id="code-stacktrace" href="#code-stacktrace">`code.stacktrace`</a> | string | A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). | `at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` |  |
|
||||
|
||||
**[1] `code.function.name`:** Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
|
||||
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ linkTitle: Code
|
|||
|
||||
# Semantic conventions for code
|
||||
|
||||
**Status**: [Development][DocumentStatus]
|
||||
**Status**: [Release Candidate][DocumentStatus]
|
||||
|
||||
This document defines semantic conventions for source code.
|
||||
|
||||
|
|
|
|||
|
|
@ -415,6 +415,8 @@ Examples of where `thread.id` and `thread.name` can be extracted from:
|
|||
|
||||
## Source Code Attributes
|
||||
|
||||
**Status**: [Release Candidate][DocumentStatus]
|
||||
|
||||
Often a span is closely tied to a certain unit of code that is logically responsible for handling
|
||||
the operation that the span describes (usually the method that starts the span).
|
||||
For an HTTP server span, this would be the function that handles the incoming request, for example.
|
||||
|
|
@ -430,12 +432,11 @@ about the span.
|
|||
|
||||
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
||||
|---|---|---|---|---|---|
|
||||
| [`code.column.number`](/docs/attributes-registry/code.md) | int | The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `16` | `Recommended` |  |
|
||||
| [`code.filepath`](/docs/attributes-registry/code.md) | string | Deprecated, use `code.file.path` instead | `/usr/local/MyApplication/content_root/app/index.php` | `Recommended` | <br>Replaced by `code.file.path` |
|
||||
| [`code.function.name`](/docs/attributes-registry/code.md) | string | The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. [1] | `com.example.MyHttpService.serveRequest`; `GuzzleHttp\Client::transfer`; `fopen` | `Recommended` |  |
|
||||
| [`code.line.number`](/docs/attributes-registry/code.md) | int | The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `42` | `Recommended` |  |
|
||||
| [`code.namespace`](/docs/attributes-registry/code.md) | string | Deprecated, namespace is now included into `code.function.name` | `com.example.MyHttpService` | `Recommended` | <br>Value should be included in `code.function.name` which is expected to be a fully-qualified name. |
|
||||
| [`code.stacktrace`](/docs/attributes-registry/code.md) | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` | `Opt-In` |  |
|
||||
| [`code.column.number`](/docs/attributes-registry/code.md) | int | The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `16` | `Recommended` |  |
|
||||
| [`code.file.path`](/docs/attributes-registry/code.md) | string | The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). | `/usr/local/MyApplication/content_root/app/index.php` | `Recommended` |  |
|
||||
| [`code.function.name`](/docs/attributes-registry/code.md) | string | The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. [1] | `com.example.MyHttpService.serveRequest`; `GuzzleHttp\Client::transfer`; `fopen` | `Recommended` |  |
|
||||
| [`code.line.number`](/docs/attributes-registry/code.md) | int | The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. | `42` | `Recommended` |  |
|
||||
| [`code.stacktrace`](/docs/attributes-registry/code.md) | string | A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). | `at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` | `Opt-In` |  |
|
||||
|
||||
**[1] `code.function.name`:** Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
|
||||
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ groups:
|
|||
These attributes provide context about source code
|
||||
attributes:
|
||||
- ref: code.function.name
|
||||
- ref: code.namespace
|
||||
- ref: code.filepath
|
||||
- ref: code.file.path
|
||||
- ref: code.line.number
|
||||
- ref: code.column.number
|
||||
- ref: code.stacktrace
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ groups:
|
|||
attributes:
|
||||
- id: code.function.name
|
||||
type: string
|
||||
stability: development
|
||||
stability: release_candidate
|
||||
brief: >
|
||||
The method or function fully-qualified name without arguments. The value should fit the natural representation of the language
|
||||
runtime, which is also likely the same used within `code.stacktrace` attribute value.
|
||||
|
|
@ -33,28 +33,28 @@ groups:
|
|||
* C function: `fopen`
|
||||
- id: code.file.path
|
||||
type: string
|
||||
stability: development
|
||||
stability: release_candidate
|
||||
brief: >
|
||||
The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
|
||||
examples: /usr/local/MyApplication/content_root/app/index.php
|
||||
- id: code.line.number
|
||||
type: int
|
||||
stability: development
|
||||
stability: release_candidate
|
||||
brief: >
|
||||
The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
|
||||
examples: 42
|
||||
- id: code.column.number
|
||||
type: int
|
||||
stability: development
|
||||
stability: release_candidate
|
||||
brief: >
|
||||
The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
|
||||
examples: 16
|
||||
- id: code.stacktrace
|
||||
type: string
|
||||
stability: development
|
||||
stability: release_candidate
|
||||
brief: >
|
||||
A stacktrace as a string in the natural representation for the language runtime.
|
||||
The representation is to be determined and documented by each language SIG.
|
||||
The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation).
|
||||
examples: >
|
||||
at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n
|
||||
at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n
|
||||
|
|
|
|||
Loading…
Reference in New Issue