Skip to content

Commit f45a67e

Browse files
authored
fix(cloudwatch): "View Full Log Stream" only shows 1000 events #3791
Use the configured limit instead of hardcoding 1000.
1 parent 4eff295 commit f45a67e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "CloudWatch Logs: \"View Full Log Stream\" is limited to 1000 events instead of the `aws.cwl.limit` user setting"
4+
}

src/cloudWatchLogs/document/logStreamsCodeLensProvider.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
import * as vscode from 'vscode'
77
import { CLOUDWATCH_LOGS_SCHEME } from '../../shared/constants'
88
import { CloudWatchLogsGroupInfo, LogDataRegistry } from '../registry/logDataRegistry'
9-
import { createURIFromArgs, isLogStreamUri, parseCloudWatchLogsUri } from '../cloudWatchLogsUtils'
9+
import {
10+
CloudWatchLogsSettings,
11+
createURIFromArgs,
12+
isLogStreamUri,
13+
parseCloudWatchLogsUri,
14+
} from '../cloudWatchLogsUtils'
1015
import { LogDataDocumentProvider } from './logDataDocumentProvider'
1116

1217
type IdWithLine = { streamId: string; lineNum: number }
@@ -57,7 +62,9 @@ export class LogStreamCodeLensProvider implements vscode.CodeLensProvider {
5762
}
5863

5964
createLogStreamCodeLens(logGroupInfo: CloudWatchLogsGroupInfo, idWithLine: IdWithLine): vscode.CodeLens {
60-
const streamUri = createURIFromArgs({ ...logGroupInfo, streamName: idWithLine.streamId }, { limit: 1000 })
65+
const settings = new CloudWatchLogsSettings()
66+
const limit = settings.get('limit', 1000)
67+
const streamUri = createURIFromArgs({ ...logGroupInfo, streamName: idWithLine.streamId }, { limit: limit })
6168
const cmd: vscode.Command = {
6269
command: 'aws.loadLogStreamFile',
6370
arguments: [streamUri, this.registry],

0 commit comments

Comments
 (0)