: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(logs): stop client-input token drops from logging as errors (#80293)
posthog[bot]83b44bb06a2d
diff --git a/nodejs/src/logs/logs-ingestion-consumer.ts b/nodejs/src/logs/logs-ingestion-consumer.tsindex 2f26447f90c7..6abc6181db7c 100644--- a/nodejs/src/logs/logs-ingestion-consumer.ts+++ b/nodejs/src/logs/logs-ingestion-consumer.ts@@ -1101,7 +1101,7 @@ export class LogsIngestionConsumer {const token = headers.tokenif (!token) {- logger.error('missing_token')+ logger.warn('missing_token')logMessageDroppedCounter.inc({ reason: 'missing_token', team_id: 'unknown' })recordLogMessageDropped('missing_token', 'unknown')return@@ -1123,7 +1123,11 @@ export class LogsIngestionConsumer {}if (!team) {- logger.error('team_not_found', { token_with_no_team: token })+ // A well-formed but unknown or rotated token is a client-input problem, not a+ // service fault. capture-logs accepts any well-formed token shape and defers team+ // resolution to here because it has no Postgres access, so this fires on every+ // dropped message for a bad token. Already tracked via the metrics below.+ logger.warn('team_not_found', { token_with_no_team: token })logMessageDroppedCounter.inc({ reason: 'team_not_found', team_id: 'unknown' })recordLogMessageDropped('team_not_found', 'unknown')return