Skip to content

Commit d3bff0d

Browse files
SylvainJugelmolkovatrask
authored
mark code.* attributes as release candidate (#1599)
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
1 parent 78c42c5 commit d3bff0d

File tree

6 files changed

+42
-20
lines changed

6 files changed

+42
-20
lines changed

.chloggen/1599.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: code
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Mark `code.*` semantic conventions as release candidate
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [ 1377 ]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/attributes-registry/code.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ These attributes provide context about source code
1212

1313
| Attribute | Type | Description | Examples | Stability |
1414
|---|---|---|---|---|
15-
| <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` | ![Development](https://img.shields.io/badge/-development-blue) |
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` | ![Development](https://img.shields.io/badge/-development-blue) |
17-
| <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` | ![Development](https://img.shields.io/badge/-development-blue) |
18-
| <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` | ![Development](https://img.shields.io/badge/-development-blue) |
19-
| <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)` | ![Development](https://img.shields.io/badge/-development-blue) |
15+
| <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` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
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` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
17+
| <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` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
18+
| <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` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
19+
| <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)` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
2020

2121
**[1] `code.function.name`:** Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
2222
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in

docs/code/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ linkTitle: Code
44

55
# Semantic conventions for code
66

7-
**Status**: [Development][DocumentStatus]
7+
**Status**: [Release Candidate][DocumentStatus]
88

99
This document defines semantic conventions for source code.
1010

docs/general/attributes.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ Examples of where `thread.id` and `thread.name` can be extracted from:
415415

416416
## Source Code Attributes
417417

418+
**Status**: [Release Candidate][DocumentStatus]
419+
418420
Often a span is closely tied to a certain unit of code that is logically responsible for handling
419421
the operation that the span describes (usually the method that starts the span).
420422
For an HTTP server span, this would be the function that handles the incoming request, for example.
@@ -430,12 +432,11 @@ about the span.
430432

431433
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
432434
|---|---|---|---|---|---|
433-
| [`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` | ![Development](https://img.shields.io/badge/-development-blue) |
434-
| [`code.filepath`](/docs/attributes-registry/code.md) | string | Deprecated, use `code.file.path` instead | `/usr/local/MyApplication/content_root/app/index.php` | `Recommended` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `code.file.path` |
435-
| [`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` | ![Development](https://img.shields.io/badge/-development-blue) |
436-
| [`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` | ![Development](https://img.shields.io/badge/-development-blue) |
437-
| [`code.namespace`](/docs/attributes-registry/code.md) | string | Deprecated, namespace is now included into `code.function.name` | `com.example.MyHttpService` | `Recommended` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Value should be included in `code.function.name` which is expected to be a fully-qualified name. |
438-
| [`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` | ![Development](https://img.shields.io/badge/-development-blue) |
435+
| [`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` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
436+
| [`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` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
437+
| [`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` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
438+
| [`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` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
439+
| [`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` | ![Release Candidate](https://img.shields.io/badge/-rc-mediumorchid) |
439440

440441
**[1] `code.function.name`:** Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
441442
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in

model/code/common.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ groups:
55
These attributes provide context about source code
66
attributes:
77
- ref: code.function.name
8-
- ref: code.namespace
9-
- ref: code.filepath
8+
- ref: code.file.path
109
- ref: code.line.number
1110
- ref: code.column.number
1211
- ref: code.stacktrace

model/code/registry.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ groups:
77
attributes:
88
- id: code.function.name
99
type: string
10-
stability: development
10+
stability: release_candidate
1111
brief: >
1212
The method or function fully-qualified name without arguments. The value should fit the natural representation of the language
1313
runtime, which is also likely the same used within `code.stacktrace` attribute value.
@@ -33,28 +33,28 @@ groups:
3333
* C function: `fopen`
3434
- id: code.file.path
3535
type: string
36-
stability: development
36+
stability: release_candidate
3737
brief: >
3838
The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
3939
examples: /usr/local/MyApplication/content_root/app/index.php
4040
- id: code.line.number
4141
type: int
42-
stability: development
42+
stability: release_candidate
4343
brief: >
4444
The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
4545
examples: 42
4646
- id: code.column.number
4747
type: int
48-
stability: development
48+
stability: release_candidate
4949
brief: >
5050
The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`.
5151
examples: 16
5252
- id: code.stacktrace
5353
type: string
54-
stability: development
54+
stability: release_candidate
5555
brief: >
5656
A stacktrace as a string in the natural representation for the language runtime.
57-
The representation is to be determined and documented by each language SIG.
57+
The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation).
5858
examples: >
5959
at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n
6060
at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n

0 commit comments

Comments
 (0)