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

[exporter/awsemfexporter] add log retention feature for Cloudwatch Log Group #15678

Merged
merged 6 commits into from
Nov 7, 2022

Conversation

humivo
Copy link
Member

@humivo humivo commented Oct 26, 2022

Description:
Added a feature to the awsemfexporter that allows you to specify a log retention in the config. This log retention value lets you set the log retention policy for newly created Cloudwatch Log Groups made by the exporter.

Link to tracking Issue:
aws-observability/aws-otel-collector#991

Testing:
Unit testing was added to reflect any code additions.

Documentation:
READMEs were updated to reflect these changes as well as in-code comments.

@humivo humivo marked this pull request as ready for review October 27, 2022 20:37
@humivo humivo requested review from a team and Aneurysm9 as code owners October 27, 2022 20:37
@@ -58,7 +58,7 @@ func newCwLogsPusher(expConfig *Config, params component.ExporterCreateSettings)
}

// create CWLogs client with aws session config
svcStructuredLog := cwlogs.NewClient(params.Logger, awsConfig, params.BuildInfo, expConfig.LogGroupName, session)
svcStructuredLog := cwlogs.NewClient(params.Logger, awsConfig, params.BuildInfo, expConfig.LogGroupName, 0, session)
Copy link
Member

Choose a reason for hiding this comment

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

Should this exporter also get configuration for setting a retention period?

Copy link
Member Author

@humivo humivo Nov 3, 2022

Choose a reason for hiding this comment

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

Hmm I think it could be helpful if there are no objections to adding it

@bogdandrutu bogdandrutu merged commit 89d3570 into open-telemetry:main Nov 7, 2022
dineshg13 pushed a commit to DataDog/opentelemetry-collector-contrib that referenced this pull request Nov 21, 2022
…g Group (open-telemetry#15678)

* Add changes for Log Retention

* Add comments to the code

* Update README

* Update CHANGELOG

* Add Log Retention config option to awscloudwatchlogsxporter
shalper2 pushed a commit to shalper2/opentelemetry-collector-contrib that referenced this pull request Dec 6, 2022
…g Group (open-telemetry#15678)

* Add changes for Log Retention

* Add comments to the code

* Update README

* Update CHANGELOG

* Add Log Retention config option to awscloudwatchlogsxporter
@plantfansam plantfansam mentioned this pull request Jul 21, 2023
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.

None yet

4 participants