Skip to content

[Forwarder] Refactor AWS logs handler into a class #808

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

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

ge0Aja
Copy link
Contributor

@ge0Aja ge0Aja commented Jun 14, 2024

What does this PR do?

Motivation

Testing Guidelines

Additional Notes

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests
  • This PR passes the installation tests (ask a Datadog member to run the tests)

@ge0Aja ge0Aja requested a review from a team as a code owner June 14, 2024 15:02
@github-actions github-actions bot added the aws label Jun 14, 2024
@ge0Aja ge0Aja force-pushed the georgi/logs_handler branch 2 times, most recently from 9529841 to 996bad4 Compare June 14, 2024 15:13
for log in logs["logEvents"]:
yield merge_dicts(log, self.aws_attributes.to_dict())

def extract_logs(slef, event):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def extract_logs(slef, event):
def extract_logs(self, event):

Copy link
Contributor

Choose a reason for hiding this comment

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

well, if it works like that, could be a static method instead ?

@ge0Aja ge0Aja force-pushed the georgi/logs_handler branch from 873d17c to 6090ee5 Compare June 17, 2024 08:46
@ge0Aja ge0Aja merged commit d06c611 into master Jun 17, 2024
11 of 12 checks passed
@ge0Aja ge0Aja deleted the georgi/logs_handler branch June 17, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants