Skip to content

Conversation

@keeganirby
Copy link
Contributor

Problem

  1. On the client side, VSCode needs to be aware of some additional context of a running LiveTail session, other than just the response from the StartLiveTail API call (Abort Controller, Max Lines config, TextDocument URI, etc).

  2. Additionally, we want to be able to have multiple LiveTail sessions running, and have a way to organize all of them.

Solution

  1. Create a LiveTailSession class in AWSToolkit that will persist all of the metadata and context the LiveTail feature needs to operate.
  2. Create a LiveTailSessionRegistry that maps a vscode URI to a LiveTailSession. The URI for a LiveTailSession is composed of the API request elements. This will allow us to tell when a user is making a duplicate request. This URI will also be used as the URI of the TextDocument to display the session results.

Additional Changes

  • Adds VSCode preference config for LiveTail max events. This will be used to cap the number of live tail events can be in the TextDocument at a given time. When the limit is reached, the oldest log events will be dropped in order to fit new events streaming in.
  • Adds a missing String for "Tail Log Group"

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 October 7, 2024 21:53
@keeganirby keeganirby changed the title Create LiveTailSession object and registry. Adds MaxLine configuration feat(cwl): Create LiveTailSession object and registry. Adds MaxLine configuration Oct 7, 2024
@github-actions
Copy link

github-actions bot commented Oct 7, 2024

This pull request implements a feature or fix, so it must include a changelog entry. See CONTRIBUTING.md#changelog for instructions.

},
"dependencies": {
"@amzn/codewhisperer-streaming": "file:../../src.gen/@amzn/codewhisperer-streaming",
"@aws-sdk/client-cloudwatch-logs": "^3.215.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we able to update this to a slightly newer version? It looks like it created a bunch of churn in the package-lock.json since i'm guessing newer versions of the aws-sdk use different versions of smithy components, etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes there is a newer version, will push with a revision!

@jpinkney-aws jpinkney-aws merged commit 78cb83c into aws:feature/cwltail Oct 15, 2024
23 of 24 checks passed
karanA-aws pushed a commit to karanA-aws/aws-toolkit-vscode that referenced this pull request Jan 17, 2025
…onfiguration (aws#5738)

1. On the client side, VSCode needs to be aware of some additional
context of a running LiveTail session, other than just the response from
the StartLiveTail API call (Abort Controller, Max Lines config,
TextDocument URI, etc).

2. Additionally, we want to be able to have multiple LiveTail sessions
running, and have a way to organize all of them.

1. Create a LiveTailSession class in AWSToolkit that will persist all of
the metadata and context the LiveTail feature needs to operate.
2. Create a LiveTailSessionRegistry that maps a vscode URI to a
LiveTailSession. The URI for a LiveTailSession is composed of the API
request elements. This will allow us to tell when a user is making a
duplicate request. This URI will also be used as the URI of the
TextDocument to display the session results.

* Adds VSCode preference config for LiveTail max events. This will be
used to cap the number of live tail events can be in the TextDocument at
a given time. When the limit is reached, the oldest log events will be
dropped in order to fit new events streaming in.
* Adds a missing String for "Tail Log Group"
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.

3 participants