From 390e7834aec4adda74c5679f3eb38393d2e46f48 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Thu, 14 Aug 2025 16:19:54 +0200 Subject: [PATCH 01/28] fix: Replace Windows-illegal file names `<` and `>` aren't allowed in file names on Windows, which means this repo can't be checked out there. This replaces those characters with `[` and `]` respectively. --- ...__parameter__.json => db__query__parameter__[key].json} | 0 ...lag__evaluation__.json => flag__evaluation__[key].json} | 0 ...st__header__.json => http__request__header__[key].json} | 0 ...e__header__.json => http__response__header__[key].json} | 0 .../params/{params__.json => params__[key].json} | 0 model/attributes/query/{query__.json => query__[key].json} | 0 ...orm_data__.json => remix__action_form_data__[key].json} | 0 .../{sentry__module__.json => sentry__module__[key].json} | 0 ...__parameter__.json => url__path__parameter__[key].json} | 0 test/attributes.test.ts | 2 +- 10 files changed, 1 insertion(+), 1 deletion(-) rename model/attributes/db/{db__query__parameter__.json => db__query__parameter__[key].json} (100%) rename model/attributes/flag/{flag__evaluation__.json => flag__evaluation__[key].json} (100%) rename model/attributes/http/{http__request__header__.json => http__request__header__[key].json} (100%) rename model/attributes/http/{http__response__header__.json => http__response__header__[key].json} (100%) rename model/attributes/params/{params__.json => params__[key].json} (100%) rename model/attributes/query/{query__.json => query__[key].json} (100%) rename model/attributes/remix/{remix__action_form_data__.json => remix__action_form_data__[key].json} (100%) rename model/attributes/sentry/{sentry__module__.json => sentry__module__[key].json} (100%) rename model/attributes/url/{url__path__parameter__.json => url__path__parameter__[key].json} (100%) diff --git a/model/attributes/db/db__query__parameter__.json b/model/attributes/db/db__query__parameter__[key].json similarity index 100% rename from model/attributes/db/db__query__parameter__.json rename to model/attributes/db/db__query__parameter__[key].json diff --git a/model/attributes/flag/flag__evaluation__.json b/model/attributes/flag/flag__evaluation__[key].json similarity index 100% rename from model/attributes/flag/flag__evaluation__.json rename to model/attributes/flag/flag__evaluation__[key].json diff --git a/model/attributes/http/http__request__header__.json b/model/attributes/http/http__request__header__[key].json similarity index 100% rename from model/attributes/http/http__request__header__.json rename to model/attributes/http/http__request__header__[key].json diff --git a/model/attributes/http/http__response__header__.json b/model/attributes/http/http__response__header__[key].json similarity index 100% rename from model/attributes/http/http__response__header__.json rename to model/attributes/http/http__response__header__[key].json diff --git a/model/attributes/params/params__.json b/model/attributes/params/params__[key].json similarity index 100% rename from model/attributes/params/params__.json rename to model/attributes/params/params__[key].json diff --git a/model/attributes/query/query__.json b/model/attributes/query/query__[key].json similarity index 100% rename from model/attributes/query/query__.json rename to model/attributes/query/query__[key].json diff --git a/model/attributes/remix/remix__action_form_data__.json b/model/attributes/remix/remix__action_form_data__[key].json similarity index 100% rename from model/attributes/remix/remix__action_form_data__.json rename to model/attributes/remix/remix__action_form_data__[key].json diff --git a/model/attributes/sentry/sentry__module__.json b/model/attributes/sentry/sentry__module__[key].json similarity index 100% rename from model/attributes/sentry/sentry__module__.json rename to model/attributes/sentry/sentry__module__[key].json diff --git a/model/attributes/url/url__path__parameter__.json b/model/attributes/url/url__path__parameter__[key].json similarity index 100% rename from model/attributes/url/url__path__parameter__.json rename to model/attributes/url/url__path__parameter__[key].json diff --git a/test/attributes.test.ts b/test/attributes.test.ts index 52174f16..f6b64815 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -65,7 +65,7 @@ describe('attribute json', async () => { }); it('should follow the correct naming convention', () => { - expect(name.replaceAll('__', '.').replace('.json', '')).toMatch(content.key); + expect(name.replaceAll('__', '.').replaceAll('[', '<').replaceAll(']', '>').replace('.json', '')).toMatch(content.key); }); }); } From 9fdd6fc0ee9a92add1f290344f86195521b6ca82 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Thu, 14 Aug 2025 16:21:54 +0200 Subject: [PATCH 02/28] Formatting --- test/attributes.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index f6b64815..b2243bdb 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -65,7 +65,9 @@ describe('attribute json', async () => { }); it('should follow the correct naming convention', () => { - expect(name.replaceAll('__', '.').replaceAll('[', '<').replaceAll(']', '>').replace('.json', '')).toMatch(content.key); + expect(name.replaceAll('__', '.').replaceAll('[', '<').replaceAll(']', '>').replace('.json', '')).toMatch( + content.key + ); }); }); } From cb351abcf1eb781e063b8b026ca5b06d04e36904 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Thu, 14 Aug 2025 16:23:01 +0200 Subject: [PATCH 03/28] Formatting --- test/attributes.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index b2243bdb..a517aefe 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -66,7 +66,7 @@ describe('attribute json', async () => { it('should follow the correct naming convention', () => { expect(name.replaceAll('__', '.').replaceAll('[', '<').replaceAll(']', '>').replace('.json', '')).toMatch( - content.key + content.key, ); }); }); From f9399d28699d5faa3073193e4e9b4b20ea2f9407 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Thu, 14 Aug 2025 16:40:38 +0200 Subject: [PATCH 04/28] Run generate --- .../sentry-conventions/src/attributes.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index c2f1597f..01144024 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -1338,7 +1338,7 @@ export const DB_OPERATION_NAME = 'db.operation.name'; */ export type DB_OPERATION_NAME_TYPE = string; -// Path: model/attributes/db/db__query__parameter__.json +// Path: model/attributes/db/db__query__parameter__[key].json /** * A query parameter used in db.query.text, with being the parameter name, and the attribute value being a string representation of the parameter value. `db.query.parameter.` @@ -1794,7 +1794,7 @@ export const FAAS_TRIGGER = 'faas.trigger'; */ export type FAAS_TRIGGER_TYPE = string; -// Path: model/attributes/flag/flag__evaluation__.json +// Path: model/attributes/flag/flag__evaluation__[key].json /** * An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The suffix is the name of the feature flag. `flag.evaluation.` @@ -3047,7 +3047,7 @@ export const HTTP_REQUEST_FETCH_START = 'http.request.fetch_start'; */ export type HTTP_REQUEST_FETCH_START_TYPE = number; -// Path: model/attributes/http/http__request__header__.json +// Path: model/attributes/http/http__request__header__[key].json /** * HTTP request headers, being the normalized HTTP Header name (lowercase), the value being the header values. `http.request.header.` @@ -3233,7 +3233,7 @@ export const HTTP_RESPONSE_BODY_SIZE = 'http.response.body.size'; */ export type HTTP_RESPONSE_BODY_SIZE_TYPE = number; -// Path: model/attributes/http/http__response__header__.json +// Path: model/attributes/http/http__response__header__[key].json /** * HTTP response headers, being the normalized HTTP Header name (lowercase), the value being the header values. `http.response.header.` @@ -4773,7 +4773,7 @@ export const OTEL_STATUS_DESCRIPTION = 'otel.status_description'; */ export type OTEL_STATUS_DESCRIPTION_TYPE = string; -// Path: model/attributes/params/params__.json +// Path: model/attributes/params/params__[key].json /** * Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router. `params.` @@ -4940,7 +4940,7 @@ export const PROFILE_ID = 'profile_id'; */ export type PROFILE_ID_TYPE = string; -// Path: model/attributes/query/query__.json +// Path: model/attributes/query/query__[key].json /** * An item in a query string. Usually added by client-side routing frameworks like vue-router. `query.` @@ -4986,7 +4986,7 @@ export const RELEASE = 'release'; */ export type RELEASE_TYPE = string; -// Path: model/attributes/remix/remix__action_form_data__.json +// Path: model/attributes/remix/remix__action_form_data__[key].json /** * Remix form data, being the form data key, the value being the form data value. `remix.action_form_data.` @@ -5280,7 +5280,7 @@ export const SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason'; */ export type SENTRY_IDLE_SPAN_FINISH_REASON_TYPE = string; -// Path: model/attributes/sentry/sentry__module__.json +// Path: model/attributes/sentry/sentry__module__[key].json /** * A module that was loaded in the process. The key is the name of the module. `sentry.module.` @@ -5905,7 +5905,7 @@ export const URL_PATH = 'url.path'; */ export type URL_PATH_TYPE = string; -// Path: model/attributes/url/url__path__parameter__.json +// Path: model/attributes/url/url__path__parameter__[key].json /** * Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router. `url.path.parameter.` From c18bd5b22bb706aff265a2b2dd443b20daaf75b9 Mon Sep 17 00:00:00 2001 From: lcian Date: Thu, 28 Aug 2025 11:28:57 +0200 Subject: [PATCH 05/28] test that all aliases have a corresponding file --- scripts/generate_attribute_docs.ts | 19 +-------- scripts/generate_attributes.ts | 20 +-------- .../generate_deprecated_attributes_json.ts | 21 +--------- scripts/types.ts | 19 +++++++++ scripts/utils.ts | 10 +++++ test/attributes.test.ts | 42 +++++++++++++++---- 6 files changed, 67 insertions(+), 64 deletions(-) create mode 100644 scripts/types.ts create mode 100644 scripts/utils.ts diff --git a/scripts/generate_attribute_docs.ts b/scripts/generate_attribute_docs.ts index e98341ec..8f4f76eb 100644 --- a/scripts/generate_attribute_docs.ts +++ b/scripts/generate_attribute_docs.ts @@ -1,24 +1,7 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; -interface AttributeJson { - key: string; - brief: string; - has_dynamic_suffix?: boolean; - type: 'string' | 'boolean' | 'integer' | 'double' | 'string[]' | 'boolean[]' | 'integer[]' | 'double[]'; - pii: { - key: 'true' | 'maybe' | 'false'; - reason?: string; - }; - is_in_otel: boolean; - example?: string | boolean | number | string[] | boolean[] | number[]; - deprecation?: { - replacement: string; - reason?: string; - }; - alias?: string[]; - sdks?: string[]; -} +import type { AttributeJson } from './types'; // Function to read and parse a JSON file function readJsonFile(filePath: string): AttributeJson { diff --git a/scripts/generate_attributes.ts b/scripts/generate_attributes.ts index 785b4188..6e9c1e7b 100644 --- a/scripts/generate_attributes.ts +++ b/scripts/generate_attributes.ts @@ -1,24 +1,6 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; - -interface AttributeJson { - key: string; - brief: string; - has_dynamic_suffix?: boolean; - type: 'string' | 'boolean' | 'integer' | 'double' | 'string[]' | 'boolean[]' | 'integer[]' | 'double[]'; - pii: { - key: 'true' | 'maybe' | 'false'; - reason?: string; - }; - is_in_otel: boolean; - example?: string | boolean | number | string[] | boolean[] | number[]; - deprecation?: { - replacement: string; - reason?: string; - }; - alias?: string[]; - sdks?: string[]; -} +import type { AttributeJson } from './types'; export async function generateAttributes() { const attributesDir = path.join(__dirname, '..', 'model', 'attributes'); diff --git a/scripts/generate_deprecated_attributes_json.ts b/scripts/generate_deprecated_attributes_json.ts index feb66c13..24c58140 100644 --- a/scripts/generate_deprecated_attributes_json.ts +++ b/scripts/generate_deprecated_attributes_json.ts @@ -1,26 +1,7 @@ import { execSync } from 'node:child_process'; import * as fs from 'node:fs'; import * as path from 'node:path'; - -interface AttributeJson { - key: string; - brief: string; - has_dynamic_suffix?: boolean; - type: 'string' | 'boolean' | 'integer' | 'double' | 'string[]' | 'boolean[]' | 'integer[]' | 'double[]'; - pii: { - key: 'true' | 'maybe' | 'false'; - reason?: string; - }; - is_in_otel: boolean; - example?: string | boolean | number | string[] | boolean[] | number[]; - deprecation?: { - replacement: string; - reason?: string; - _status?: string; - }; - alias?: string[]; - sdks?: string[]; -} +import type { AttributeJson } from './types'; // Function to read and parse a JSON file function readJsonFile(filePath: string): AttributeJson { diff --git a/scripts/types.ts b/scripts/types.ts new file mode 100644 index 00000000..1a848552 --- /dev/null +++ b/scripts/types.ts @@ -0,0 +1,19 @@ +export interface AttributeJson { + key: string; + brief: string; + has_dynamic_suffix?: boolean; + type: 'string' | 'boolean' | 'integer' | 'double' | 'string[]' | 'boolean[]' | 'integer[]' | 'double[]'; + pii: { + key: 'true' | 'maybe' | 'false'; + reason?: string; + }; + is_in_otel: boolean; + example?: string | boolean | number | string[] | boolean[] | number[]; + deprecation?: { + replacement: string; + reason?: string; + _status?: string; + }; + alias?: string[]; + sdks?: string[]; +} diff --git a/scripts/utils.ts b/scripts/utils.ts new file mode 100644 index 00000000..a929e89a --- /dev/null +++ b/scripts/utils.ts @@ -0,0 +1,10 @@ +export function attributeKeyToFileName(key: string): string { + return key.replace('', '[key]').split('.').join('__').concat('.json'); +} + +export function fileNameToAttributeKey(fileName: string): string { + return fileName + .replace(/\.json$/, '') + .replaceAll('__', '.') + .replace('[key]', ''); +} diff --git a/test/attributes.test.ts b/test/attributes.test.ts index a517aefe..3eb25689 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -5,6 +5,8 @@ import Ajv from 'ajv'; import { describe, expect, it } from 'vitest'; import schema from '../schemas/attribute.schema.json'; +import { fileNameToAttributeKey, attributeKeyToFileName } from '../scripts/utils'; +import type { AttributeJson } from '../scripts/types'; const traceFolders = path.resolve(__dirname, '../model/attributes'); @@ -15,7 +17,7 @@ describe('attribute json', async () => { for (const file of files) { const name = path.basename(file); describe(name, async () => { - const content = JSON.parse(await fs.promises.readFile(file, 'utf-8')); + const content: AttributeJson = JSON.parse(await fs.promises.readFile(file, 'utf-8')); it('should follow the attribute json schema', () => { const ajv = new Ajv(); @@ -35,6 +37,9 @@ describe('attribute json', async () => { return; } + if (!content.example) { + return; + } switch (content.type) { case 'integer': case 'double': @@ -43,21 +48,21 @@ describe('attribute json', async () => { case 'integer[]': case 'double[]': expect(Array.isArray(content.example)).toBe(true); - expect(content.example.every((e: number) => typeof e === 'number')).toBe(true); + expect((content.example as number[]).every((e: number) => typeof e === 'number')).toBe(true); break; case 'string': expect(typeof content.example).toBe('string'); break; case 'string[]': expect(Array.isArray(content.example)).toBe(true); - expect(content.example.every((e: string) => typeof e === 'string')).toBe(true); + expect((content.example as string[]).every((e: string) => typeof e === 'string')).toBe(true); break; case 'boolean': expect(typeof content.example).toBe('boolean'); break; case 'boolean[]': expect(Array.isArray(content.example)).toBe(true); - expect(content.example.every((e: boolean) => typeof e === 'boolean')).toBe(true); + expect((content.example as boolean[]).every((e: boolean) => typeof e === 'boolean')).toBe(true); break; default: throw new Error('Invalid type'); @@ -65,9 +70,32 @@ describe('attribute json', async () => { }); it('should follow the correct naming convention', () => { - expect(name.replaceAll('__', '.').replaceAll('[', '<').replaceAll(']', '>').replace('.json', '')).toMatch( - content.key, - ); + expect(fileNameToAttributeKey(name)).toMatch(content.key); + }); + + it('all of its aliases should exist', async () => { + if (!content.alias || content.alias.length === 0) { + return; + } + + for (const alias of content.alias) { + const aliasFileName = attributeKeyToFileName(alias); + let aliasFilePath: string; + + if (alias.includes('.')) { + const namespace = alias.split('.')[0] as string; + aliasFilePath = path.join(traceFolders, namespace, aliasFileName); + } else { + aliasFilePath = path.join(traceFolders, aliasFileName); + } + + const aliasExists = await fs.promises + .access(aliasFilePath, fs.constants.F_OK) + .then(() => true) + .catch(() => false); + + expect(aliasExists).toBe(true); + } }); }); } From 169ac1eae3b49b9d889a92644767c67b72291f5e Mon Sep 17 00:00:00 2001 From: lcian Date: Thu, 28 Aug 2025 11:34:15 +0200 Subject: [PATCH 06/28] lint --- test/attributes.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index 3eb25689..134fd260 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -5,8 +5,8 @@ import Ajv from 'ajv'; import { describe, expect, it } from 'vitest'; import schema from '../schemas/attribute.schema.json'; -import { fileNameToAttributeKey, attributeKeyToFileName } from '../scripts/utils'; import type { AttributeJson } from '../scripts/types'; +import { attributeKeyToFileName, fileNameToAttributeKey } from '../scripts/utils'; const traceFolders = path.resolve(__dirname, '../model/attributes'); From 457bc303691069f43157a29ca2497110fd554402 Mon Sep 17 00:00:00 2001 From: lcian Date: Thu, 28 Aug 2025 11:35:27 +0200 Subject: [PATCH 07/28] show missing files --- test/attributes.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index 134fd260..7383dd25 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -78,6 +78,8 @@ describe('attribute json', async () => { return; } + const missingAliases: string[] = []; + for (const alias of content.alias) { const aliasFileName = attributeKeyToFileName(alias); let aliasFilePath: string; @@ -94,8 +96,12 @@ describe('attribute json', async () => { .then(() => true) .catch(() => false); - expect(aliasExists).toBe(true); + if (!aliasExists) { + missingAliases.push(alias); + } } + + expect(missingAliases).toEqual([]); }); }); } From b2feabb1e73083aa10ca37209dd0c8146804298f Mon Sep 17 00:00:00 2001 From: lcian Date: Thu, 28 Aug 2025 12:02:05 +0200 Subject: [PATCH 08/28] test for replacements too --- test/attributes.test.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index 7383dd25..e0309881 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -73,6 +73,28 @@ describe('attribute json', async () => { expect(fileNameToAttributeKey(name)).toMatch(content.key); }); + it('its replacement should exist', async () => { + if (!content.deprecation?.replacement) { + return; + } + const replacement = content.deprecation?.replacement; + const replacementFileName = attributeKeyToFileName(replacement); + let replacementFilePath: string; + + if (replacement.includes('.')) { + const namespace = replacement.split('.')[0] as string; + replacementFilePath = path.join(traceFolders, namespace, replacementFileName); + } else { + replacementFilePath = path.join(traceFolders, replacementFileName); + } + + const replacementExists = await fs.promises + .access(replacementFilePath, fs.constants.F_OK) + .then(() => true) + .catch(() => false); + expect(replacementExists); + }); + it('all of its aliases should exist', async () => { if (!content.alias || content.alias.length === 0) { return; From 34672f83b27730db60f05520434bc6e3a9b41ce2 Mon Sep 17 00:00:00 2001 From: lcian Date: Thu, 28 Aug 2025 12:34:39 +0200 Subject: [PATCH 09/28] remove missing nextjs attributes --- generated/attributes/sentry.md | 2 -- javascript/sentry-conventions/src/attributes.ts | 4 ---- .../sentry/sentry__nextjs__ssr__function__route.json | 1 - .../sentry/sentry__nextjs__ssr__function__type.json | 1 - 4 files changed, 8 deletions(-) diff --git a/generated/attributes/sentry.md b/generated/attributes/sentry.md index 82a5d4ef..b242f8a2 100644 --- a/generated/attributes/sentry.md +++ b/generated/attributes/sentry.md @@ -142,7 +142,6 @@ A parameterized route for a function in Next.js that contributes to Server-Side | Has PII | false | | Exists in OpenTelemetry | No | | Example | `/posts/[id]/layout` | -| Aliases | `sentry.nextjs.function.route` | ### sentry.nextjs.ssr.function.type @@ -154,7 +153,6 @@ A descriptor for a for a function in Next.js that contributes to Server-Side Ren | Has PII | false | | Exists in OpenTelemetry | No | | Example | `generateMetadata` | -| Aliases | `sentry.nextjs.function.type` | ### sentry.op diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 01144024..6a16eb09 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -5313,8 +5313,6 @@ export type SENTRY_MODULE_KEY_TYPE = string; * * Attribute defined in OTEL: No * - * Aliases: {@link SENTRY_NEXTJS_FUNCTION_ROUTE} `sentry.nextjs.function.route` - * * @example "/posts/[id]/layout" */ export const SENTRY_NEXTJS_SSR_FUNCTION_ROUTE = 'sentry.nextjs.ssr.function.route'; @@ -5335,8 +5333,6 @@ export type SENTRY_NEXTJS_SSR_FUNCTION_ROUTE_TYPE = string; * * Attribute defined in OTEL: No * - * Aliases: {@link SENTRY_NEXTJS_FUNCTION_TYPE} `sentry.nextjs.function.type` - * * @example "generateMetadata" */ export const SENTRY_NEXTJS_SSR_FUNCTION_TYPE = 'sentry.nextjs.ssr.function.type'; diff --git a/model/attributes/sentry/sentry__nextjs__ssr__function__route.json b/model/attributes/sentry/sentry__nextjs__ssr__function__route.json index bdfc0d62..d88bf181 100644 --- a/model/attributes/sentry/sentry__nextjs__ssr__function__route.json +++ b/model/attributes/sentry/sentry__nextjs__ssr__function__route.json @@ -7,6 +7,5 @@ }, "is_in_otel": false, "example": "/posts/[id]/layout", - "alias": ["sentry.nextjs.function.route"], "sdks": ["javascript"] } diff --git a/model/attributes/sentry/sentry__nextjs__ssr__function__type.json b/model/attributes/sentry/sentry__nextjs__ssr__function__type.json index 0d43d72d..fbf8295a 100644 --- a/model/attributes/sentry/sentry__nextjs__ssr__function__type.json +++ b/model/attributes/sentry/sentry__nextjs__ssr__function__type.json @@ -7,6 +7,5 @@ }, "is_in_otel": false, "example": "generateMetadata", - "alias": ["sentry.nextjs.function.type"], "sdks": ["javascript"] } From 69d1db86972eca4dae53544ef506c9e1cb9063ec Mon Sep 17 00:00:00 2001 From: lcian Date: Thu, 28 Aug 2025 12:52:31 +0200 Subject: [PATCH 10/28] test: ensure all aliases are symmetric --- test/attributes.test.ts | 80 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index e0309881..4e615a2e 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -128,3 +128,83 @@ describe('attribute json', async () => { }); } }); + +describe('alias group consistency', async () => { + const filesIterator = await fs.promises.glob(`${traceFolders}/**/*.json`); + const files = await Array.fromAsync(filesIterator); + + // Load all attributes + const attributes = new Map(); + for (const file of files) { + const content: AttributeJson = JSON.parse(await fs.promises.readFile(file, 'utf-8')); + attributes.set(content.key, content); + } + + it('should have consistent alias groups', () => { + // Build alias groups: if X has aliases [Y, Z], then the group is [X, Y, Z] + const aliasGroups = new Map>(); + const processedKeys = new Set(); + + for (const [key, content] of attributes) { + if (processedKeys.has(key)) continue; + + if (!content.alias || content.alias.length === 0) continue; + + // Create the group with the current key and all its aliases + const group = new Set([key, ...content.alias]); + + // Mark all keys in this group as processed + for (const groupKey of group) { + processedKeys.add(groupKey); + } + + // Store the group using a canonical key (sorted first key) + const canonicalKey = Array.from(group).sort()[0]; + aliasGroups.set(canonicalKey!, group); + } + + const failedGroups: Array<{ group: string[], missingAliases: Array<{ key: string, missing: string[] }> }> = []; + + // Validate each group + for (const [canonicalKey, group] of aliasGroups) { + const groupArray = Array.from(group).sort(); + const missingAliases: Array<{ key: string, missing: string[] }> = []; + + for (const key of groupArray) { + const attribute = attributes.get(key); + if (!attribute) { + // Key doesn't exist, skip validation for this key + continue; + } + + const expectedAliases = groupArray.filter(k => k !== key).sort(); + const actualAliases = (attribute.alias || []).sort(); + + const missing = expectedAliases.filter(alias => !actualAliases.includes(alias)); + + if (missing.length > 0) { + missingAliases.push({ key, missing }); + } + } + + if (missingAliases.length > 0) { + failedGroups.push({ + group: groupArray, + missingAliases + }); + } + } + + if (failedGroups.length > 0) { + const errorMessages = failedGroups.map(({ group, missingAliases }) => { + const groupStr = `[${group.join(', ')}]`; + const missingStr = missingAliases.map(({ key, missing }) => + ` ${key} is missing aliases: [${missing.join(', ')}]` + ).join('\n'); + return `Group ${groupStr}:\n${missingStr}`; + }).join('\n\n'); + + throw new Error(`Alias group validation failed:\n\n${errorMessages}`); + } + }); +}); From d0750ab6b5e44efc3153e3a74e0998dffdb5f7b6 Mon Sep 17 00:00:00 2001 From: lcian Date: Thu, 28 Aug 2025 12:55:40 +0200 Subject: [PATCH 11/28] lint --- test/attributes.test.ts | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index 4e615a2e..a159bbd8 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -152,23 +152,23 @@ describe('alias group consistency', async () => { // Create the group with the current key and all its aliases const group = new Set([key, ...content.alias]); - + // Mark all keys in this group as processed for (const groupKey of group) { processedKeys.add(groupKey); } // Store the group using a canonical key (sorted first key) - const canonicalKey = Array.from(group).sort()[0]; - aliasGroups.set(canonicalKey!, group); + const canonicalKey = Array.from(group).sort()[0] as string; + aliasGroups.set(canonicalKey, group); } - const failedGroups: Array<{ group: string[], missingAliases: Array<{ key: string, missing: string[] }> }> = []; + const failedGroups: Array<{ group: string[]; missingAliases: Array<{ key: string; missing: string[] }> }> = []; // Validate each group for (const [canonicalKey, group] of aliasGroups) { const groupArray = Array.from(group).sort(); - const missingAliases: Array<{ key: string, missing: string[] }> = []; + const missingAliases: Array<{ key: string; missing: string[] }> = []; for (const key of groupArray) { const attribute = attributes.get(key); @@ -177,11 +177,11 @@ describe('alias group consistency', async () => { continue; } - const expectedAliases = groupArray.filter(k => k !== key).sort(); + const expectedAliases = groupArray.filter((k) => k !== key).sort(); const actualAliases = (attribute.alias || []).sort(); - const missing = expectedAliases.filter(alias => !actualAliases.includes(alias)); - + const missing = expectedAliases.filter((alias) => !actualAliases.includes(alias)); + if (missing.length > 0) { missingAliases.push({ key, missing }); } @@ -190,19 +190,21 @@ describe('alias group consistency', async () => { if (missingAliases.length > 0) { failedGroups.push({ group: groupArray, - missingAliases + missingAliases, }); } } if (failedGroups.length > 0) { - const errorMessages = failedGroups.map(({ group, missingAliases }) => { - const groupStr = `[${group.join(', ')}]`; - const missingStr = missingAliases.map(({ key, missing }) => - ` ${key} is missing aliases: [${missing.join(', ')}]` - ).join('\n'); - return `Group ${groupStr}:\n${missingStr}`; - }).join('\n\n'); + const errorMessages = failedGroups + .map(({ group, missingAliases }) => { + const groupStr = `[${group.join(', ')}]`; + const missingStr = missingAliases + .map(({ key, missing }) => ` ${key} is missing aliases: [${missing.join(', ')}]`) + .join('\n'); + return `Group ${groupStr}:\n${missingStr}`; + }) + .join('\n\n'); throw new Error(`Alias group validation failed:\n\n${errorMessages}`); } From 1975e478d7b0fdc0a6be17aff5e23d8201c1337e Mon Sep 17 00:00:00 2001 From: Lorenzo Cian Date: Thu, 28 Aug 2025 13:25:11 +0200 Subject: [PATCH 12/28] Update attributes.test.ts --- test/attributes.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index a159bbd8..03ed6b67 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -206,7 +206,7 @@ describe('alias group consistency', async () => { }) .join('\n\n'); - throw new Error(`Alias group validation failed:\n\n${errorMessages}`); + throw new Error(`Attribute alias relationship should be symmetric:\n\n${errorMessages}`); } }); }); From 372e3f9e7363825ba60f7452cf1bb6c486a36f95 Mon Sep 17 00:00:00 2001 From: lcian Date: Thu, 28 Aug 2025 13:28:00 +0200 Subject: [PATCH 13/28] test: ensure there's a single non-deprecated attribute per alias group --- test/attributes.test.ts | 69 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index 03ed6b67..0ccd0240 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -209,4 +209,73 @@ describe('alias group consistency', async () => { throw new Error(`Attribute alias relationship should be symmetric:\n\n${errorMessages}`); } }); + + it('should have only one non-deprecated attribute per alias group', () => { + // Build alias groups: if X has aliases [Y, Z], then the group is [X, Y, Z] + const aliasGroups = new Map>(); + const processedKeys = new Set(); + + for (const [key, content] of attributes) { + if (processedKeys.has(key)) continue; + + if (!content.alias || content.alias.length === 0) continue; + + // Create the group with the current key and all its aliases + const group = new Set([key, ...content.alias]); + + // Mark all keys in this group as processed + for (const groupKey of group) { + processedKeys.add(groupKey); + } + + // Store the group using a canonical key (sorted first key) + const canonicalKey = Array.from(group).sort()[0] as string; + aliasGroups.set(canonicalKey, group); + } + + const failedGroups: Array<{ group: string[]; nonDeprecatedAttributes: string[] }> = []; + + // Validate each group has only one non-deprecated attribute + for (const [canonicalKey, group] of aliasGroups) { + const groupArray = Array.from(group).sort(); + const nonDeprecatedAttributes: string[] = []; + + for (const key of groupArray) { + const attribute = attributes.get(key); + if (!attribute) { + // Key doesn't exist, skip validation for this key + continue; + } + + // If the attribute doesn't have deprecation, it's canonical + if (!attribute.deprecation) { + nonDeprecatedAttributes.push(key); + } + } + + if (nonDeprecatedAttributes.length !== 1) { + failedGroups.push({ + group: groupArray, + nonDeprecatedAttributes, + }); + } + } + + if (failedGroups.length > 0) { + const errorMessages = failedGroups + .map(({ group, nonDeprecatedAttributes }) => { + const groupStr = `[${group.join(', ')}]`; + const nonDeprecatedStr = + nonDeprecatedAttributes.length === 0 + ? 'no non-deprecated attributes' + : `${nonDeprecatedAttributes.length} non-deprecated attributes: [${nonDeprecatedAttributes.join(', ')}]`; + return `Group ${groupStr}\nhas ${nonDeprecatedStr}`; + }) + .join('\n'); + + throw new Error( + `Each group of attributes that alias to eachother should contain a single non-deprecated attribute.\n\n${errorMessages}`, + ); + } + }); }); From 63b4e260e63afd246e25dceb6502bf1ed7389eb3 Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 10:52:20 +0200 Subject: [PATCH 14/28] remove headers\['body-size'\] --- model/attributes/http/http__response__body__size.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/model/attributes/http/http__response__body__size.json b/model/attributes/http/http__response__body__size.json index 083885a6..82486830 100644 --- a/model/attributes/http/http__response__body__size.json +++ b/model/attributes/http/http__response__body__size.json @@ -9,7 +9,6 @@ "example": 123, "alias": [ "http.response_content_length", - "http.response.header.content-length", - "http.response.header['content-length']" + "http.response.header.content-length" ] } From 96683717b72e9fafa6b32b9eaf1a3131250680b6 Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 10:52:32 +0200 Subject: [PATCH 15/28] regenerate --- generated/attributes/http.md | 2 +- javascript/sentry-conventions/src/attributes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generated/attributes/http.md b/generated/attributes/http.md index bda70d70..94f49b6b 100644 --- a/generated/attributes/http.md +++ b/generated/attributes/http.md @@ -229,7 +229,7 @@ The encoded body size of the response (in bytes). | Has PII | false | | Exists in OpenTelemetry | Yes | | Example | `123` | -| Aliases | `http.response_content_length`, `http.response.header.content-length`, `http.response.header['content-length']` | +| Aliases | `http.response_content_length`, `http.response.header.content-length` | ### http.response.header.\ diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 91d89cbc..7d9cc1cd 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -3222,7 +3222,7 @@ export type HTTP_REQUEST_SECURE_CONNECTION_START_TYPE = number; * * Attribute defined in OTEL: Yes * - * Aliases: {@link HTTP_RESPONSE_CONTENT_LENGTH} `http.response_content_length`, {@link HTTP_RESPONSE_HEADER_CONTENT_LENGTH} `http.response.header.content-length`, {@link HTTP_RESPONSE_HEADER['CONTENT_LENGTH']} `http.response.header['content-length']` + * Aliases: {@link HTTP_RESPONSE_CONTENT_LENGTH} `http.response_content_length`, {@link HTTP_RESPONSE_HEADER_CONTENT_LENGTH} `http.response.header.content-length` * * @example 123 */ From e488a75c10c504c5b5a6a3a3df3aa222b91ea552 Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 10:56:45 +0200 Subject: [PATCH 16/28] lint fix --- model/attributes/http/http__response__body__size.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/model/attributes/http/http__response__body__size.json b/model/attributes/http/http__response__body__size.json index 82486830..a125e4f2 100644 --- a/model/attributes/http/http__response__body__size.json +++ b/model/attributes/http/http__response__body__size.json @@ -7,8 +7,5 @@ }, "is_in_otel": true, "example": 123, - "alias": [ - "http.response_content_length", - "http.response.header.content-length" - ] + "alias": ["http.response_content_length", "http.response.header.content-length"] } From 603e689f81e240de9742c2e8a49dbb831f7ee8f5 Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 11:04:01 +0200 Subject: [PATCH 17/28] remove http.response.header\['content-length'\] --- model/attributes/http/http__response_content_length.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/attributes/http/http__response_content_length.json b/model/attributes/http/http__response_content_length.json index 0507ad9a..5e1930d4 100644 --- a/model/attributes/http/http__response_content_length.json +++ b/model/attributes/http/http__response_content_length.json @@ -11,5 +11,5 @@ "_status": "backfill", "replacement": "http.response.body.size" }, - "alias": ["http.response.body.size", "http.response.header.content-length", "http.response.header['content-length']"] + "alias": ["http.response.body.size", "http.response.header.content-length"] } From cc8849f7168d206a2ede53f7d9b587a87d699f07 Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 11:04:26 +0200 Subject: [PATCH 18/28] regenerate --- generated/attributes/http.md | 2 +- javascript/sentry-conventions/src/attributes.ts | 2 +- shared/deprecated_attributes.json | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/generated/attributes/http.md b/generated/attributes/http.md index 94f49b6b..c3d242c7 100644 --- a/generated/attributes/http.md +++ b/generated/attributes/http.md @@ -359,7 +359,7 @@ The encoded body size of the response (in bytes). | Exists in OpenTelemetry | Yes | | Example | `123` | | Deprecated | Yes, use `http.response.body.size` instead | -| Aliases | `http.response.body.size`, `http.response.header.content-length`, `http.response.header['content-length']` | +| Aliases | `http.response.body.size`, `http.response.header.content-length` | ### http.response_transfer_size diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 7d9cc1cd..d7883ccb 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -3332,7 +3332,7 @@ export type HTTP_RESPONSE_STATUS_CODE_TYPE = number; * * Attribute defined in OTEL: Yes * - * Aliases: {@link HTTP_RESPONSE_BODY_SIZE} `http.response.body.size`, {@link HTTP_RESPONSE_HEADER_CONTENT_LENGTH} `http.response.header.content-length`, {@link HTTP_RESPONSE_HEADER['CONTENT_LENGTH']} `http.response.header['content-length']` + * Aliases: {@link HTTP_RESPONSE_BODY_SIZE} `http.response.body.size`, {@link HTTP_RESPONSE_HEADER_CONTENT_LENGTH} `http.response.header.content-length` * * @deprecated Use {@link HTTP_RESPONSE_BODY_SIZE} (http.response.body.size) instead * @example 123 diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index 2b7b2a1b..3708a45b 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -671,11 +671,7 @@ "_status": "backfill", "replacement": "http.response.body.size" }, - "alias": [ - "http.response.body.size", - "http.response.header.content-length", - "http.response.header['content-length']" - ] + "alias": ["http.response.body.size", "http.response.header.content-length"] }, { "key": "http.response_transfer_size", From 180c33c21b02ab95176a56501d78a518ba90a3bb Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 11:36:51 +0200 Subject: [PATCH 19/28] solve all asymmetries --- generated/attributes/ai.md | 13 ++++ generated/attributes/client.md | 2 +- generated/attributes/code.md | 2 +- generated/attributes/gen_ai.md | 2 + generated/attributes/http.md | 8 +-- generated/attributes/net.md | 12 ++-- generated/attributes/network.md | 1 + generated/attributes/server.md | 2 +- .../sentry-conventions/src/attributes.ts | 58 ++++++++++++++---- model/attributes/ai/ai__finish_reason.json | 3 +- .../attributes/ai/ai__frequency_penalty.json | 3 +- model/attributes/ai/ai__function_call.json | 3 +- model/attributes/ai/ai__generation_id.json | 3 +- model/attributes/ai/ai__model__provider.json | 3 +- model/attributes/ai/ai__pipeline__name.json | 3 +- model/attributes/ai/ai__presence_penalty.json | 3 +- model/attributes/ai/ai__seed.json | 3 +- model/attributes/ai/ai__streaming.json | 3 +- model/attributes/ai/ai__temperature.json | 3 +- model/attributes/ai/ai__top_k.json | 3 +- model/attributes/ai/ai__top_p.json | 3 +- .../attributes/ai/ai__total_tokens__used.json | 3 +- model/attributes/client/client__address.json | 2 +- model/attributes/code/code__lineno.json | 2 +- model/attributes/gen_ai/gen_ai__prompt.json | 3 +- .../gen_ai/gen_ai__request__messages.json | 2 +- model/attributes/http/http__flavor.json | 2 +- model/attributes/http/http__host.json | 2 +- model/attributes/http/http__server_name.json | 2 +- model/attributes/http/http__url.json | 2 +- model/attributes/net/net__host__ip.json | 2 +- model/attributes/net/net__host__name.json | 2 +- model/attributes/net/net__peer__ip.json | 2 +- .../net/net__protocol__version.json | 2 +- .../attributes/net/net__sock__host__addr.json | 2 +- .../attributes/net/net__sock__peer__addr.json | 2 +- .../network/network__peer__address.json | 3 +- model/attributes/server/server__address.json | 2 +- shared/deprecated_attributes.json | 61 +++++++++++-------- test/attributes.test.ts | 2 +- 40 files changed, 156 insertions(+), 80 deletions(-) diff --git a/generated/attributes/ai.md b/generated/attributes/ai.md index c8e70ce5..6b22b254 100644 --- a/generated/attributes/ai.md +++ b/generated/attributes/ai.md @@ -211,6 +211,7 @@ The reason why the model stopped generating. | Exists in OpenTelemetry | No | | Example | `COMPLETE` | | Deprecated | Yes, use `gen_ai.response.finish_reason` instead | +| Aliases | `gen_ai.response.finish_reasons` | ### ai.frequency_penalty @@ -223,6 +224,7 @@ Used to reduce repetitiveness of generated tokens. The higher the value, the str | Exists in OpenTelemetry | No | | Example | `0.5` | | Deprecated | Yes, use `gen_ai.request.frequency_penalty` instead | +| Aliases | `gen_ai.request.frequency_penalty` | ### ai.function_call @@ -235,6 +237,7 @@ For an AI model call, the function that was called. This is deprecated for OpenA | Exists in OpenTelemetry | No | | Example | `function_name` | | Deprecated | Yes, use `gen_ai.tool.name` instead | +| Aliases | `gen_ai.tool.name` | ### ai.generation_id @@ -247,6 +250,7 @@ Unique identifier for the completion. | Exists in OpenTelemetry | No | | Example | `gen_123abc` | | Deprecated | Yes, use `gen_ai.response.id` instead | +| Aliases | `gen_ai.response.id` | ### ai.input_messages @@ -285,6 +289,7 @@ The provider of the model. | Exists in OpenTelemetry | No | | Example | `openai` | | Deprecated | Yes, use `gen_ai.system` instead | +| Aliases | `gen_ai.system` | ### ai.pipeline.name @@ -297,6 +302,7 @@ The name of the AI pipeline. | Exists in OpenTelemetry | No | | Example | `Autofix Pipeline` | | Deprecated | Yes, use `gen_ai.pipeline.name` instead | +| Aliases | `gen_ai.pipeline.name` | ### ai.presence_penalty @@ -309,6 +315,7 @@ Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, | Exists in OpenTelemetry | No | | Example | `0.5` | | Deprecated | Yes, use `gen_ai.request.presence_penalty` instead | +| Aliases | `gen_ai.request.presence_penalty` | ### ai.prompt_tokens.used @@ -346,6 +353,7 @@ The seed, ideally models given the same seed and same other parameters will prod | Exists in OpenTelemetry | No | | Example | `1234567890` | | Deprecated | Yes, use `gen_ai.request.seed` instead | +| Aliases | `gen_ai.request.seed` | ### ai.streaming @@ -358,6 +366,7 @@ Whether the request was streamed back. | Exists in OpenTelemetry | No | | Example | `true` | | Deprecated | Yes, use `gen_ai.response.streaming` instead | +| Aliases | `gen_ai.response.streaming` | ### ai.temperature @@ -370,6 +379,7 @@ For an AI model call, the temperature parameter. Temperature essentially means h | Exists in OpenTelemetry | No | | Example | `0.1` | | Deprecated | Yes, use `gen_ai.request.temperature` instead | +| Aliases | `gen_ai.request.temperature` | ### ai.tool_calls @@ -406,6 +416,7 @@ Limits the model to only consider the K most likely next tokens, where K is an i | Exists in OpenTelemetry | No | | Example | `35` | | Deprecated | Yes, use `gen_ai.request.top_k` instead | +| Aliases | `gen_ai.request.top_k` | ### ai.top_p @@ -418,6 +429,7 @@ Limits the model to only consider tokens whose cumulative probability mass adds | Exists in OpenTelemetry | No | | Example | `0.7` | | Deprecated | Yes, use `gen_ai.request.top_p` instead | +| Aliases | `gen_ai.request.top_p` | ### ai.total_tokens.used @@ -430,4 +442,5 @@ The total number of tokens used to process the prompt. | Exists in OpenTelemetry | No | | Example | `30` | | Deprecated | Yes, use `gen_ai.usage.total_tokens` instead | +| Aliases | `gen_ai.usage.total_tokens` | diff --git a/generated/attributes/client.md b/generated/attributes/client.md index 982bfc0b..f3a1e907 100644 --- a/generated/attributes/client.md +++ b/generated/attributes/client.md @@ -18,7 +18,7 @@ Client address - domain name if available without reverse DNS lookup; otherwise, | Has PII | false | | Exists in OpenTelemetry | Yes | | Example | `example.com` | -| Aliases | `http.client_id` | +| Aliases | `http.client_id`, `http.host`, `http.client_ip` | ### client.port diff --git a/generated/attributes/code.md b/generated/attributes/code.md index 8ea475f2..53743ccf 100644 --- a/generated/attributes/code.md +++ b/generated/attributes/code.md @@ -91,7 +91,7 @@ The line number in code.filepath best representing the operation. It SHOULD poin | Exists in OpenTelemetry | Yes | | Example | `42` | | Deprecated | Yes, use `code.line.number` instead | -| Aliases | `code.lineno` | +| Aliases | `code.lineno`, `code.line.number` | ### code.namespace diff --git a/generated/attributes/gen_ai.md b/generated/attributes/gen_ai.md index db595c00..c0ace2e6 100644 --- a/generated/attributes/gen_ai.md +++ b/generated/attributes/gen_ai.md @@ -113,6 +113,7 @@ The input messages sent to the model | Has PII | maybe | | Exists in OpenTelemetry | Yes | | Example | `[{"role": "user", "message": "hello"}]` | +| Aliases | `ai.input_messages`, `gen_ai.request.messages` | ### gen_ai.request.available_tools @@ -158,6 +159,7 @@ The messages passed to the model. It has to be a stringified version of an array | Has PII | maybe | | Exists in OpenTelemetry | No | | Example | `[{"role": "system", "content": "Generate a random number."}, {"role": "user", "content": [{"text": "Generate a random number between 0 and 10.", "type": "text"}]}]` | +| Aliases | `ai.input_messages`, `gen_ai.prompt` | ### gen_ai.request.model diff --git a/generated/attributes/http.md b/generated/attributes/http.md index c3d242c7..efcb9237 100644 --- a/generated/attributes/http.md +++ b/generated/attributes/http.md @@ -319,7 +319,7 @@ The actual version of the protocol used for network communication. | Exists in OpenTelemetry | Yes | | Example | `1.1` | | Deprecated | Yes, use `network.protocol.version` instead | -| Aliases | `network.protocol.version` | +| Aliases | `network.protocol.version`, `net.protocol.version` | ### http.host @@ -333,7 +333,7 @@ The domain name. | Example | `example.com` | | Deprecated | Yes, use `server.address` instead | | Deprecation Reason | Deprecated, use one of `server.address` or `client.address`, depending on the usage | -| Aliases | `server.address`, `client.address` | +| Aliases | `server.address`, `client.address`, `http.server_name`, `net.host.name` | ### http.method @@ -398,7 +398,7 @@ The server domain name | Exists in OpenTelemetry | Yes | | Example | `example.com` | | Deprecated | Yes, use `server.address` instead | -| Aliases | `server.address` | +| Aliases | `server.address`, `net.host.name`, `http.host` | ### http.status_code @@ -437,7 +437,7 @@ The URL of the resource that was fetched. | Exists in OpenTelemetry | Yes | | Example | `https://example.com/test?foo=bar#buzz` | | Deprecated | Yes, use `url.full` instead | -| Aliases | `url.full`, `http.url` | +| Aliases | `url.full`, `http.url`, `url` | ### http.user_agent diff --git a/generated/attributes/net.md b/generated/attributes/net.md index cc9d2e83..9f2ed57d 100644 --- a/generated/attributes/net.md +++ b/generated/attributes/net.md @@ -34,7 +34,7 @@ Local address of the network connection - IP address or Unix domain socket name. | Exists in OpenTelemetry | Yes | | Example | `192.168.0.1` | | Deprecated | Yes, use `network.local.address` instead | -| Aliases | `network.local.address` | +| Aliases | `network.local.address`, `net.sock.host.addr` | ### net.host.name @@ -47,7 +47,7 @@ Server domain name if available without reverse DNS lookup; otherwise, IP addres | Exists in OpenTelemetry | Yes | | Example | `example.com` | | Deprecated | Yes, use `server.address` instead | -| Aliases | `server.address` | +| Aliases | `server.address`, `http.server_name`, `http.host` | ### net.host.port @@ -73,7 +73,7 @@ Peer address of the network connection - IP address or Unix domain socket name. | Exists in OpenTelemetry | Yes | | Example | `192.168.0.1` | | Deprecated | Yes, use `network.peer.address` instead | -| Aliases | `network.peer.address` | +| Aliases | `network.peer.address`, `net.sock.peer.addr` | ### net.peer.name @@ -125,7 +125,7 @@ The actual version of the protocol used for network communication. | Exists in OpenTelemetry | Yes | | Example | `1.1` | | Deprecated | Yes, use `network.protocol.version` instead | -| Aliases | `network.protocol.version` | +| Aliases | `network.protocol.version`, `http.flavor` | ### net.sock.family @@ -151,7 +151,7 @@ Local address of the network connection mapping to Unix domain socket name. | Exists in OpenTelemetry | Yes | | Example | `/var/my.sock` | | Deprecated | Yes, use `network.local.address` instead | -| Aliases | `network.local.address` | +| Aliases | `network.local.address`, `net.host.ip` | ### net.sock.host.port @@ -177,7 +177,7 @@ Peer address of the network connection - IP address | Exists in OpenTelemetry | Yes | | Example | `192.168.0.1` | | Deprecated | Yes, use `network.peer.address` instead | -| Aliases | `network.peer.address` | +| Aliases | `network.peer.address`, `net.peer.ip` | ### net.sock.peer.name diff --git a/generated/attributes/network.md b/generated/attributes/network.md index 7ebaa040..d4731293 100644 --- a/generated/attributes/network.md +++ b/generated/attributes/network.md @@ -48,6 +48,7 @@ Peer address of the network connection - IP address or Unix domain socket name. | Has PII | false | | Exists in OpenTelemetry | Yes | | Example | `10.1.2.80` | +| Aliases | `net.peer.ip`, `net.sock.peer.addr` | ### network.peer.port diff --git a/generated/attributes/server.md b/generated/attributes/server.md index 77c5287a..40e716bb 100644 --- a/generated/attributes/server.md +++ b/generated/attributes/server.md @@ -18,7 +18,7 @@ Server domain name if available without reverse DNS lookup; otherwise, IP addres | Has PII | false | | Exists in OpenTelemetry | Yes | | Example | `example.com` | -| Aliases | `http.server_name`, `net.host.name` | +| Aliases | `http.server_name`, `net.host.name`, `http.host` | ### server.port diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index d7883ccb..7843d18f 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -74,6 +74,8 @@ export type AI_DOCUMENTS_TYPE = Array; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_RESPONSE_FINISH_REASONS} `gen_ai.response.finish_reasons` + * * @deprecated Use {@link GEN_AI_RESPONSE_FINISH_REASON} (gen_ai.response.finish_reason) instead * @example "COMPLETE" */ @@ -95,6 +97,8 @@ export type AI_FINISH_REASON_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_REQUEST_FREQUENCY_PENALTY} `gen_ai.request.frequency_penalty` + * * @deprecated Use {@link GEN_AI_REQUEST_FREQUENCY_PENALTY} (gen_ai.request.frequency_penalty) instead * @example 0.5 */ @@ -116,6 +120,8 @@ export type AI_FREQUENCY_PENALTY_TYPE = number; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_TOOL_NAME} `gen_ai.tool.name` + * * @deprecated Use {@link GEN_AI_TOOL_NAME} (gen_ai.tool.name) instead * @example "function_name" */ @@ -137,6 +143,8 @@ export type AI_FUNCTION_CALL_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_RESPONSE_ID} `gen_ai.response.id` + * * @deprecated Use {@link GEN_AI_RESPONSE_ID} (gen_ai.response.id) instead * @example "gen_123abc" */ @@ -221,6 +229,8 @@ export type AI_METADATA_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_SYSTEM} `gen_ai.system` + * * @deprecated Use {@link GEN_AI_SYSTEM} (gen_ai.system) instead * @example "openai" */ @@ -265,6 +275,8 @@ export type AI_MODEL_ID_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_PIPELINE_NAME} `gen_ai.pipeline.name` + * * @deprecated Use {@link GEN_AI_PIPELINE_NAME} (gen_ai.pipeline.name) instead * @example "Autofix Pipeline" */ @@ -306,6 +318,8 @@ export type AI_PREAMBLE_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_REQUEST_PRESENCE_PENALTY} `gen_ai.request.presence_penalty` + * * @deprecated Use {@link GEN_AI_REQUEST_PRESENCE_PENALTY} (gen_ai.request.presence_penalty) instead * @example 0.5 */ @@ -451,6 +465,8 @@ export type AI_SEARCH_RESULTS_TYPE = Array; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_REQUEST_SEED} `gen_ai.request.seed` + * * @deprecated Use {@link GEN_AI_REQUEST_SEED} (gen_ai.request.seed) instead * @example "1234567890" */ @@ -472,6 +488,8 @@ export type AI_SEED_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_RESPONSE_STREAMING} `gen_ai.response.streaming` + * * @deprecated Use {@link GEN_AI_RESPONSE_STREAMING} (gen_ai.response.streaming) instead * @example true */ @@ -513,6 +531,8 @@ export type AI_TAGS_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_REQUEST_TEMPERATURE} `gen_ai.request.temperature` + * * @deprecated Use {@link GEN_AI_REQUEST_TEMPERATURE} (gen_ai.request.temperature) instead * @example 0.1 */ @@ -596,6 +616,8 @@ export type AI_TOOLS_TYPE = Array; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_REQUEST_TOP_K} `gen_ai.request.top_k` + * * @deprecated Use {@link GEN_AI_REQUEST_TOP_K} (gen_ai.request.top_k) instead * @example 35 */ @@ -617,6 +639,8 @@ export type AI_TOP_K_TYPE = number; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_REQUEST_TOP_P} `gen_ai.request.top_p` + * * @deprecated Use {@link GEN_AI_REQUEST_TOP_P} (gen_ai.request.top_p) instead * @example 0.7 */ @@ -658,6 +682,8 @@ export type AI_TOTAL_COST_TYPE = number; * * Attribute defined in OTEL: No * + * Aliases: {@link GEN_AI_USAGE_TOTAL_TOKENS} `gen_ai.usage.total_tokens` + * * @deprecated Use {@link GEN_AI_USAGE_TOTAL_TOKENS} (gen_ai.usage.total_tokens) instead * @example 30 */ @@ -979,7 +1005,7 @@ export type CHANNEL_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link HTTP_CLIENT_ID} `http.client_id` + * Aliases: {@link HTTP_CLIENT_ID} `http.client_id`, {@link HTTP_HOST} `http.host`, {@link HTTP_CLIENT_IP} `http.client_ip` * * @example "example.com" */ @@ -1193,7 +1219,7 @@ export type CODE_LINE_NUMBER_TYPE = number; * * Attribute defined in OTEL: Yes * - * Aliases: {@link CODE_LINENO} `code.lineno` + * Aliases: {@link CODE_LINENO} `code.lineno`, {@link CODE_LINE_NUMBER} `code.line.number` * * @deprecated Use {@link CODE_LINE_NUMBER} (code.line.number) instead * @example 42 @@ -2030,6 +2056,8 @@ export type GEN_AI_PIPELINE_NAME_TYPE = string; * * Attribute defined in OTEL: Yes * + * Aliases: {@link AI_INPUT_MESSAGES} `ai.input_messages`, {@link GEN_AI_REQUEST_MESSAGES} `gen_ai.request.messages` + * * @example "[{\"role\": \"user\", \"message\": \"hello\"}]" */ export const GEN_AI_PROMPT = 'gen_ai.prompt'; @@ -2112,6 +2140,8 @@ export type GEN_AI_REQUEST_MAX_TOKENS_TYPE = number; * * Attribute defined in OTEL: No * + * Aliases: {@link AI_INPUT_MESSAGES} `ai.input_messages`, {@link GEN_AI_PROMPT} `gen_ai.prompt` + * * @example "[{\"role\": \"system\", \"content\": \"Generate a random number.\"}, {\"role\": \"user\", \"content\": [{\"text\": \"Generate a random number between 0 and 10.\", \"type\": \"text\"}]}]" */ export const GEN_AI_REQUEST_MESSAGES = 'gen_ai.request.messages'; @@ -2849,7 +2879,7 @@ export type HTTP_DECODED_RESPONSE_CONTENT_LENGTH_TYPE = number; * * Attribute defined in OTEL: Yes * - * Aliases: {@link NETWORK_PROTOCOL_VERSION} `network.protocol.version` + * Aliases: {@link NETWORK_PROTOCOL_VERSION} `network.protocol.version`, {@link NET_PROTOCOL_VERSION} `net.protocol.version` * * @deprecated Use {@link NETWORK_PROTOCOL_VERSION} (network.protocol.version) instead * @example "1.1" @@ -2892,7 +2922,7 @@ export type HTTP_FRAGMENT_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link SERVER_ADDRESS} `server.address`, {@link CLIENT_ADDRESS} `client.address` + * Aliases: {@link SERVER_ADDRESS} `server.address`, {@link CLIENT_ADDRESS} `client.address`, {@link HTTP_SERVER_NAME} `http.server_name`, {@link NET_HOST_NAME} `net.host.name` * * @deprecated Use {@link SERVER_ADDRESS} (server.address) instead - Deprecated, use one of `server.address` or `client.address`, depending on the usage * @example "example.com" @@ -3423,7 +3453,7 @@ export type HTTP_SCHEME_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link SERVER_ADDRESS} `server.address` + * Aliases: {@link SERVER_ADDRESS} `server.address`, {@link NET_HOST_NAME} `net.host.name`, {@link HTTP_HOST} `http.host` * * @deprecated Use {@link SERVER_ADDRESS} (server.address) instead * @example "example.com" @@ -3490,7 +3520,7 @@ export type HTTP_TARGET_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link URL_FULL} `url.full`, {@link HTTP_URL} `http.url` + * Aliases: {@link URL_FULL} `url.full`, {@link HTTP_URL} `http.url`, {@link URL} `url` * * @deprecated Use {@link URL_FULL} (url.full) instead * @example "https://example.com/test?foo=bar#buzz" @@ -4099,7 +4129,7 @@ export type NEL_TYPE_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link NETWORK_LOCAL_ADDRESS} `network.local.address` + * Aliases: {@link NETWORK_LOCAL_ADDRESS} `network.local.address`, {@link NET_SOCK_HOST_ADDR} `net.sock.host.addr` * * @deprecated Use {@link NETWORK_LOCAL_ADDRESS} (network.local.address) instead * @example "192.168.0.1" @@ -4122,7 +4152,7 @@ export type NET_HOST_IP_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link SERVER_ADDRESS} `server.address` + * Aliases: {@link SERVER_ADDRESS} `server.address`, {@link HTTP_SERVER_NAME} `http.server_name`, {@link HTTP_HOST} `http.host` * * @deprecated Use {@link SERVER_ADDRESS} (server.address) instead * @example "example.com" @@ -4168,7 +4198,7 @@ export type NET_HOST_PORT_TYPE = number; * * Attribute defined in OTEL: Yes * - * Aliases: {@link NETWORK_PEER_ADDRESS} `network.peer.address` + * Aliases: {@link NETWORK_PEER_ADDRESS} `network.peer.address`, {@link NET_SOCK_PEER_ADDR} `net.sock.peer.addr` * * @deprecated Use {@link NETWORK_PEER_ADDRESS} (network.peer.address) instead * @example "192.168.0.1" @@ -4256,7 +4286,7 @@ export type NET_PROTOCOL_NAME_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link NETWORK_PROTOCOL_VERSION} `network.protocol.version` + * Aliases: {@link NETWORK_PROTOCOL_VERSION} `network.protocol.version`, {@link HTTP_FLAVOR} `http.flavor` * * @deprecated Use {@link NETWORK_PROTOCOL_VERSION} (network.protocol.version) instead * @example "1.1" @@ -4300,7 +4330,7 @@ export type NET_SOCK_FAMILY_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link NETWORK_LOCAL_ADDRESS} `network.local.address` + * Aliases: {@link NETWORK_LOCAL_ADDRESS} `network.local.address`, {@link NET_HOST_IP} `net.host.ip` * * @deprecated Use {@link NETWORK_LOCAL_ADDRESS} (network.local.address) instead * @example "/var/my.sock" @@ -4346,7 +4376,7 @@ export type NET_SOCK_HOST_PORT_TYPE = number; * * Attribute defined in OTEL: Yes * - * Aliases: {@link NETWORK_PEER_ADDRESS} `network.peer.address` + * Aliases: {@link NETWORK_PEER_ADDRESS} `network.peer.address`, {@link NET_PEER_IP} `net.peer.ip` * * @deprecated Use {@link NETWORK_PEER_ADDRESS} (network.peer.address) instead * @example "192.168.0.1" @@ -4478,6 +4508,8 @@ export type NETWORK_LOCAL_PORT_TYPE = number; * * Attribute defined in OTEL: Yes * + * Aliases: {@link NET_PEER_IP} `net.peer.ip`, {@link NET_SOCK_PEER_ADDR} `net.sock.peer.addr` + * * @example "10.1.2.80" */ export const NETWORK_PEER_ADDRESS = 'network.peer.address'; @@ -5597,7 +5629,7 @@ export type SENTRY_TRANSACTION_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link HTTP_SERVER_NAME} `http.server_name`, {@link NET_HOST_NAME} `net.host.name` + * Aliases: {@link HTTP_SERVER_NAME} `http.server_name`, {@link NET_HOST_NAME} `net.host.name`, {@link HTTP_HOST} `http.host` * * @example "example.com" */ diff --git a/model/attributes/ai/ai__finish_reason.json b/model/attributes/ai/ai__finish_reason.json index e8474108..71c0cb51 100644 --- a/model/attributes/ai/ai__finish_reason.json +++ b/model/attributes/ai/ai__finish_reason.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.response.finish_reason" - } + }, + "alias": ["gen_ai.response.finish_reasons"] } diff --git a/model/attributes/ai/ai__frequency_penalty.json b/model/attributes/ai/ai__frequency_penalty.json index 59acfbbd..0f10afb4 100644 --- a/model/attributes/ai/ai__frequency_penalty.json +++ b/model/attributes/ai/ai__frequency_penalty.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.frequency_penalty" - } + }, + "alias": ["gen_ai.request.frequency_penalty"] } diff --git a/model/attributes/ai/ai__function_call.json b/model/attributes/ai/ai__function_call.json index 8223920f..6d8eb366 100644 --- a/model/attributes/ai/ai__function_call.json +++ b/model/attributes/ai/ai__function_call.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.tool.name" - } + }, + "alias": ["gen_ai.tool.name"] } diff --git a/model/attributes/ai/ai__generation_id.json b/model/attributes/ai/ai__generation_id.json index a75fab69..f9b16902 100644 --- a/model/attributes/ai/ai__generation_id.json +++ b/model/attributes/ai/ai__generation_id.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.response.id" - } + }, + "alias": ["gen_ai.response.id"] } diff --git a/model/attributes/ai/ai__model__provider.json b/model/attributes/ai/ai__model__provider.json index 8718efcc..313377a9 100644 --- a/model/attributes/ai/ai__model__provider.json +++ b/model/attributes/ai/ai__model__provider.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.system" - } + }, + "alias": ["gen_ai.system"] } diff --git a/model/attributes/ai/ai__pipeline__name.json b/model/attributes/ai/ai__pipeline__name.json index 85ccc63b..9dc7fdd7 100644 --- a/model/attributes/ai/ai__pipeline__name.json +++ b/model/attributes/ai/ai__pipeline__name.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.pipeline.name" - } + }, + "alias": ["gen_ai.pipeline.name"] } diff --git a/model/attributes/ai/ai__presence_penalty.json b/model/attributes/ai/ai__presence_penalty.json index d923f4a4..25668fe3 100644 --- a/model/attributes/ai/ai__presence_penalty.json +++ b/model/attributes/ai/ai__presence_penalty.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.presence_penalty" - } + }, + "alias": ["gen_ai.request.presence_penalty"] } diff --git a/model/attributes/ai/ai__seed.json b/model/attributes/ai/ai__seed.json index 794e62f4..a56f4d0e 100644 --- a/model/attributes/ai/ai__seed.json +++ b/model/attributes/ai/ai__seed.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.seed" - } + }, + "alias": ["gen_ai.request.seed"] } diff --git a/model/attributes/ai/ai__streaming.json b/model/attributes/ai/ai__streaming.json index d2c26e73..f20b5a8e 100644 --- a/model/attributes/ai/ai__streaming.json +++ b/model/attributes/ai/ai__streaming.json @@ -11,5 +11,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.response.streaming" - } + }, + "alias": ["gen_ai.response.streaming"] } diff --git a/model/attributes/ai/ai__temperature.json b/model/attributes/ai/ai__temperature.json index 0b40ae41..222f6d89 100644 --- a/model/attributes/ai/ai__temperature.json +++ b/model/attributes/ai/ai__temperature.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.temperature" - } + }, + "alias": ["gen_ai.request.temperature"] } diff --git a/model/attributes/ai/ai__top_k.json b/model/attributes/ai/ai__top_k.json index f8ef6df3..9262a49d 100644 --- a/model/attributes/ai/ai__top_k.json +++ b/model/attributes/ai/ai__top_k.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.top_k" - } + }, + "alias": ["gen_ai.request.top_k"] } diff --git a/model/attributes/ai/ai__top_p.json b/model/attributes/ai/ai__top_p.json index f18d9b2d..d961981c 100644 --- a/model/attributes/ai/ai__top_p.json +++ b/model/attributes/ai/ai__top_p.json @@ -10,5 +10,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.top_p" - } + }, + "alias": ["gen_ai.request.top_p"] } diff --git a/model/attributes/ai/ai__total_tokens__used.json b/model/attributes/ai/ai__total_tokens__used.json index e39fccf3..826233d5 100644 --- a/model/attributes/ai/ai__total_tokens__used.json +++ b/model/attributes/ai/ai__total_tokens__used.json @@ -11,5 +11,6 @@ "deprecation": { "_status": null, "replacement": "gen_ai.usage.total_tokens" - } + }, + "alias": ["gen_ai.usage.total_tokens"] } diff --git a/model/attributes/client/client__address.json b/model/attributes/client/client__address.json index 693bee59..6421c7c0 100644 --- a/model/attributes/client/client__address.json +++ b/model/attributes/client/client__address.json @@ -7,5 +7,5 @@ }, "is_in_otel": true, "example": "example.com", - "alias": ["http.client_id"] + "alias": ["http.client_id", "http.host", "http.client_ip"] } diff --git a/model/attributes/code/code__lineno.json b/model/attributes/code/code__lineno.json index 8d566162..6e38234c 100644 --- a/model/attributes/code/code__lineno.json +++ b/model/attributes/code/code__lineno.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "code.line.number" }, - "alias": ["code.lineno"] + "alias": ["code.lineno", "code.line.number"] } diff --git a/model/attributes/gen_ai/gen_ai__prompt.json b/model/attributes/gen_ai/gen_ai__prompt.json index 8cec3f6e..3013673f 100644 --- a/model/attributes/gen_ai/gen_ai__prompt.json +++ b/model/attributes/gen_ai/gen_ai__prompt.json @@ -6,5 +6,6 @@ "key": "maybe" }, "is_in_otel": true, - "example": "[{\"role\": \"user\", \"message\": \"hello\"}]" + "example": "[{\"role\": \"user\", \"message\": \"hello\"}]", + "alias": ["ai.input_messages", "gen_ai.request.messages"] } diff --git a/model/attributes/gen_ai/gen_ai__request__messages.json b/model/attributes/gen_ai/gen_ai__request__messages.json index ce7ee28b..e41915f1 100644 --- a/model/attributes/gen_ai/gen_ai__request__messages.json +++ b/model/attributes/gen_ai/gen_ai__request__messages.json @@ -7,5 +7,5 @@ }, "is_in_otel": false, "example": "[{\"role\": \"system\", \"content\": \"Generate a random number.\"}, {\"role\": \"user\", \"content\": [{\"text\": \"Generate a random number between 0 and 10.\", \"type\": \"text\"}]}]", - "alias": [] + "alias": ["ai.input_messages", "gen_ai.prompt"] } diff --git a/model/attributes/http/http__flavor.json b/model/attributes/http/http__flavor.json index bef163e9..e3767100 100644 --- a/model/attributes/http/http__flavor.json +++ b/model/attributes/http/http__flavor.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "network.protocol.version" }, - "alias": ["network.protocol.version"] + "alias": ["network.protocol.version", "net.protocol.version"] } diff --git a/model/attributes/http/http__host.json b/model/attributes/http/http__host.json index 983f5b6c..44454dd6 100644 --- a/model/attributes/http/http__host.json +++ b/model/attributes/http/http__host.json @@ -12,5 +12,5 @@ "replacement": "server.address", "reason": "Deprecated, use one of `server.address` or `client.address`, depending on the usage" }, - "alias": ["server.address", "client.address"] + "alias": ["server.address", "client.address", "http.server_name", "net.host.name"] } diff --git a/model/attributes/http/http__server_name.json b/model/attributes/http/http__server_name.json index 303a37d5..6013bec5 100644 --- a/model/attributes/http/http__server_name.json +++ b/model/attributes/http/http__server_name.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "server.address" }, - "alias": ["server.address"] + "alias": ["server.address", "net.host.name", "http.host"] } diff --git a/model/attributes/http/http__url.json b/model/attributes/http/http__url.json index 02635f96..9624d189 100644 --- a/model/attributes/http/http__url.json +++ b/model/attributes/http/http__url.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "url.full" }, - "alias": ["url.full", "http.url"] + "alias": ["url.full", "http.url", "url"] } diff --git a/model/attributes/net/net__host__ip.json b/model/attributes/net/net__host__ip.json index 65f0d84c..ed2f2842 100644 --- a/model/attributes/net/net__host__ip.json +++ b/model/attributes/net/net__host__ip.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "network.local.address" }, - "alias": ["network.local.address"] + "alias": ["network.local.address", "net.sock.host.addr"] } diff --git a/model/attributes/net/net__host__name.json b/model/attributes/net/net__host__name.json index 8c3cc500..5750fdf8 100644 --- a/model/attributes/net/net__host__name.json +++ b/model/attributes/net/net__host__name.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "server.address" }, - "alias": ["server.address"] + "alias": ["server.address", "http.server_name", "http.host"] } diff --git a/model/attributes/net/net__peer__ip.json b/model/attributes/net/net__peer__ip.json index fbc3dd2e..17cc4761 100644 --- a/model/attributes/net/net__peer__ip.json +++ b/model/attributes/net/net__peer__ip.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "network.peer.address" }, - "alias": ["network.peer.address"] + "alias": ["network.peer.address", "net.sock.peer.addr"] } diff --git a/model/attributes/net/net__protocol__version.json b/model/attributes/net/net__protocol__version.json index 61765880..de85a32a 100644 --- a/model/attributes/net/net__protocol__version.json +++ b/model/attributes/net/net__protocol__version.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "network.protocol.version" }, - "alias": ["network.protocol.version"] + "alias": ["network.protocol.version", "http.flavor"] } diff --git a/model/attributes/net/net__sock__host__addr.json b/model/attributes/net/net__sock__host__addr.json index 7eccb615..938b79bf 100644 --- a/model/attributes/net/net__sock__host__addr.json +++ b/model/attributes/net/net__sock__host__addr.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "network.local.address" }, - "alias": ["network.local.address"] + "alias": ["network.local.address", "net.host.ip"] } diff --git a/model/attributes/net/net__sock__peer__addr.json b/model/attributes/net/net__sock__peer__addr.json index 4f0f4292..6b4ad892 100644 --- a/model/attributes/net/net__sock__peer__addr.json +++ b/model/attributes/net/net__sock__peer__addr.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "network.peer.address" }, - "alias": ["network.peer.address"] + "alias": ["network.peer.address", "net.peer.ip"] } diff --git a/model/attributes/network/network__peer__address.json b/model/attributes/network/network__peer__address.json index 5293dc97..fede814d 100644 --- a/model/attributes/network/network__peer__address.json +++ b/model/attributes/network/network__peer__address.json @@ -6,5 +6,6 @@ "key": "false" }, "is_in_otel": true, - "example": "10.1.2.80" + "example": "10.1.2.80", + "alias": ["net.peer.ip", "net.sock.peer.addr"] } diff --git a/model/attributes/server/server__address.json b/model/attributes/server/server__address.json index 4cf52df5..24598fa1 100644 --- a/model/attributes/server/server__address.json +++ b/model/attributes/server/server__address.json @@ -7,5 +7,5 @@ }, "is_in_otel": true, "example": "example.com", - "alias": ["http.server_name", "net.host.name"] + "alias": ["http.server_name", "net.host.name", "http.host"] } diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index 3708a45b..7d87c5dc 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -168,7 +168,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.response.finish_reason" - } + }, + "alias": ["gen_ai.response.finish_reasons"] }, { "key": "ai.frequency_penalty", @@ -182,7 +183,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.frequency_penalty" - } + }, + "alias": ["gen_ai.request.frequency_penalty"] }, { "key": "ai.function_call", @@ -196,7 +198,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.tool.name" - } + }, + "alias": ["gen_ai.tool.name"] }, { "key": "ai.generation_id", @@ -210,7 +213,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.response.id" - } + }, + "alias": ["gen_ai.response.id"] }, { "key": "ai.input_messages", @@ -240,7 +244,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.system" - } + }, + "alias": ["gen_ai.system"] }, { "key": "ai.model_id", @@ -270,7 +275,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.pipeline.name" - } + }, + "alias": ["gen_ai.pipeline.name"] }, { "key": "ai.presence_penalty", @@ -284,7 +290,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.presence_penalty" - } + }, + "alias": ["gen_ai.request.presence_penalty"] }, { "key": "ai.prompt_tokens.used", @@ -329,7 +336,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.seed" - } + }, + "alias": ["gen_ai.request.seed"] }, { "key": "ai.streaming", @@ -344,7 +352,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.response.streaming" - } + }, + "alias": ["gen_ai.response.streaming"] }, { "key": "ai.temperature", @@ -358,7 +367,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.temperature" - } + }, + "alias": ["gen_ai.request.temperature"] }, { "key": "ai.tool_calls", @@ -400,7 +410,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.top_k" - } + }, + "alias": ["gen_ai.request.top_k"] }, { "key": "ai.top_p", @@ -414,7 +425,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.request.top_p" - } + }, + "alias": ["gen_ai.request.top_p"] }, { "key": "ai.total_tokens.used", @@ -429,7 +441,8 @@ "deprecation": { "_status": null, "replacement": "gen_ai.usage.total_tokens" - } + }, + "alias": ["gen_ai.usage.total_tokens"] }, { "key": "code.filepath", @@ -474,7 +487,7 @@ "_status": null, "replacement": "code.line.number" }, - "alias": ["code.lineno"] + "alias": ["code.lineno", "code.line.number"] }, { "key": "code.namespace", @@ -625,7 +638,7 @@ "_status": null, "replacement": "network.protocol.version" }, - "alias": ["network.protocol.version"] + "alias": ["network.protocol.version", "net.protocol.version"] }, { "key": "http.host", @@ -641,7 +654,7 @@ "replacement": "server.address", "reason": "Deprecated, use one of `server.address` or `client.address`, depending on the usage" }, - "alias": ["server.address", "client.address"] + "alias": ["server.address", "client.address", "http.server_name", "net.host.name"] }, { "key": "http.method", @@ -716,7 +729,7 @@ "_status": null, "replacement": "server.address" }, - "alias": ["server.address"] + "alias": ["server.address", "net.host.name", "http.host"] }, { "key": "http.status_code", @@ -761,7 +774,7 @@ "_status": null, "replacement": "url.full" }, - "alias": ["url.full", "http.url"] + "alias": ["url.full", "http.url", "url"] }, { "key": "http.user_agent", @@ -791,7 +804,7 @@ "_status": null, "replacement": "network.local.address" }, - "alias": ["network.local.address"] + "alias": ["network.local.address", "net.sock.host.addr"] }, { "key": "net.host.name", @@ -806,7 +819,7 @@ "_status": null, "replacement": "server.address" }, - "alias": ["server.address"] + "alias": ["server.address", "http.server_name", "http.host"] }, { "key": "net.host.port", @@ -836,7 +849,7 @@ "_status": null, "replacement": "network.peer.address" }, - "alias": ["network.peer.address"] + "alias": ["network.peer.address", "net.sock.peer.addr"] }, { "key": "net.peer.name", @@ -896,7 +909,7 @@ "_status": null, "replacement": "network.protocol.version" }, - "alias": ["network.protocol.version"] + "alias": ["network.protocol.version", "http.flavor"] }, { "key": "net.sock.family", @@ -926,7 +939,7 @@ "_status": null, "replacement": "network.local.address" }, - "alias": ["network.local.address"] + "alias": ["network.local.address", "net.host.ip"] }, { "key": "net.sock.host.port", @@ -956,7 +969,7 @@ "_status": null, "replacement": "network.peer.address" }, - "alias": ["network.peer.address"] + "alias": ["network.peer.address", "net.peer.ip"] }, { "key": "net.sock.peer.name", diff --git a/test/attributes.test.ts b/test/attributes.test.ts index 03ed6b67..02a47694 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -140,7 +140,7 @@ describe('alias group consistency', async () => { attributes.set(content.key, content); } - it('should have consistent alias groups', () => { + it('aliases should be symmetric', () => { // Build alias groups: if X has aliases [Y, Z], then the group is [X, Y, Z] const aliasGroups = new Map>(); const processedKeys = new Set(); From bfedff897bcebd96254e4f49ebd7506ed832e23e Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 11:58:05 +0200 Subject: [PATCH 20/28] unalias http.route and url.template, deprecate params.key --- model/attributes/http/http__route.json | 3 +-- model/attributes/params/params__[key].json | 4 ++++ model/attributes/url/url__template.json | 5 ++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/model/attributes/http/http__route.json b/model/attributes/http/http__route.json index a359461b..7a8d86a5 100644 --- a/model/attributes/http/http__route.json +++ b/model/attributes/http/http__route.json @@ -6,6 +6,5 @@ "key": "false" }, "is_in_otel": true, - "example": "/users/:id", - "alias": ["url.template"] + "example": "/users/:id" } diff --git a/model/attributes/params/params__[key].json b/model/attributes/params/params__[key].json index 6bba2668..5018889f 100644 --- a/model/attributes/params/params__[key].json +++ b/model/attributes/params/params__[key].json @@ -7,6 +7,10 @@ "key": "maybe" }, "is_in_otel": false, + "deprecation": { + "_status": "normalize", + "replacement": "url.path.parameter." + }, "example": "params.id='123'", "alias": ["url.path.parameter."] } diff --git a/model/attributes/url/url__template.json b/model/attributes/url/url__template.json index 51664baf..5e737602 100644 --- a/model/attributes/url/url__template.json +++ b/model/attributes/url/url__template.json @@ -1,11 +1,10 @@ { "key": "url.template", - "brief": "The low-cardinality template of an absolute path reference.", + "brief": "The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).", "type": "string", "pii": { "key": "false" }, "is_in_otel": true, - "example": "/users/:id", - "alias": ["http.route"] + "example": "/users/:id" } From 6d304146a53d620196908c89b11edaa51a16a31a Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 11:59:34 +0200 Subject: [PATCH 21/28] alias route <> http_route --- model/attributes/http/http__route.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/attributes/http/http__route.json b/model/attributes/http/http__route.json index 7a8d86a5..60d904e3 100644 --- a/model/attributes/http/http__route.json +++ b/model/attributes/http/http__route.json @@ -6,5 +6,6 @@ "key": "false" }, "is_in_otel": true, - "example": "/users/:id" + "example": "/users/:id", + "alias": ["route"] } From 3ef50789d860519cf8201f4e7007bda7e0654806 Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 12:37:51 +0200 Subject: [PATCH 22/28] address remaining items --- model/attributes/gen_ai/gen_ai__prompt.json | 5 +++++ .../http/http__response__header__content-length.json | 4 ++++ model/attributes/release.json | 2 +- model/attributes/sentry/sentry__release.json | 4 ++++ model/attributes/service/service__version.json | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/model/attributes/gen_ai/gen_ai__prompt.json b/model/attributes/gen_ai/gen_ai__prompt.json index 3013673f..4fb224bb 100644 --- a/model/attributes/gen_ai/gen_ai__prompt.json +++ b/model/attributes/gen_ai/gen_ai__prompt.json @@ -6,6 +6,11 @@ "key": "maybe" }, "is_in_otel": true, + "deprecation": { + "_status": null, + "replacement": "gen_ai.request.messages", + "reason": "Deprecated, use gen_ai.request.messages with the new format instead." + }, "example": "[{\"role\": \"user\", \"message\": \"hello\"}]", "alias": ["ai.input_messages", "gen_ai.request.messages"] } diff --git a/model/attributes/http/http__response__header__content-length.json b/model/attributes/http/http__response__header__content-length.json index 7cc68308..d876b755 100644 --- a/model/attributes/http/http__response__header__content-length.json +++ b/model/attributes/http/http__response__header__content-length.json @@ -7,5 +7,9 @@ }, "is_in_otel": true, "example": "http.response.header.custom-header=['foo', 'bar']", + "deprecation": { + "_status": "normalize", + "replacement": "http.response.body.size" + }, "alias": ["http.response_content_length", "http.response.body.size"] } diff --git a/model/attributes/release.json b/model/attributes/release.json index 1824e60d..e245818a 100644 --- a/model/attributes/release.json +++ b/model/attributes/release.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "sentry.release" }, - "alias": ["sentry.release"] + "alias": ["sentry.release", "service.version"] } diff --git a/model/attributes/sentry/sentry__release.json b/model/attributes/sentry/sentry__release.json index 8c527afa..f5ca8063 100644 --- a/model/attributes/sentry/sentry__release.json +++ b/model/attributes/sentry/sentry__release.json @@ -6,6 +6,10 @@ "key": "false" }, "is_in_otel": false, + "deprecation": { + "_status": "backfill", + "replacement": "service.version" + }, "example": "7.0.0", "alias": ["service.version", "release"] } diff --git a/model/attributes/service/service__version.json b/model/attributes/service/service__version.json index 44c1233b..0d75497b 100644 --- a/model/attributes/service/service__version.json +++ b/model/attributes/service/service__version.json @@ -7,5 +7,5 @@ }, "is_in_otel": true, "example": "5.0.0", - "alias": ["sentry.release"] + "alias": ["sentry.release", "release"] } From cd05abf9594cd8f865a5825d5e9383cbc3324c2d Mon Sep 17 00:00:00 2001 From: lcian Date: Fri, 29 Aug 2025 12:38:39 +0200 Subject: [PATCH 23/28] generate and lint --- generated/attributes/gen_ai.md | 28 ++++---- generated/attributes/general.md | 2 +- generated/attributes/http.md | 29 +++++---- generated/attributes/params.md | 7 +- generated/attributes/sentry.md | 32 ++++++---- generated/attributes/service.md | 2 +- generated/attributes/url.md | 3 +- .../sentry-conventions/src/attributes.ts | 18 +++--- model/attributes/gen_ai/gen_ai__prompt.json | 6 +- ...ttp__response__header__content-length.json | 2 +- model/attributes/params/params__[key].json | 4 +- model/attributes/sentry/sentry__release.json | 4 +- .../attributes/service/service__version.json | 2 +- shared/deprecated_attributes.json | 64 ++++++++++++++++++- 14 files changed, 137 insertions(+), 66 deletions(-) diff --git a/generated/attributes/gen_ai.md b/generated/attributes/gen_ai.md index c0ace2e6..02b24b8b 100644 --- a/generated/attributes/gen_ai.md +++ b/generated/attributes/gen_ai.md @@ -8,7 +8,6 @@ - [gen_ai.choice](#gen_aichoice) - [gen_ai.operation.name](#gen_aioperationname) - [gen_ai.pipeline.name](#gen_aipipelinename) - - [gen_ai.prompt](#gen_aiprompt) - [gen_ai.request.available_tools](#gen_airequestavailable_tools) - [gen_ai.request.frequency_penalty](#gen_airequestfrequency_penalty) - [gen_ai.request.max_tokens](#gen_airequestmax_tokens) @@ -42,6 +41,7 @@ - [gen_ai.usage.total_tokens](#gen_aiusagetotal_tokens) - [gen_ai.user.message](#gen_aiusermessage) - [Deprecated Attributes](#deprecated-attributes) + - [gen_ai.prompt](#gen_aiprompt) - [gen_ai.usage.completion_tokens](#gen_aiusagecompletion_tokens) - [gen_ai.usage.prompt_tokens](#gen_aiusageprompt_tokens) @@ -103,18 +103,6 @@ Name of the AI pipeline or chain being executed. | Example | `Autofix Pipeline` | | Aliases | `ai.pipeline.name` | -### gen_ai.prompt - -The input messages sent to the model - -| Property | Value | -| --- | --- | -| Type | `string` | -| Has PII | maybe | -| Exists in OpenTelemetry | Yes | -| Example | `[{"role": "user", "message": "hello"}]` | -| Aliases | `ai.input_messages`, `gen_ai.request.messages` | - ### gen_ai.request.available_tools The available tools for the model. It has to be a stringified version of an array of objects. @@ -487,6 +475,20 @@ The user message passed to the model. These attributes are deprecated and will be removed in a future version. Please use the recommended replacements. +### gen_ai.prompt + +The input messages sent to the model + +| Property | Value | +| --- | --- | +| Type | `string` | +| Has PII | maybe | +| Exists in OpenTelemetry | Yes | +| Example | `[{"role": "user", "message": "hello"}]` | +| Deprecated | Yes, use `gen_ai.request.messages` instead | +| Deprecation Reason | Deprecated, use gen_ai.request.messages with the new format instead. | +| Aliases | `ai.input_messages`, `gen_ai.request.messages` | + ### gen_ai.usage.completion_tokens The number of tokens used in the GenAI response (completion). diff --git a/generated/attributes/general.md b/generated/attributes/general.md index c962cf6b..b74030ad 100644 --- a/generated/attributes/general.md +++ b/generated/attributes/general.md @@ -155,7 +155,7 @@ The sentry release. | Exists in OpenTelemetry | No | | Example | `production` | | Deprecated | Yes, use `sentry.release` instead | -| Aliases | `sentry.release` | +| Aliases | `sentry.release`, `service.version` | ### replay_id diff --git a/generated/attributes/http.md b/generated/attributes/http.md index efcb9237..cb913952 100644 --- a/generated/attributes/http.md +++ b/generated/attributes/http.md @@ -21,7 +21,6 @@ - [http.request.secure_connection_start](#httprequestsecure_connection_start) - [http.response.body.size](#httpresponsebodysize) - [http.response.header.\](#httpresponseheaderkey) - - [http.response.header.content-length](#httpresponseheadercontentlength) - [http.response.size](#httpresponsesize) - [http.response.status_code](#httpresponsestatus_code) - [http.route](#httproute) @@ -32,6 +31,7 @@ - [http.method](#httpmethod) - [http.response_content_length](#httpresponse_content_length) - [http.response_transfer_size](#httpresponse_transfer_size) + - [http.response.header.content-length](#httpresponseheadercontentlength) - [http.scheme](#httpscheme) - [http.server_name](#httpserver_name) - [http.status_code](#httpstatus_code) @@ -243,18 +243,6 @@ HTTP response headers, \ being the normalized HTTP Header name (lowercase) | Has dynamic suffix | Yes | | Example | `http.response.header.custom-header=['foo', 'bar']` | -### http.response.header.content-length - -The size of the message body sent to the recipient (in bytes) - -| Property | Value | -| --- | --- | -| Type | `string` | -| Has PII | false | -| Exists in OpenTelemetry | Yes | -| Example | `http.response.header.custom-header=['foo', 'bar']` | -| Aliases | `http.response_content_length`, `http.response.body.size` | - ### http.response.size The transfer size of the response (in bytes). @@ -289,7 +277,7 @@ The matched route, that is, the path template in the format used by the respecti | Has PII | false | | Exists in OpenTelemetry | Yes | | Example | `/users/:id` | -| Aliases | `url.template` | +| Aliases | `route` | ## Deprecated Attributes @@ -374,6 +362,19 @@ The transfer size of the response (in bytes). | Deprecated | Yes, use `http.response.size` instead | | Aliases | `http.response.size` | +### http.response.header.content-length + +The size of the message body sent to the recipient (in bytes) + +| Property | Value | +| --- | --- | +| Type | `string` | +| Has PII | false | +| Exists in OpenTelemetry | Yes | +| Example | `http.response.header.custom-header=['foo', 'bar']` | +| Deprecated | Yes, use `http.response.body.size` instead | +| Aliases | `http.response_content_length`, `http.response.body.size` | + ### http.scheme The URI scheme component identifying the used protocol. diff --git a/generated/attributes/params.md b/generated/attributes/params.md index 2a8dd5ed..7a18e661 100644 --- a/generated/attributes/params.md +++ b/generated/attributes/params.md @@ -2,10 +2,12 @@ # Params Attributes -- [Stable Attributes](#stable-attributes) +- [Deprecated Attributes](#deprecated-attributes) - [params.\](#paramskey) -## Stable Attributes +## Deprecated Attributes + +These attributes are deprecated and will be removed in a future version. Please use the recommended replacements. ### params.\ @@ -18,5 +20,6 @@ Decoded parameters extracted from a URL path. Usually added by client-side routi | Exists in OpenTelemetry | No | | Has dynamic suffix | Yes | | Example | `params.id='123'` | +| Deprecated | Yes, use `url.path.parameter.\` instead | | Aliases | `url.path.parameter.\` | diff --git a/generated/attributes/sentry.md b/generated/attributes/sentry.md index b5d05b62..2f6bbc98 100644 --- a/generated/attributes/sentry.md +++ b/generated/attributes/sentry.md @@ -17,7 +17,6 @@ - [sentry.origin](#sentryorigin) - [sentry.platform](#sentryplatform) - [sentry.profile_id](#sentryprofile_id) - - [sentry.release](#sentryrelease) - [sentry.replay_id](#sentryreplay_id) - [sentry.sdk.integrations](#sentrysdkintegrations) - [sentry.sdk.name](#sentrysdkname) @@ -26,6 +25,8 @@ - [sentry.server_sample_rate](#sentryserver_sample_rate) - [sentry.span.source](#sentryspansource) - [sentry.transaction](#sentrytransaction) +- [Deprecated Attributes](#deprecated-attributes) + - [sentry.release](#sentryrelease) ## Stable Attributes @@ -186,18 +187,6 @@ The id of the sentry profile. | Example | `123e4567e89b12d3a456426614174000` | | Aliases | `profile_id` | -### sentry.release - -The sentry release. - -| Property | Value | -| --- | --- | -| Type | `string` | -| Has PII | false | -| Exists in OpenTelemetry | No | -| Example | `7.0.0` | -| Aliases | `service.version`, `release` | - ### sentry.replay_id The id of the sentry replay. @@ -288,3 +277,20 @@ The sentry transaction (segment name). | Example | `GET /` | | Aliases | `transaction` | +## Deprecated Attributes + +These attributes are deprecated and will be removed in a future version. Please use the recommended replacements. + +### sentry.release + +The sentry release. + +| Property | Value | +| --- | --- | +| Type | `string` | +| Has PII | false | +| Exists in OpenTelemetry | No | +| Example | `7.0.0` | +| Deprecated | Yes, use `service.version` instead | +| Aliases | `service.version`, `release` | + diff --git a/generated/attributes/service.md b/generated/attributes/service.md index 96984ea7..dead7abf 100644 --- a/generated/attributes/service.md +++ b/generated/attributes/service.md @@ -29,5 +29,5 @@ The version string of the service API or implementation. The format is not defin | Has PII | false | | Exists in OpenTelemetry | Yes | | Example | `5.0.0` | -| Aliases | `sentry.release` | +| Aliases | `sentry.release`, `release` | diff --git a/generated/attributes/url.md b/generated/attributes/url.md index dd754a09..c150f3db 100644 --- a/generated/attributes/url.md +++ b/generated/attributes/url.md @@ -109,7 +109,7 @@ The URI scheme component identifying the used protocol. ### url.template -The low-cardinality template of an absolute path reference. +The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). | Property | Value | | --- | --- | @@ -117,5 +117,4 @@ The low-cardinality template of an absolute path reference. | Has PII | false | | Exists in OpenTelemetry | Yes | | Example | `/users/:id` | -| Aliases | `http.route` | diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 7843d18f..17689c59 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -2058,6 +2058,7 @@ export type GEN_AI_PIPELINE_NAME_TYPE = string; * * Aliases: {@link AI_INPUT_MESSAGES} `ai.input_messages`, {@link GEN_AI_REQUEST_MESSAGES} `gen_ai.request.messages` * + * @deprecated Use {@link GEN_AI_REQUEST_MESSAGES} (gen_ai.request.messages) instead - Deprecated, use gen_ai.request.messages with the new format instead. * @example "[{\"role\": \"user\", \"message\": \"hello\"}]" */ export const GEN_AI_PROMPT = 'gen_ai.prompt'; @@ -3298,6 +3299,7 @@ export type HTTP_RESPONSE_HEADER_KEY_TYPE = Array; * * Aliases: {@link HTTP_RESPONSE_CONTENT_LENGTH} `http.response_content_length`, {@link HTTP_RESPONSE_BODY_SIZE} `http.response.body.size` * + * @deprecated Use {@link HTTP_RESPONSE_BODY_SIZE} (http.response.body.size) instead * @example "http.response.header.custom-header=['foo', 'bar']" */ export const HTTP_RESPONSE_HEADER_CONTENT_LENGTH = 'http.response.header.content-length'; @@ -3408,7 +3410,7 @@ export type HTTP_RESPONSE_TRANSFER_SIZE_TYPE = number; * * Attribute defined in OTEL: Yes * - * Aliases: {@link URL_TEMPLATE} `url.template` + * Aliases: {@link ROUTE} `route` * * @example "/users/:id" */ @@ -4820,6 +4822,7 @@ export type OTEL_STATUS_DESCRIPTION_TYPE = string; * * Aliases: {@link URL_PATH_PARAMETER_KEY} `url.path.parameter.` * + * @deprecated Use {@link URL_PATH_PARAMETER_KEY} (url.path.parameter.) instead * @example "params.id='123'" */ export const PARAMS_KEY = 'params.'; @@ -5006,7 +5009,7 @@ export type QUERY_KEY_TYPE = string; * * Attribute defined in OTEL: No * - * Aliases: {@link SENTRY_RELEASE} `sentry.release` + * Aliases: {@link SENTRY_RELEASE} `sentry.release`, {@link SERVICE_VERSION} `service.version` * * @deprecated Use {@link SENTRY_RELEASE} (sentry.release) instead * @example "production" @@ -5445,6 +5448,7 @@ export type SENTRY_PROFILE_ID_TYPE = string; * * Aliases: {@link SERVICE_VERSION} `service.version`, {@link RELEASE} `release` * + * @deprecated Use {@link SERVICE_VERSION} (service.version) instead * @example "7.0.0" */ export const SENTRY_RELEASE = 'sentry.release'; @@ -5693,7 +5697,7 @@ export type SERVICE_NAME_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link SENTRY_RELEASE} `sentry.release` + * Aliases: {@link SENTRY_RELEASE} `sentry.release`, {@link RELEASE} `release` * * @example "5.0.0" */ @@ -6018,7 +6022,7 @@ export type URL_SCHEME_TYPE = string; // Path: model/attributes/url/url__template.json /** - * The low-cardinality template of an absolute path reference. `url.template` + * The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). `url.template` * * Attribute Value Type: `string` {@link URL_TEMPLATE_TYPE} * @@ -6026,8 +6030,6 @@ export type URL_SCHEME_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link HTTP_ROUTE} `http.route` - * * @example "/users/:id" */ export const URL_TEMPLATE = 'url.template'; @@ -6371,7 +6373,6 @@ export type Attributes = { [GEN_AI_CHOICE]?: GEN_AI_CHOICE_TYPE; [GEN_AI_OPERATION_NAME]?: GEN_AI_OPERATION_NAME_TYPE; [GEN_AI_PIPELINE_NAME]?: GEN_AI_PIPELINE_NAME_TYPE; - [GEN_AI_PROMPT]?: GEN_AI_PROMPT_TYPE; [GEN_AI_REQUEST_AVAILABLE_TOOLS]?: GEN_AI_REQUEST_AVAILABLE_TOOLS_TYPE; [GEN_AI_REQUEST_FREQUENCY_PENALTY]?: GEN_AI_REQUEST_FREQUENCY_PENALTY_TYPE; [GEN_AI_REQUEST_MAX_TOKENS]?: GEN_AI_REQUEST_MAX_TOKENS_TYPE; @@ -6424,7 +6425,6 @@ export type Attributes = { [HTTP_REQUEST_SECURE_CONNECTION_START]?: HTTP_REQUEST_SECURE_CONNECTION_START_TYPE; [HTTP_RESPONSE_BODY_SIZE]?: HTTP_RESPONSE_BODY_SIZE_TYPE; [HTTP_RESPONSE_HEADER_KEY]?: HTTP_RESPONSE_HEADER_KEY_TYPE; - [HTTP_RESPONSE_HEADER_CONTENT_LENGTH]?: HTTP_RESPONSE_HEADER_CONTENT_LENGTH_TYPE; [HTTP_RESPONSE_SIZE]?: HTTP_RESPONSE_SIZE_TYPE; [HTTP_RESPONSE_STATUS_CODE]?: HTTP_RESPONSE_STATUS_CODE_TYPE; [HTTP_ROUTE]?: HTTP_ROUTE_TYPE; @@ -6472,7 +6472,6 @@ export type Attributes = { [OTEL_SCOPE_VERSION]?: OTEL_SCOPE_VERSION_TYPE; [OTEL_STATUS_CODE]?: OTEL_STATUS_CODE_TYPE; [OTEL_STATUS_DESCRIPTION]?: OTEL_STATUS_DESCRIPTION_TYPE; - [PARAMS_KEY]?: PARAMS_KEY_TYPE; [PREVIOUS_ROUTE]?: PREVIOUS_ROUTE_TYPE; [PROCESS_EXECUTABLE_NAME]?: PROCESS_EXECUTABLE_NAME_TYPE; [PROCESS_PID]?: PROCESS_PID_TYPE; @@ -6497,7 +6496,6 @@ export type Attributes = { [SENTRY_ORIGIN]?: SENTRY_ORIGIN_TYPE; [SENTRY_PLATFORM]?: SENTRY_PLATFORM_TYPE; [SENTRY_PROFILE_ID]?: SENTRY_PROFILE_ID_TYPE; - [SENTRY_RELEASE]?: SENTRY_RELEASE_TYPE; [SENTRY_REPLAY_ID]?: SENTRY_REPLAY_ID_TYPE; [SENTRY_SDK_INTEGRATIONS]?: SENTRY_SDK_INTEGRATIONS_TYPE; [SENTRY_SDK_NAME]?: SENTRY_SDK_NAME_TYPE; diff --git a/model/attributes/gen_ai/gen_ai__prompt.json b/model/attributes/gen_ai/gen_ai__prompt.json index 4fb224bb..44cf7f82 100644 --- a/model/attributes/gen_ai/gen_ai__prompt.json +++ b/model/attributes/gen_ai/gen_ai__prompt.json @@ -7,9 +7,9 @@ }, "is_in_otel": true, "deprecation": { - "_status": null, - "replacement": "gen_ai.request.messages", - "reason": "Deprecated, use gen_ai.request.messages with the new format instead." + "_status": null, + "replacement": "gen_ai.request.messages", + "reason": "Deprecated, use gen_ai.request.messages with the new format instead." }, "example": "[{\"role\": \"user\", \"message\": \"hello\"}]", "alias": ["ai.input_messages", "gen_ai.request.messages"] diff --git a/model/attributes/http/http__response__header__content-length.json b/model/attributes/http/http__response__header__content-length.json index d876b755..3ac2face 100644 --- a/model/attributes/http/http__response__header__content-length.json +++ b/model/attributes/http/http__response__header__content-length.json @@ -7,7 +7,7 @@ }, "is_in_otel": true, "example": "http.response.header.custom-header=['foo', 'bar']", - "deprecation": { + "deprecation": { "_status": "normalize", "replacement": "http.response.body.size" }, diff --git a/model/attributes/params/params__[key].json b/model/attributes/params/params__[key].json index 5018889f..d6505e06 100644 --- a/model/attributes/params/params__[key].json +++ b/model/attributes/params/params__[key].json @@ -8,8 +8,8 @@ }, "is_in_otel": false, "deprecation": { - "_status": "normalize", - "replacement": "url.path.parameter." + "_status": "normalize", + "replacement": "url.path.parameter." }, "example": "params.id='123'", "alias": ["url.path.parameter."] diff --git a/model/attributes/sentry/sentry__release.json b/model/attributes/sentry/sentry__release.json index f5ca8063..4013aa15 100644 --- a/model/attributes/sentry/sentry__release.json +++ b/model/attributes/sentry/sentry__release.json @@ -7,8 +7,8 @@ }, "is_in_otel": false, "deprecation": { - "_status": "backfill", - "replacement": "service.version" + "_status": "backfill", + "replacement": "service.version" }, "example": "7.0.0", "alias": ["service.version", "release"] diff --git a/model/attributes/service/service__version.json b/model/attributes/service/service__version.json index 0d75497b..1c42baaa 100644 --- a/model/attributes/service/service__version.json +++ b/model/attributes/service/service__version.json @@ -7,5 +7,5 @@ }, "is_in_otel": true, "example": "5.0.0", - "alias": ["sentry.release", "release"] + "alias": ["sentry.release", "release"] } diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index 7d87c5dc..d555d57b 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -76,7 +76,7 @@ "_status": null, "replacement": "sentry.release" }, - "alias": ["sentry.release"] + "alias": ["sentry.release", "service.version"] }, { "key": "replay_id", @@ -580,6 +580,22 @@ }, "alias": ["db.system.name"] }, + { + "key": "gen_ai.prompt", + "brief": "The input messages sent to the model", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": true, + "deprecation": { + "_status": null, + "replacement": "gen_ai.request.messages", + "reason": "Deprecated, use gen_ai.request.messages with the new format instead." + }, + "example": "[{\"role\": \"user\", \"message\": \"hello\"}]", + "alias": ["ai.input_messages", "gen_ai.request.messages"] + }, { "key": "gen_ai.usage.completion_tokens", "brief": "The number of tokens used in the GenAI response (completion).", @@ -671,6 +687,21 @@ }, "alias": ["http.request.method"] }, + { + "key": "http.response.header.content-length", + "brief": "The size of the message body sent to the recipient (in bytes)", + "type": "string", + "pii": { + "key": "false" + }, + "is_in_otel": true, + "example": "http.response.header.custom-header=['foo', 'bar']", + "deprecation": { + "_status": "normalize", + "replacement": "http.response.body.size" + }, + "alias": ["http.response_content_length", "http.response.body.size"] + }, { "key": "http.response_content_length", "brief": "The encoded body size of the response (in bytes).", @@ -1015,6 +1046,22 @@ }, "alias": ["network.transport"] }, + { + "key": "params.", + "brief": "Decoded parameters extracted from a URL path. Usually added by client-side routing frameworks like vue-router.", + "has_dynamic_suffix": true, + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "deprecation": { + "_status": "normalize", + "replacement": "url.path.parameter." + }, + "example": "params.id='123'", + "alias": ["url.path.parameter."] + }, { "key": "query.", "brief": "An item in a query string. Usually added by client-side routing frameworks like vue-router.", @@ -1030,6 +1077,21 @@ "reason": "Instead of sending items individually in query., they should be sent all together with url.query." }, "example": "query.id='123'" + }, + { + "key": "sentry.release", + "brief": "The sentry release.", + "type": "string", + "pii": { + "key": "false" + }, + "is_in_otel": false, + "deprecation": { + "_status": "backfill", + "replacement": "service.version" + }, + "example": "7.0.0", + "alias": ["service.version", "release"] } ] } From fe49d6b6ca7a433f1ce20ebd5df20ee2e8361e0a Mon Sep 17 00:00:00 2001 From: lcian Date: Wed, 3 Sep 2025 13:05:17 +0200 Subject: [PATCH 24/28] remove url --- model/attributes/url.json | 16 ---------------- model/attributes/url/url__full.json | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 model/attributes/url.json diff --git a/model/attributes/url.json b/model/attributes/url.json deleted file mode 100644 index dbd0a833..00000000 --- a/model/attributes/url.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "key": "url", - "brief": "The URL of the resource that was fetched.", - "type": "string", - "pii": { - "key": "maybe" - }, - "is_in_otel": false, - "example": "https://example.com/test?foo=bar#buzz", - "deprecation": { - "_status": null, - "replacement": "url.full" - }, - "alias": ["url.full", "http.url"], - "sdks": ["javascript-browser", "javascript-node"] -} diff --git a/model/attributes/url/url__full.json b/model/attributes/url/url__full.json index a1a7eb07..d359207a 100644 --- a/model/attributes/url/url__full.json +++ b/model/attributes/url/url__full.json @@ -7,5 +7,5 @@ }, "is_in_otel": true, "example": "https://example.com/test?foo=bar#buzz", - "alias": ["url", "http.url"] + "alias": ["http.url"] } From c327037f16d1b23fdb4d62d3c709734a20d90358 Mon Sep 17 00:00:00 2001 From: lcian Date: Wed, 3 Sep 2025 13:21:17 +0200 Subject: [PATCH 25/28] improve --- generated/attributes/code.md | 2 +- generated/attributes/general.md | 14 ---------- generated/attributes/url.md | 2 +- .../sentry-conventions/src/attributes.ts | 28 ++----------------- model/attributes/code/code__lineno.json | 2 +- shared/deprecated_attributes.json | 18 +----------- 6 files changed, 6 insertions(+), 60 deletions(-) diff --git a/generated/attributes/code.md b/generated/attributes/code.md index 53743ccf..9780eb03 100644 --- a/generated/attributes/code.md +++ b/generated/attributes/code.md @@ -91,7 +91,7 @@ The line number in code.filepath best representing the operation. It SHOULD poin | Exists in OpenTelemetry | Yes | | Example | `42` | | Deprecated | Yes, use `code.line.number` instead | -| Aliases | `code.lineno`, `code.line.number` | +| Aliases | `code.line.number` | ### code.namespace diff --git a/generated/attributes/general.md b/generated/attributes/general.md index c962cf6b..4e2b94cb 100644 --- a/generated/attributes/general.md +++ b/generated/attributes/general.md @@ -18,7 +18,6 @@ - [replay_id](#replay_id) - [route](#route) - [transaction](#transaction) - - [url](#url) ## Stable Attributes @@ -196,16 +195,3 @@ The sentry transaction (segment name). | Deprecated | Yes, use `sentry.transaction` instead | | Aliases | `sentry.transaction` | -### url - -The URL of the resource that was fetched. - -| Property | Value | -| --- | --- | -| Type | `string` | -| Has PII | maybe | -| Exists in OpenTelemetry | No | -| Example | `https://example.com/test?foo=bar#buzz` | -| Deprecated | Yes, use `url.full` instead | -| Aliases | `url.full`, `http.url` | - diff --git a/generated/attributes/url.md b/generated/attributes/url.md index dd754a09..722156e5 100644 --- a/generated/attributes/url.md +++ b/generated/attributes/url.md @@ -47,7 +47,7 @@ The URL of the resource that was fetched. | Has PII | maybe | | Exists in OpenTelemetry | Yes | | Example | `https://example.com/test?foo=bar#buzz` | -| Aliases | `url`, `http.url` | +| Aliases | `http.url` | ### url.path diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index cc151e1b..2f4c85c7 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -1219,7 +1219,7 @@ export type CODE_LINE_NUMBER_TYPE = number; * * Attribute defined in OTEL: Yes * - * Aliases: {@link CODE_LINENO} `code.lineno`, {@link CODE_LINE_NUMBER} `code.line.number` + * Aliases: {@link CODE_LINE_NUMBER} `code.line.number` * * @deprecated Use {@link CODE_LINE_NUMBER} (code.line.number) instead * @example 42 @@ -6016,7 +6016,7 @@ export type URL_FRAGMENT_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link URL} `url`, {@link HTTP_URL} `http.url` + * Aliases: {@link HTTP_URL} `http.url` * * @example "https://example.com/test?foo=bar#buzz" */ @@ -6155,29 +6155,6 @@ export const URL_TEMPLATE = 'url.template'; */ export type URL_TEMPLATE_TYPE = string; -// Path: model/attributes/url.json - -/** - * The URL of the resource that was fetched. `url` - * - * Attribute Value Type: `string` {@link URL_TYPE} - * - * Contains PII: maybe - * - * Attribute defined in OTEL: No - * - * Aliases: {@link URL_FULL} `url.full`, {@link HTTP_URL} `http.url` - * - * @deprecated Use {@link URL_FULL} (url.full) instead - * @example "https://example.com/test?foo=bar#buzz" - */ -export const URL = 'url'; - -/** - * Type for {@link URL} url - */ -export type URL_TYPE = string; - // Path: model/attributes/user/user__email.json /** @@ -6957,7 +6934,6 @@ export type FullAttributes = { [URL_QUERY]?: URL_QUERY_TYPE; [URL_SCHEME]?: URL_SCHEME_TYPE; [URL_TEMPLATE]?: URL_TEMPLATE_TYPE; - [URL]?: URL_TYPE; [USER_EMAIL]?: USER_EMAIL_TYPE; [USER_FULL_NAME]?: USER_FULL_NAME_TYPE; [USER_GEO_CITY]?: USER_GEO_CITY_TYPE; diff --git a/model/attributes/code/code__lineno.json b/model/attributes/code/code__lineno.json index 6e38234c..5010d0b0 100644 --- a/model/attributes/code/code__lineno.json +++ b/model/attributes/code/code__lineno.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "code.line.number" }, - "alias": ["code.lineno", "code.line.number"] + "alias": ["code.line.number"] } diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index eb29f88a..a8a4cb2c 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -124,22 +124,6 @@ }, "alias": ["sentry.transaction"] }, - { - "key": "url", - "brief": "The URL of the resource that was fetched.", - "type": "string", - "pii": { - "key": "maybe" - }, - "is_in_otel": false, - "example": "https://example.com/test?foo=bar#buzz", - "deprecation": { - "_status": null, - "replacement": "url.full" - }, - "alias": ["url.full", "http.url"], - "sdks": ["javascript-browser", "javascript-node"] - }, { "key": "ai.completion_tokens.used", "brief": "The number of tokens used to respond to the message.", @@ -487,7 +471,7 @@ "_status": null, "replacement": "code.line.number" }, - "alias": ["code.lineno", "code.line.number"] + "alias": ["code.line.number"] }, { "key": "code.namespace", From cc3d1c20c123fb8088f0e731f0d4a265b260790a Mon Sep 17 00:00:00 2001 From: lcian Date: Wed, 3 Sep 2025 13:23:22 +0200 Subject: [PATCH 26/28] improve --- generated/attributes/http.md | 2 +- javascript/sentry-conventions/src/attributes.ts | 2 +- model/attributes/http/http__url.json | 2 +- shared/deprecated_attributes.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generated/attributes/http.md b/generated/attributes/http.md index c8cdb945..e6dffa80 100644 --- a/generated/attributes/http.md +++ b/generated/attributes/http.md @@ -437,7 +437,7 @@ The URL of the resource that was fetched. | Exists in OpenTelemetry | Yes | | Example | `https://example.com/test?foo=bar#buzz` | | Deprecated | Yes, use `url.full` instead | -| Aliases | `url.full`, `http.url`, `url` | +| Aliases | `url.full` | ### http.user_agent diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 2f4c85c7..7dd1fc77 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -3618,7 +3618,7 @@ export type HTTP_TARGET_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link URL_FULL} `url.full`, {@link HTTP_URL} `http.url`, {@link URL} `url` + * Aliases: {@link URL_FULL} `url.full` * * @deprecated Use {@link URL_FULL} (url.full) instead * @example "https://example.com/test?foo=bar#buzz" diff --git a/model/attributes/http/http__url.json b/model/attributes/http/http__url.json index 9624d189..f1e461b6 100644 --- a/model/attributes/http/http__url.json +++ b/model/attributes/http/http__url.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "url.full" }, - "alias": ["url.full", "http.url", "url"] + "alias": ["url.full"] } diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index a8a4cb2c..4d41c4bb 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -758,7 +758,7 @@ "_status": null, "replacement": "url.full" }, - "alias": ["url.full", "http.url", "url"] + "alias": ["url.full"] }, { "key": "http.user_agent", From f5ebe72f03a408aeaa17db63d63580855c64275f Mon Sep 17 00:00:00 2001 From: lcian Date: Wed, 3 Sep 2025 13:24:32 +0200 Subject: [PATCH 27/28] add test for self-deprecation and self-aliasing --- test/attributes.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/attributes.test.ts b/test/attributes.test.ts index 02a47694..e2c8a01a 100644 --- a/test/attributes.test.ts +++ b/test/attributes.test.ts @@ -125,6 +125,23 @@ describe('attribute json', async () => { expect(missingAliases).toEqual([]); }); + + it('should not be a replacement of itself', async () => { + if (!content.deprecation?.replacement) { + return; + } + const replacement = content.deprecation?.replacement; + expect(content.key !== replacement); + }); + + it('should not alias itself', async () => { + if (!content.alias || content.alias.length === 0) { + return; + } + for (const alias of content.alias) { + expect(content.key !== alias); + } + }); }); } }); From 487da47c81b562f851c2be8f79a50adae31254fa Mon Sep 17 00:00:00 2001 From: lcian Date: Wed, 3 Sep 2025 14:58:35 +0200 Subject: [PATCH 28/28] readd url --- generated/attributes/general.md | 14 ++++++++++ generated/attributes/http.md | 2 +- generated/attributes/url.md | 2 +- .../sentry-conventions/src/attributes.ts | 28 +++++++++++++++++-- model/attributes/http/http__url.json | 2 +- model/attributes/url.json | 17 +++++++++++ model/attributes/url/url__full.json | 2 +- shared/deprecated_attributes.json | 18 +++++++++++- 8 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 model/attributes/url.json diff --git a/generated/attributes/general.md b/generated/attributes/general.md index 13eceeb3..b74030ad 100644 --- a/generated/attributes/general.md +++ b/generated/attributes/general.md @@ -18,6 +18,7 @@ - [replay_id](#replay_id) - [route](#route) - [transaction](#transaction) + - [url](#url) ## Stable Attributes @@ -195,3 +196,16 @@ The sentry transaction (segment name). | Deprecated | Yes, use `sentry.transaction` instead | | Aliases | `sentry.transaction` | +### url + +The URL of the resource that was fetched. + +| Property | Value | +| --- | --- | +| Type | `string` | +| Has PII | maybe | +| Exists in OpenTelemetry | No | +| Example | `https://example.com/test?foo=bar#buzz` | +| Deprecated | Yes, use `url.full` instead | +| Aliases | `url.full`, `http.url` | + diff --git a/generated/attributes/http.md b/generated/attributes/http.md index a3f801f1..adea3b9d 100644 --- a/generated/attributes/http.md +++ b/generated/attributes/http.md @@ -438,7 +438,7 @@ The URL of the resource that was fetched. | Exists in OpenTelemetry | Yes | | Example | `https://example.com/test?foo=bar#buzz` | | Deprecated | Yes, use `url.full` instead | -| Aliases | `url.full` | +| Aliases | `url.full`, `url` | ### http.user_agent diff --git a/generated/attributes/url.md b/generated/attributes/url.md index 1f20aaa7..382c5998 100644 --- a/generated/attributes/url.md +++ b/generated/attributes/url.md @@ -47,7 +47,7 @@ The URL of the resource that was fetched. | Has PII | maybe | | Exists in OpenTelemetry | Yes | | Example | `https://example.com/test?foo=bar#buzz` | -| Aliases | `http.url` | +| Aliases | `http.url`, `url` | ### url.path diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index af15978e..aaa1958d 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -3620,7 +3620,7 @@ export type HTTP_TARGET_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link URL_FULL} `url.full` + * Aliases: {@link URL_FULL} `url.full`, {@link URL} `url` * * @deprecated Use {@link URL_FULL} (url.full) instead * @example "https://example.com/test?foo=bar#buzz" @@ -6020,7 +6020,7 @@ export type URL_FRAGMENT_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link HTTP_URL} `http.url` + * Aliases: {@link HTTP_URL} `http.url`, {@link URL} `url` * * @example "https://example.com/test?foo=bar#buzz" */ @@ -6157,6 +6157,29 @@ export const URL_TEMPLATE = 'url.template'; */ export type URL_TEMPLATE_TYPE = string; +// Path: model/attributes/url.json + +/** + * The URL of the resource that was fetched. `url` + * + * Attribute Value Type: `string` {@link URL_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Aliases: {@link URL_FULL} `url.full`, {@link HTTP_URL} `http.url` + * + * @deprecated Use {@link URL_FULL} (url.full) instead + * @example "https://example.com/test?foo=bar#buzz" + */ +export const URL = 'url'; + +/** + * Type for {@link URL} url + */ +export type URL_TYPE = string; + // Path: model/attributes/user/user__email.json /** @@ -6932,6 +6955,7 @@ export type FullAttributes = { [URL_QUERY]?: URL_QUERY_TYPE; [URL_SCHEME]?: URL_SCHEME_TYPE; [URL_TEMPLATE]?: URL_TEMPLATE_TYPE; + [URL]?: URL_TYPE; [USER_EMAIL]?: USER_EMAIL_TYPE; [USER_FULL_NAME]?: USER_FULL_NAME_TYPE; [USER_GEO_CITY]?: USER_GEO_CITY_TYPE; diff --git a/model/attributes/http/http__url.json b/model/attributes/http/http__url.json index f1e461b6..c0bcd911 100644 --- a/model/attributes/http/http__url.json +++ b/model/attributes/http/http__url.json @@ -11,5 +11,5 @@ "_status": null, "replacement": "url.full" }, - "alias": ["url.full"] + "alias": ["url.full", "url"] } diff --git a/model/attributes/url.json b/model/attributes/url.json new file mode 100644 index 00000000..4a698710 --- /dev/null +++ b/model/attributes/url.json @@ -0,0 +1,17 @@ +{ + "key": "url", + "brief": "The URL of the resource that was fetched.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": "https://example.com/test?foo=bar#buzz", + "deprecation": { + "_status": null, + "replacement": "url.full" + }, + "alias": ["url.full", "http.url"], + "sdks": ["javascript-browser", "javascript-node"] +} + diff --git a/model/attributes/url/url__full.json b/model/attributes/url/url__full.json index d359207a..7da909a0 100644 --- a/model/attributes/url/url__full.json +++ b/model/attributes/url/url__full.json @@ -7,5 +7,5 @@ }, "is_in_otel": true, "example": "https://example.com/test?foo=bar#buzz", - "alias": ["http.url"] + "alias": ["http.url", "url"] } diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index d78af658..c7086a25 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -124,6 +124,22 @@ }, "alias": ["sentry.transaction"] }, + { + "key": "url", + "brief": "The URL of the resource that was fetched.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": "https://example.com/test?foo=bar#buzz", + "deprecation": { + "_status": null, + "replacement": "url.full" + }, + "alias": ["url.full", "http.url"], + "sdks": ["javascript-browser", "javascript-node"] + }, { "key": "ai.completion_tokens.used", "brief": "The number of tokens used to respond to the message.", @@ -789,7 +805,7 @@ "_status": null, "replacement": "url.full" }, - "alias": ["url.full"] + "alias": ["url.full", "url"] }, { "key": "http.user_agent",