Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mark code.* attributes as release candidate #1599

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/1599.yaml
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 1 addition & 1 deletion internal/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-specification/internal/tools

go 1.22
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[for reviewer] not related to this PR, but I had to change this otherwise I got toolchain not available error when trying to generate the changelog entry template.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @joaopgrassi who has the most context on this

go 1.22.0

require (
github.com/client9/misspell v0.3.4
Expand Down
12 changes: 6 additions & 6 deletions model/code/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,38 @@ groups:
attributes:
- id: code.function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider renaming it to code.function.name since there could be other things we'd eventually want to capture and we try to add specific property name to avoid ambiguity.

Are there any stable OTel components that rely on this name already?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SylvainJuge I'd recommend opening a separate PR to do any attribute names, and then coming back to this PR afterwards

type: string
stability: experimental
stability: experimental # RELEASE CANDIDATE
brief: >
The method or function name, or equivalent (usually rightmost part of the code unit's name).
examples: serveRequest
- id: code.namespace
type: string
stability: experimental
stability: experimental # RELEASE CANDIDATE
brief: >
The "namespace" within which `code.function` is defined. Usually the qualified class or module name,
such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.
examples: com.example.MyHttpService
- id: code.filepath
type: string
stability: experimental
stability: experimental # 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.lineno
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to consider renaming this attribute to code.line.number to be consistent with the rest of semconv and our guidance to avoid abbreviations.

Do we know if it's already used as is in any stable components in otel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The opentelemetry-php is stable and is known to rely on some of those attributes.

I will try to exhaustively list the impacts in the rename PR

type: int
stability: experimental
stability: experimental # RELEASE CANDIDATE
brief: >
The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
examples: 42
- id: code.column
type: int
stability: experimental
stability: experimental # RELEASE CANDIDATE
brief: >
The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
examples: 16
- id: code.stacktrace
type: string
stability: experimental
stability: experimental # 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expand Down
Loading