Skip to content

fix: add result attribute when emitting telemetry event #1088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 23, 2025

Conversation

opieter-aws
Copy link
Contributor

@opieter-aws opieter-aws commented Apr 23, 2025

Problem

Telemetry events sent to VSCode are missing a result attribute, causing a warning in the VSCode logs:

[warning] telemetry: invalid Metric: "amazonq_exitFocusChat" emitted without the `result` property, which is always required. Consider using `.run()` instead of `.emit()`, which will set these properties automatically. See https://github.com/aws/aws-toolkit-vscode/blob/master/docs/telemetry.md#guidelines

Solution

Add result: 'Succeeded' to the data when telemetry metrics are emitted

Testing

Manually verified E2E that the warning is fixed

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@opieter-aws opieter-aws marked this pull request as ready for review April 23, 2025 18:29
@opieter-aws opieter-aws requested a review from a team as a code owner April 23, 2025 18:29
@opieter-aws opieter-aws enabled auto-merge (squash) April 23, 2025 18:31
@Hweinstock
Copy link
Contributor

do we need to add a result: failed somewhere or is this added implicitly?
I know on the VSC side its added implicitly inside our spans, but I don't see the same functionality here.

@jpinkney-aws
Copy link
Contributor

I don't think any of these are modeled as succeed/failure metrics. Flare doesn't have the concept of spans

ashishrp-aws and others added 3 commits April 23, 2025 14:54
…mpt should st… (aws#1081)

feat: open use input prompt for agentic chat and new prompt should stop current response
## Problem
- Existing UX shows multiple context list chatItem cards for list directory tool messages.
## Solution
- Use a `messageIdToUpdateListDir` state to store the messageId and update this for next list directory tool messages.
![image](https://github.com/user-attachments/assets/08fff204-0bbc-4467-b05b-7f90be062fc1)

## TODO:
- Need to combine both read and list directory tool messages into one context list.
- This code change is equivalent to this PR: aws/aws-toolkit-vscode#7006 in `feature/agentic-chat` branch.
@opieter-aws
Copy link
Contributor Author

Indeed. Flare just emits based on a hook, no evaluation of success or failure for this is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants