Skip to content

Add additional logging for number of records read from an S3 object, along with which object corresponds to a message for S3-SQS #6908

Merged
dlvenable merged 1 commit into
opensearch-project:mainfrom
graytaylor0:S3LogAdditions
Jun 5, 2026
Merged

Add additional logging for number of records read from an S3 object, along with which object corresponds to a message for S3-SQS #6908
dlvenable merged 1 commit into
opensearch-project:mainfrom
graytaylor0:S3LogAdditions

Conversation

@graytaylor0
Copy link
Copy Markdown
Member

@graytaylor0 graytaylor0 commented Jun 5, 2026

Description

This change adds an additional log for S3-SQS as a source that clearly shows which object corresponds to each SQS message on delete, and an additional log for the S3 source that shows how many records were read/written to the buffer after the object is processed.

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

parsedMessageVisibilityTimesMap.remove(parsedMessage);
}
if (result == true) {
LOG.info("Acknowledgement received, deleting SQS message for S3 object s3://{}/{}, sqsMessageId={}",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there not already a log for deleting messages? Maybe it's a debug log. If so, can we merge these into one?

Copy link
Copy Markdown
Member Author

@graytaylor0 graytaylor0 Jun 5, 2026

Choose a reason for hiding this comment

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

There is yeah. It is not DEBUG. I do agree having two logs when acknowledgments are enabled is not ideal. I considered downgrading the other Delete message log to DEBUG. That would mean that you would not see any info log signaling deletion when acknowledgments are not enabled though. Does this seem ok? Re-using the existing log requires that method to get s3 object context and maintain a mapping which is more invasive than I would prefer. I could also just put an if statement around the "Delete messages" log to not log that if acknowledgments are enabled. It's not consolidating but it doesn't change logging behavior for users without acknowledgments.

…bject was completed when messages are deleted

Signed-off-by: Taylor Gray <tylgry@amazon.com>
@dlvenable dlvenable merged commit 5e696af into opensearch-project:main Jun 5, 2026
71 of 72 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.

3 participants