Skip to content

[AWSX] feat(lambda logs forwarder): Allow to opt-out from S3 tags enrichment #946

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 16, 2025

Conversation

ge0Aja
Copy link
Contributor

@ge0Aja ge0Aja commented Jun 13, 2025

What does this PR do?

Allow to opt out from S3 tags enrichment + re-order fetched tags to have a higher priority for Forwarder set tags, notable service.

If S3 tags enrichment is enabled, the fetched tags will be added infront, which should be deduplicated if the same tags are set as ENV vars on the forwarder's side.

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 13, 2025 14:54
@github-actions github-actions bot added the aws label Jun 13, 2025
@ViBiOh ViBiOh self-assigned this Jun 13, 2025
@@ -16,7 +17,7 @@ def __init__(self, prefix):
)

def should_fetch_tags(self):
return True
return os.environ.get("DD_FETCH_S3_TAGS", "false").lower() == "true"
Copy link
Contributor

Choose a reason for hiding this comment

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

The default is false here but true in the CloudFormation. If we set it to false here, it's a breaking change I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it will be false if we don't find it in the env vars, but it should be always set by the template. The behavior here is to not bring in the tags if we don't have the env var set which should be by the template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

However, I'll mark it as a breaking change since it won't be automatic anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to keep the current behavior

@ge0Aja ge0Aja merged commit b769740 into master Jun 16, 2025
11 checks passed
@ge0Aja ge0Aja deleted the georgi/s3-service-tags-opt branch June 16, 2025 11:15
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