Skip to content

Commit a10872c

Browse files
committed
Merge branch 'master' into sebastian/trim-attributes
2 parents da05182 + 12acb3b commit a10872c

File tree

27 files changed

+578
-1318
lines changed

27 files changed

+578
-1318
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
**Features**:
1010

1111
- Updates `rdkafka` to 2.10 which fixes some protocol incompatibilities with Kafka 4. ([#5523](https://github.com/getsentry/relay/pull/5523))
12+
- Add sentry.category normalization for V2 spans. ([#5533](https://github.com/getsentry/relay/pull/5533))
13+
- Include cache write token cost in cost calculation for gen_ai spans. ([#5530](https://github.com/getsentry/relay/pull/5530))
1214

1315
**Bug Fixes**:
1416

@@ -21,6 +23,7 @@
2123
- Release Docker image to GHCR and DockerHub via Craft. ([#5509](https://github.com/getsentry/relay/pull/5509))
2224
- Tag span `usage` and `count_per_root_project` metrics with segment information. ([#5511](https://github.com/getsentry/relay/pull/5511))
2325
- Experimental support for loading configuration values from files. ([#5531](https://github.com/getsentry/relay/pull/5531))
26+
- Remove support for global quotas. ([#5534](https://github.com/getsentry/relay/pull/5534))
2427

2528
## 25.12.1
2629

relay-conventions/src/consts.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ convention_attributes!(
4141
GEN_AI_RESPONSE_TPS => "gen_ai.response.tokens_per_second",
4242
GEN_AI_SYSTEM => "gen_ai.system",
4343
GEN_AI_USAGE_INPUT_CACHED_TOKENS => "gen_ai.usage.input_tokens.cached",
44+
GEN_AI_USAGE_INPUT_CACHE_WRITE_TOKENS => "gen_ai.usage.input_tokens.cache_write",
4445
GEN_AI_USAGE_INPUT_TOKENS => "gen_ai.usage.input_tokens",
4546
GEN_AI_USAGE_OUTPUT_REASONING_TOKENS => "gen_ai.usage.output_tokens.reasoning",
4647
GEN_AI_USAGE_OUTPUT_TOKENS => "gen_ai.usage.output_tokens",
@@ -61,17 +62,20 @@ convention_attributes!(
6162
PLATFORM => "sentry.platform",
6263
PROFILE_ID => "sentry.profile_id",
6364
RELEASE => "sentry.release",
65+
RESOURCE_RENDER_BLOCKING_STATUS => "resource.render_blocking_status",
6466
RPC_GRPC_STATUS_CODE => "rpc.grpc.status_code",
6567
RPC_SERVICE => "rpc.service",
6668
SEGMENT_ID => "sentry.segment.id",
6769
SEGMENT_NAME => "sentry.segment.name",
6870
SENTRY_ACTION => "sentry.action",
71+
SENTRY_CATEGORY => "sentry.category",
6972
SENTRY_DOMAIN => "sentry.domain",
7073
SENTRY_GROUP => "sentry.group",
7174
SENTRY_NORMALIZED_DESCRIPTION => "sentry.normalized_description",
7275
SERVER_ADDRESS => "server.address",
7376
SPAN_KIND => "sentry.kind",
7477
STATUS_MESSAGE => "sentry.status.message",
78+
UI_COMPONENT_NAME => "ui.component_name",
7579
URL_FULL => "url.full",
7680
URL_PATH => "url.path",
7781
URL_SCHEME => "url.scheme",

relay-event-normalization/src/eap/ai.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ fn normalize_ai_costs(attributes: &mut Attributes, model_costs: Option<&ModelCos
8989
let tokens = ai::UsedTokens {
9090
input_tokens: get_tokens(GEN_AI_USAGE_INPUT_TOKENS),
9191
input_cached_tokens: get_tokens(GEN_AI_USAGE_INPUT_CACHED_TOKENS),
92+
input_cache_write_tokens: get_tokens(GEN_AI_USAGE_INPUT_CACHE_WRITE_TOKENS),
9293
output_tokens: get_tokens(GEN_AI_USAGE_OUTPUT_TOKENS),
9394
output_reasoning_tokens: get_tokens(GEN_AI_USAGE_OUTPUT_REASONING_TOKENS),
9495
};
@@ -133,6 +134,7 @@ mod tests {
133134
output_per_token: 0.02,
134135
output_reasoning_per_token: 0.03,
135136
input_cached_per_token: 0.04,
137+
input_cache_write_per_token: 0.0,
136138
},
137139
),
138140
(
@@ -142,6 +144,7 @@ mod tests {
142144
output_per_token: 0.05,
143145
output_reasoning_per_token: 0.0,
144146
input_cached_per_token: 0.0,
147+
input_cache_write_per_token: 0.0,
145148
},
146149
),
147150
]),

0 commit comments

Comments
 (0)