:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(billing): match the traces usage label to billing and route the logs and traces keys (#121925)
Roy Cohenf153aca0d1f9
diff --git a/ee/billing/billing_types.py b/ee/billing/billing_types.pyindex d862f6e7c462..8450f21ea93d 100644--- a/ee/billing/billing_types.py+++ b/ee/billing/billing_types.py@@ -83,7 +83,7 @@ USAGE_TYPE_OPTIONS: tuple[UsageTypeOption, ...] = ({"label": "Workflow destinations", "value": "workflow_billable_invocations_in_period"},{"label": "Logs and traces ingested (MB)", "value": "logs_and_traces_mb_in_period"},{"label": "Logs ingested (MB)", "value": "logs_mb_in_period"},- {"label": "APM traces ingested (MB)", "value": "apm_tracing_mb_in_period"},+ {"label": "Traces ingested (MB)", "value": "apm_tracing_mb_in_period"},{"label": "Logs 30-day retention (MB)", "value": "logs_retention_30d_mb_in_period"},{"label": "Logs retention (MB-days)", "value": "logs_retention_mb_days_in_period"},)diff --git a/frontend/src/scenes/billing/constants.ts b/frontend/src/scenes/billing/constants.tsindex 9537595ed7b2..2915c8dcb13e 100644--- a/frontend/src/scenes/billing/constants.ts+++ b/frontend/src/scenes/billing/constants.ts@@ -62,7 +62,7 @@ export const SPEND_TYPES = [export const USAGE_ONLY_TYPES = [{ label: 'Logs ingested (MB)', value: 'logs_mb_in_period' },- { label: 'APM traces ingested (MB)', value: 'apm_tracing_mb_in_period' },+ { label: 'Traces ingested (MB)', value: 'apm_tracing_mb_in_period' },{ label: 'PostHog Desktop token spend (USD)', value: 'posthog_code_token_credits_used_in_period' },{ label: 'Cloud compute spend (USD)', value: 'sandbox_compute_credits_used_in_period' },{ label: 'Cloud compute CPU (core-seconds)', value: 'sandbox_compute_cpu_millicore_seconds_in_period' },diff --git a/products/billing/skills/understanding-billing-usage/references/usage-type-routing.md b/products/billing/skills/understanding-billing-usage/references/usage-type-routing.mdindex 33ebad001450..fe377f549c2b 100644--- a/products/billing/skills/understanding-billing-usage/references/usage-type-routing.md+++ b/products/billing/skills/understanding-billing-usage/references/usage-type-routing.md@@ -53,7 +53,9 @@ Useful downstream skills for usage investigations include:| `cdp_billable_invocations_in_period` | Realtime destination trigger events by day/project | Use CDP function tools: list functions, inspect enabled destinations, metrics, and logs for the affected window. || `workflow_emails_sent_in_period` | Workflow emails by day/project | Use Workflows tools: workflow stats, invocation logs, enabled workflows, and recent changes. || `workflow_billable_invocations_in_period` | Workflow destination dispatches by day/project | Use Workflows tools and destination/invocation logs. Keep it separate from email volume. |+| `logs_and_traces_mb_in_period` | Logs and traces ingested in MB by day/project | This is the billed Logs meter: logs and traces share one free tier and price. Split it with `logs_mb_in_period` and `apm_tracing_mb_in_period` first, then follow the row for the larger signal. || `logs_mb_in_period` | Logs ingested in MB by day/project | Use `posthog:investigating-logs` with Logs tools: service overview, count ranges, facets, and pattern diffs. Prefer log-specific tools over raw SQL. |+| `apm_tracing_mb_in_period` | Traces ingested in MB by day/project | Use `posthog:exploring-apm-traces` with tracing tools: services, span volume, and slow or noisy operations. Billed through `logs_and_traces_mb_in_period`, not on its own. || `logs_retention_30d_mb_in_period` | Logs ingested under 30-day retention by day/project | Use `posthog:investigating-logs` with Logs tools and retention/settings surfaces. Explain that this is retention-tier usage, not separate log content. || `logs_retention_mb_days_in_period` | Logs retention in MB-days (bytes ingested weighted by retention days) by day/project | Use `posthog:investigating-logs` with Logs tools and retention/settings surfaces. Explain that this is storage-duration usage (MB times days retained), not separate log content. Average retention days = this / `logs_mb_in_period`. || `replay_vision_credits_used_in_period` | Replay Vision credits by day/project | Use Replay Vision scanner/observation tools. Credits come from scanner observations, so inspect scanners and observation status/results. Use `posthog:exploring-replay-vision-observations` when scanner observations are the natural drilldown. |