-
Notifications
You must be signed in to change notification settings - Fork 862
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
AmazonCloudWatchLogsClient.GetLogEvents does not return any event #3218
Comments
The pagination for this operation is odd, if I try I checked the console and it sets up an extra property in
Another interesting thing is that the
With the following snippet, I can get all the events but we'll follow up internally as this isn't a great customer experience... And this behavior also means our built-in paginator doesn't work as expected.
|
Yes, setting It would be nice if |
@gerdb42 If tailing a log is what you want, CloudWatchLogs added a StartLiveTail API recently, and there is an example of how to configure it here. I helped write the example so I know that the code in there works. It might feel more natural than the current API you're using. |
Today's release of the
And as Peter suggested, check out the |
Comments on closed issues are hard for our team to see. |
Describe the bug
I use the following code to retrieve LogEvents from CloudWatch (shortened for brevity):
However,
response.Events
always contains 0 items. And despiteresponse.NextForwardToken
being non-empty, the request never returns any events and may be repeated forever. And I know the connection works and the log stream name is valid, because the name comes from an enumeration of log streams done just before. And the log steam contains events since I can see them in CloudWatch console.Expected Behavior
The returned response contains a reasonable number of events together with a non-
null
NextForwardToken
if more events are available orNextForwardToken
beingnull
if there are no more events to be retrieved.Current Behavior
In the returned response, the Events collection contains 0 elements and the
NextForwardToken
is set. Repeating the request withNextToken
set returns 0 events again.Reproduction Steps
See code sample above
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.CloudWatchLogs 3.7.304.8
Targeted .NET Platform
.NET 8
Operating System and version
Windows 10
The text was updated successfully, but these errors were encountered: