Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generated/attributes/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_ip` |

### client.port

Expand Down
1 change: 0 additions & 1 deletion generated/attributes/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ The name of a collection (table, container) within the database.
| Has PII | false |
| Exists in OpenTelemetry | Yes |
| Example | `users` |
| Aliases | `db.collection` |

### db.namespace

Expand Down
6 changes: 3 additions & 3 deletions generated/attributes/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.\<key\>

Expand Down Expand Up @@ -305,7 +305,7 @@ Client address - domain name if available without reverse DNS lookup; otherwise,
| Has PII | false |
| Exists in OpenTelemetry | Yes |
| Example | `example.com` |
| Deprecated | Yes, use `http.client_ip` instead |
| Deprecated | Yes, use `client.address` instead |
| Aliases | `client.address` |

### http.flavor
Expand Down Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions generated/attributes/sentry.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,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

Expand All @@ -142,7 +141,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

Expand Down
14 changes: 4 additions & 10 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ export type CHANNEL_TYPE = string;
*
* Attribute defined in OTEL: Yes
*
* Aliases: {@link HTTP_CLIENT_ID} `http.client_id`
* Aliases: {@link HTTP_CLIENT_IP} `http.client_ip`
*
* @example "example.com"
*/
Expand Down Expand Up @@ -1237,8 +1237,6 @@ export type CODE_NAMESPACE_TYPE = string;
*
* Attribute defined in OTEL: Yes
*
* Aliases: {@link DB_COLLECTION} `db.collection`
*
* @example "users"
*/
export const DB_COLLECTION_NAME = 'db.collection.name';
Expand Down Expand Up @@ -2908,7 +2906,7 @@ export type GRAPHQL_OPERATION_TYPE_TYPE = string;
*
* Aliases: {@link CLIENT_ADDRESS} `client.address`
*
* @deprecated Use {@link HTTP_CLIENT_IP} (http.client_ip) instead
* @deprecated Use {@link CLIENT_ADDRESS} (client.address) instead
* @example "example.com"
*/
export const HTTP_CLIENT_IP = 'http.client_ip';
Expand Down Expand Up @@ -3322,7 +3320,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
*/
Expand Down Expand Up @@ -3432,7 +3430,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
Expand Down Expand Up @@ -5389,8 +5387,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';
Expand All @@ -5411,8 +5407,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';
Expand Down
2 changes: 1 addition & 1 deletion model/attributes/client/client__address.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
},
"is_in_otel": true,
"example": "example.com",
"alias": ["http.client_id"]
"alias": ["http.client_ip"]
}
3 changes: 1 addition & 2 deletions model/attributes/db/db__collection__name.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"key": "false"
},
"is_in_otel": true,
"example": "users",
"alias": ["db.collection"]
"example": "users"
}
2 changes: 1 addition & 1 deletion model/attributes/http/http__client_ip.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"example": "example.com",
"deprecation": {
"_status": null,
"replacement": "http.client_ip"
"replacement": "client.address"
},
"alias": ["client.address"]
}
6 changes: 1 addition & 5 deletions model/attributes/http/http__response__body__size.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,5 @@
},
"is_in_otel": true,
"example": 123,
"alias": [
"http.response_content_length",
"http.response.header.content-length",
"http.response.header['content-length']"
]
"alias": ["http.response_content_length", "http.response.header.content-length"]
}
2 changes: 1 addition & 1 deletion model/attributes/http/http__response_content_length.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
},
"is_in_otel": false,
"example": "/posts/[id]/layout",
"alias": ["sentry.nextjs.function.route"],
"sdks": ["javascript"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
},
"is_in_otel": false,
"example": "generateMetadata",
"alias": ["sentry.nextjs.function.type"],
"sdks": ["javascript"]
}
19 changes: 1 addition & 18 deletions scripts/generate_attribute_docs.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
20 changes: 1 addition & 19 deletions scripts/generate_attributes.ts
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
21 changes: 1 addition & 20 deletions scripts/generate_deprecated_attributes_json.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
19 changes: 19 additions & 0 deletions scripts/types.ts
Original file line number Diff line number Diff line change
@@ -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[];
}
10 changes: 10 additions & 0 deletions scripts/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export function attributeKeyToFileName(key: string): string {
return key.replace('<key>', '[key]').split('.').join('__').concat('.json');
}

export function fileNameToAttributeKey(fileName: string): string {
return fileName
.replace(/\.json$/, '')
.replaceAll('__', '.')
.replace('[key]', '<key>');
}
8 changes: 2 additions & 6 deletions shared/deprecated_attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@
"example": "example.com",
"deprecation": {
"_status": null,
"replacement": "http.client_ip"
"replacement": "client.address"
},
"alias": ["client.address"]
},
Expand Down Expand Up @@ -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",
Expand Down
Loading