diff --git a/.chloggen/code-rename.yaml b/.chloggen/code-rename.yaml
index fc309e5bcb..a6192f3d12 100644
--- a/.chloggen/code-rename.yaml
+++ b/.chloggen/code-rename.yaml
@@ -10,7 +10,7 @@ change_type: breaking
component: code
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
-note: rename `code.function`, `code.lineno` and `code.column`
+note: rename `code.function`, `code.lineno`, `code.column` and `code.filepath`
# 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.
@@ -23,3 +23,4 @@ subtext: |
`code.function` renamed to `code.function.name`
`code.lineno` renamed to `code.line.number`
`code.column` renamed to `code.column.number`
+ `code.filepath` renamed to `code.file.path`
diff --git a/docs/attributes-registry/code.md b/docs/attributes-registry/code.md
index f3c9221ef1..799b8cbb91 100644
--- a/docs/attributes-registry/code.md
+++ b/docs/attributes-registry/code.md
@@ -16,7 +16,7 @@ These attributes provide context about source code
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `code.column.number` | int | The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. | `16` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| `code.filepath` | 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| `code.file.path` | 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `code.function.name` | string | The method or function name, or equivalent (usually rightmost part of the code unit's name). | `serveRequest` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `code.line.number` | int | The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. | `42` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `code.namespace` | string | The "namespace" within which `code.function.name` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function.name` form a unique identifier for the code unit. | `com.example.MyHttpService` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
@@ -29,5 +29,6 @@ These deprecated attributes provide context about source code
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `code.column` | int | Deprecated, use `code.column.number` | `16` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `code.column.number` |
+| `code.filepath` | string | Deprecated, use `code.file.path` instead | `/usr/local/MyApplication/content_root/app/index.php` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `code.function` | string | Deprecated, use `code.function.name` instead | `serveRequest` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `code.function.name` |
| `code.lineno` | int | Deprecated, use `code.line.number` instead | `42` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `code.line.number` |
diff --git a/docs/general/attributes.md b/docs/general/attributes.md
index 4a2fd1aad7..f6a1d37f4d 100644
--- a/docs/general/attributes.md
+++ b/docs/general/attributes.md
@@ -490,7 +490,7 @@ 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.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. | `16` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
-| [`code.filepath`](/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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
+| [`code.filepath`](/docs/attributes-registry/code.md) | string | Deprecated, use `code.file.path` instead | `/usr/local/MyApplication/content_root/app/index.php` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`code.function.name`](/docs/attributes-registry/code.md) | string | The method or function name, or equivalent (usually rightmost part of the code unit's name). | `serveRequest` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`code.line.number`](/docs/attributes-registry/code.md) | int | The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. | `42` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`code.namespace`](/docs/attributes-registry/code.md) | string | The "namespace" within which `code.function.name` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function.name` form a unique identifier for the code unit. | `com.example.MyHttpService` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
diff --git a/model/code/registry-deprecated.yaml b/model/code/registry-deprecated.yaml
index adb706cfa4..16daea5c4c 100644
--- a/model/code/registry-deprecated.yaml
+++ b/model/code/registry-deprecated.yaml
@@ -12,6 +12,12 @@ groups:
brief: >
Deprecated, use `code.function.name` instead
examples: serveRequest
+ - id: code.filepath
+ type: string
+ stability: experimental
+ brief: >
+ Deprecated, use `code.file.path` instead
+ examples: /usr/local/MyApplication/content_root/app/index.php
- id: code.lineno
type: int
stability: experimental
diff --git a/model/code/registry.yaml b/model/code/registry.yaml
index a07987ca0e..4eaf90fb9c 100644
--- a/model/code/registry.yaml
+++ b/model/code/registry.yaml
@@ -18,7 +18,7 @@ groups:
The "namespace" within which `code.function.name` is defined. Usually the qualified class or module name,
such that `code.namespace` + some separator + `code.function.name` form a unique identifier for the code unit.
examples: com.example.MyHttpService
- - id: code.filepath
+ - id: code.file.path
type: string
stability: experimental
brief: >