Skip to content
Open
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
40 changes: 35 additions & 5 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4191,6 +4191,7 @@ export type CODE_FILE_PATH_TYPE = string;
*
* Aliases: {@link CODE_FUNCTION_NAME} `code.function.name`
*
* @deprecated Use {@link CODE_FUNCTION_NAME} (code.function.name) instead - `code.function` was deprecated by OTel in favor of `code.function.name`.
* @example "server_request"
*/
export const CODE_FUNCTION = 'code.function';
Expand All @@ -4203,7 +4204,7 @@ export type CODE_FUNCTION_TYPE = string;
// Path: model/attributes/code/code__function__name.json

/**
* The method or function fully-qualified name without arguments. `code.function.name`
* The method or function name without arguments. The name may be fully-qualified or just list the simple function name. See examples. `code.function.name`
*
* Attribute Value Type: `string` {@link CODE_FUNCTION_NAME_TYPE}
*
Expand All @@ -4214,7 +4215,11 @@ export type CODE_FUNCTION_TYPE = string;
*
* Aliases: {@link CODE_FUNCTION} `code.function`
*
* @example "com.example.MyHttpService.serveRequest"
* @example "server_request"
* @example "getAllUsers"
* @example "UserService.getAllUsers"
* @example "GuzzleHttp\\Client::transfer"
*/
export const CODE_FUNCTION_NAME = 'code.function.name';

Expand Down Expand Up @@ -21365,20 +21370,45 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
isInOtel: true,
visibility: 'public',
example: 'server_request',
deprecation: {
replacement: 'code.function.name',
reason: '`code.function` was deprecated by OTel in favor of `code.function.name`.',
status: 'backfill',
},
aliases: ['code.function.name'],
changelog: [{ version: '0.1.0', prs: [61, 74] }, { version: '0.0.0' }],
changelog: [
{ version: 'next', prs: [542], description: 'Deprecated code.function in favor of code.function.name' },
{ version: '0.1.0', prs: [61, 74] },
{ version: '0.0.0' },
],
},
'code.function.name': {
brief: 'The method or function fully-qualified name without arguments.',
brief:
'The method or function name without arguments. The name may be fully-qualified or just list the simple function name. See examples.',
type: 'string',
applyScrubbing: {
key: 'manual',
},
isInOtel: true,
visibility: 'public',
example: 'server_request',
example: 'com.example.MyHttpService.serveRequest',
examples: [
'com.example.MyHttpService.serveRequest',
'server_request',
'getAllUsers',
'UserService.getAllUsers',
'GuzzleHttp\\Client::transfer',
],
aliases: ['code.function'],
changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }],
changelog: [
{
version: 'next',
prs: [542],
description: 'Loosened specification around fully qualified to also accept a simple function name.',
},
{ version: '0.1.0', prs: [127] },
{ version: '0.0.0' },
],
},
'code.lineno': {
brief:
Expand Down
10 changes: 10 additions & 0 deletions model/attributes/code/code__function.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@
"is_in_otel": true,
"example": "server_request",
"alias": ["code.function.name"],
"deprecation": {
"_status": "backfill",
"replacement": "code.function.name",
"reason": "`code.function` was deprecated by OTel in favor of `code.function.name`."
},
Comment thread
cursor[bot] marked this conversation as resolved.
"visibility": "public",
"changelog": [
{
"version": "next",
"prs": [542],
"description": "Deprecated code.function in favor of code.function.name"
},
{
"version": "0.1.0",
"prs": [61, 74]
Expand Down
15 changes: 13 additions & 2 deletions model/attributes/code/code__function__name.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
{
"key": "code.function.name",
"brief": "The method or function fully-qualified name without arguments.",
"brief": "The method or function name without arguments. The name may be fully-qualified or just list the simple function name. See examples.",
"type": "string",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": true,
"example": "server_request",
"examples": [
"com.example.MyHttpService.serveRequest",
"server_request",
"getAllUsers",
"UserService.getAllUsers",
"GuzzleHttp\\Client::transfer"
],
"alias": ["code.function"],
"visibility": "public",
"changelog": [
{
"version": "next",
"prs": [542],
"description": "Loosened specification around fully qualified to also accept a simple function name."
},
{
"version": "0.1.0",
"prs": [127]
Expand Down
34 changes: 31 additions & 3 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ class _AttributeNamesMeta(type):
"CLS_SOURCE_KEY",
"CLS",
"CODE_FILEPATH",
"CODE_FUNCTION",
"CODE_LINENO",
"CONNECTION_RTT",
"CONNECTIONTYPE",
Expand Down Expand Up @@ -2724,19 +2725,24 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Defined in OTEL: Yes
Visibility: public
Aliases: code.function.name
DEPRECATED: Use code.function.name instead - `code.function` was deprecated by OTel in favor of `code.function.name`.
Example: "server_request"
"""

# Path: model/attributes/code/code__function__name.json
CODE_FUNCTION_NAME: Literal["code.function.name"] = "code.function.name"
"""The method or function fully-qualified name without arguments.
"""The method or function name without arguments. The name may be fully-qualified or just list the simple function name. See examples.

Type: str
Apply Scrubbing: manual
Defined in OTEL: Yes
Visibility: public
Aliases: code.function
Example: "com.example.MyHttpService.serveRequest"
Example: "server_request"
Example: "getAllUsers"
Example: "UserService.getAllUsers"
Example: "GuzzleHttp\\Client::transfer"
"""

# Path: model/attributes/code/code__line__number.json
Expand Down Expand Up @@ -12794,21 +12800,43 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
is_in_otel=True,
visibility=Visibility.PUBLIC,
example="server_request",
deprecation=DeprecationInfo(
replacement="code.function.name",
reason="`code.function` was deprecated by OTel in favor of `code.function.name`.",
status=DeprecationStatus.BACKFILL,
),
aliases=["code.function.name"],
changelog=[
ChangelogEntry(
version="next",
prs=[542],
description="Deprecated code.function in favor of code.function.name",
),
ChangelogEntry(version="0.1.0", prs=[61, 74]),
ChangelogEntry(version="0.0.0"),
],
),
"code.function.name": AttributeMetadata(
brief="The method or function fully-qualified name without arguments.",
brief="The method or function name without arguments. The name may be fully-qualified or just list the simple function name. See examples.",
type=AttributeType.STRING,
apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL),
is_in_otel=True,
visibility=Visibility.PUBLIC,
example="server_request",
example="com.example.MyHttpService.serveRequest",
examples=[
"com.example.MyHttpService.serveRequest",
"server_request",
"getAllUsers",
"UserService.getAllUsers",
"GuzzleHttp\\Client::transfer",
],
aliases=["code.function"],
changelog=[
ChangelogEntry(
version="next",
prs=[542],
description="Loosened specification around fully qualified to also accept a simple function name.",
),
ChangelogEntry(version="0.1.0", prs=[127]),
ChangelogEntry(version="0.0.0"),
],
Expand Down
Loading