fix(amazonq): Fix empty conversationId in telemetry #6020
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Types of changes
Description
JetBrains inline chat generates code successfully but users cannot see the results due to a 400 validation error when sending telemetry events. The backend rejects telemetry with empty
conversationId
field, returning:From the JB logs:
The API returns an empty string for conversationId in inline chat scenarios, which gets stored and later causes telemetry validation failures.
Flow:
JetBrains creates new inline chat tab → conversationId = null
API call made → API returns empty string conversationId: ""
ChatSessionV1 stores empty string → conversationId = it.conversationId()
TelemetryHelper retrieves empty string → getConversationId(tabId) returns ""
Backend rejects telemetry → 400 error
Solution
Generate a UUID when the API returns null or empty conversationId. This ensures telemetry always has a valid conversationId.
Testing
Testing was conducted in sandbox and was not able to reproduce issue. From logs in Sandbox:
We can see that a random UUID was generated
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.