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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 177 additions & 17 deletions javascript/sentry-conventions/src/attributes.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"key": "gen_ai.usage.cache_creation.input_tokens",
"brief": "The number of tokens written to the cache when processing the AI input (prompt).",
"additional_context": [
"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans."
],
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": true,
"visibility": "public",
"example": 100,
"additional_context": [
"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans."
],
"alias": ["gen_ai.usage.input_tokens.cache_write"],
"alias": ["gen_ai.usage.input_tokens.cache_write", "gen_ai.usage.cache_creation_input_tokens"],
"visibility": "public",
"changelog": [
{
"version": "next",
"description": "Added gen_ai.usage.cache_creation_input_tokens as an alias"
},
{
"version": "0.11.0",
"prs": [418],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"key": "gen_ai.usage.cache_creation_input_tokens",
"brief": "The number of tokens written to the cache when processing the AI input (prompt).",
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"examples": [100],
"alias": ["gen_ai.usage.cache_creation.input_tokens", "gen_ai.usage.input_tokens.cache_write"],
"deprecation": {
"_status": "backfill",
"replacement": "gen_ai.usage.cache_creation.input_tokens",
"reason": "This attribute is being deprecated in favor of gen_ai.usage.cache_creation.input_tokens."
},
"visibility": "public",
"changelog": [
{
"version": "next",
"prs": [582],
"description": "Added gen_ai.usage.cache_creation_input_tokens attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{
"key": "gen_ai.usage.cache_read.input_tokens",
"brief": "The number of cached tokens used to process the AI input (prompt).",
"additional_context": [
"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.",
"This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens — it is already included."
],
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": true,
"visibility": "public",
"example": 50,
"additional_context": [
"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.",
"This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens — it is already included."
],
"alias": ["gen_ai.usage.input_tokens.cached"],
"alias": ["gen_ai.usage.input_tokens.cached", "gen_ai.usage.cache_read_input_tokens"],
"visibility": "public",
"changelog": [
{
"version": "next",
"description": "Added gen_ai.usage.cache_read_input_tokens as an alias"
},
{
"version": "0.11.0",
"prs": [418],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"key": "gen_ai.usage.cache_read_input_tokens",
"brief": "The number of cached tokens used to process the AI input (prompt).",
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"examples": [50],
"alias": ["gen_ai.usage.cache_read.input_tokens", "gen_ai.usage.input_tokens.cached"],
"deprecation": {
"_status": "backfill",
"replacement": "gen_ai.usage.cache_read.input_tokens",
"reason": "This attribute is being deprecated in favor of gen_ai.usage.cache_read.input_tokens."
},
"visibility": "public",
"changelog": [
{
"version": "next",
"prs": [582],
"description": "Added gen_ai.usage.cache_read_input_tokens attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{
"key": "gen_ai.usage.input_tokens.cache_write",
"brief": "The number of tokens written to the cache when processing the AI input (prompt).",
"additional_context": [
"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans."
],
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"example": 100,
"visibility": "public",
"additional_context": [
"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans."
],
"alias": ["gen_ai.usage.cache_creation.input_tokens"],
"alias": ["gen_ai.usage.cache_creation.input_tokens", "gen_ai.usage.cache_creation_input_tokens"],
"deprecation": {
"_status": "backfill",
"replacement": "gen_ai.usage.cache_creation.input_tokens"
},
"visibility": "public",
"changelog": [
{
"version": "next",
"description": "Added gen_ai.usage.cache_creation_input_tokens as an alias"
},
{
"version": "0.11.0",
"prs": [418],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
{
"key": "gen_ai.usage.input_tokens.cached",
"brief": "The number of cached tokens used to process the AI input (prompt).",
"additional_context": [
"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.",
"This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens — it is already included."
],
"type": "integer",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"example": 50,
"visibility": "public",
"additional_context": [
"This attribute appears on both agent parent spans (aggregated totals) and LLM child spans (per-call values). When using sum() to count tokens, filter to gen_ai.operation.type:ai_client to avoid double-counting hierarchical spans.",
"This is a subset of gen_ai.usage.input_tokens, not an independent count. Do not sum this with gen_ai.usage.input_tokens — it is already included."
],
"alias": ["gen_ai.usage.cache_read.input_tokens"],
"alias": ["gen_ai.usage.cache_read.input_tokens", "gen_ai.usage.cache_read_input_tokens"],
"deprecation": {
"_status": "backfill",
"replacement": "gen_ai.usage.cache_read.input_tokens"
},
"visibility": "public",
"changelog": [
{
"version": "next",
"description": "Added gen_ai.usage.cache_read_input_tokens as an alias"
},
{
"version": "0.11.0",
"prs": [418],
Expand Down
Loading
Loading