Skip to content
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

feat(cwl): Emit telemetry when starting and stopping liveTail sessions #6047

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

keeganirby
Copy link
Contributor

Problem

Cloudwatch wants to monitor usage metrics of the LiveTail integration

Solution

When starting a session emit telemetry for:

  • Session already started (this case happens when session is already running, and customer sends a new command that matches the already running session)
  • Has LogEventFilter
  • LogStream filter type
  • Source of the command (command palette, explorer)

When closing a session:

  • Session duration
  • source of cancellation (ex: CodeLens, ClosingEditors)

License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@keeganirby keeganirby requested a review from a team as a code owner November 18, 2024 23:56
Copy link

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@@ -1230,6 +1245,42 @@
}
],
"passive": true
},
{
"name": "cwlLiveTail_Start",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm still not sure why we can't just upstream these to commons

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just following the documentation here: https://github.com/aws/aws-toolkit-vscode/blob/master/docs/telemetry.md. I did this in VSCode so my local builds would generate the telemetry objects and I could bundle adding the metrics as well as using them in the same PR. If I need to update commons instead I can send a change for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened PR to upstream to Commons. aws/aws-toolkit-common#916

@@ -350,6 +350,21 @@
"name": "amazonqMessageDisplayedMs",
"type": "int",
"description": "Duration between the partner teams code receiving the message and when the message was finally displayed in ms"
},
{
"name": "livetailSessionAlreadyStarted",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of prefixing these with the product name like we have in the past, you can probably drop the product name as the prefix so that we can make these more general

@jpinkney-aws jpinkney-aws merged commit 1e3fdce into aws:feature/cwltail Nov 20, 2024
24 of 25 checks passed
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.

2 participants