Platform usage remains empty in Console for thread/message activity.
Root cause from end-to-end tracing:
- Console queries MeteringGateway.QueryUsage with orgId, UNIT_COUNT, and labelFilters kind=thread/message.
- Metering stores/query labels and UTC timestamps correctly for supported kind filters.
- Threads service does invoke metering after CreateThread and SendMessage, but recordUsageAsync resolves org_id only from x-organization-id incoming metadata.
- Gateway forwards identity metadata only; Console sends organizationId in CreateThread request body, and SendMessage has no organizationId field.
- As a result, normal Console/Gateway thread and message creation skips metering emission before Metering receives any records.
Expected:
- Thread creation should record kind=thread usage with the created thread's organization_id.
- Message send should record kind=message usage with the message thread's organization_id.
- E2E should cover creating an org, creating a thread, sending a message, then verifying platform usage is non-zero via Console cards and/or MeteringGateway.QueryUsage.
Platform usage remains empty in Console for thread/message activity.
Root cause from end-to-end tracing:
Expected: