Skip to content
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

allowing for the forced release of stopped container files based on an environment variable(FORCE_RELEASE_STOP_CONTAINER_FILE) #2034

Merged

Conversation

quzard
Copy link
Collaborator

@quzard quzard commented Jan 13, 2025

This pull request introduces a new feature to the InputDockerFile struct in the plugins/input/docker/logmeta/metric_container_info.go file, allowing for the forced release of stopped container files based on an environment variable. This change impacts multiple methods within the file.

Key changes include:

  • Struct Modification:

    • Added a new boolean field forceReleaseStopContainerFile to the InputDockerFile struct.
  • Initialization:

    • Modified the Init method to set the forceReleaseStopContainerFile field based on the FORCE_RELEASE_STOP_CONTAINER_FILE environment variable.
  • Conditional Logic:

    • Updated the Collect method to include conditional logic that checks the forceReleaseStopContainerFile field. If true, it forces the release of stopped container files by deleting the metric and mapping.

@quzard quzard requested a review from yyuuttaaoo January 17, 2025 10:05
@yyuuttaaoo yyuuttaaoo added the enhancement Feature enhancement label Jan 23, 2025
@yyuuttaaoo yyuuttaaoo merged commit 5c8eff8 into alibaba:main Jan 23, 2025
15 checks passed
@yyuuttaaoo yyuuttaaoo modified the milestones: v3.1, v3.0 Jan 23, 2025
@henryzhx8 henryzhx8 modified the milestones: v3.1, v3.0 Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants