Skip to content

Some clean up on the PrometheusSink class#6412

Merged
dlvenable merged 1 commit into
opensearch-project:mainfrom
dlvenable:prometheus-cleanup
Jan 16, 2026
Merged

Some clean up on the PrometheusSink class#6412
dlvenable merged 1 commit into
opensearch-project:mainfrom
dlvenable:prometheus-cleanup

Conversation

@dlvenable
Copy link
Copy Markdown
Member

@dlvenable dlvenable commented Jan 15, 2026

Description

I was looking at the behavior of the Prometheus sink for the AWS config and found that there were some unused code paths. This PR cleans them up. Additionally, this makes some improvements to using final and boolean primitives instead of objects.

It is actually used here:

private static AwsCredentialsOptions convertToCredentialOptions(final AwsConfig awsConfig) {
if (awsConfig == null) {
return AwsCredentialsOptions.builder().build();
}
return AwsCredentialsOptions.builder()
.withRegion(awsConfig.getAwsRegion())
.withStsRoleArn(awsConfig.getAwsStsRoleArn())
.withStsExternalId(awsConfig.getAwsStsExternalId())
.withStsHeaderOverrides(awsConfig.getAwsStsHeaderOverrides())
.build();
}

Not in the code removed.

Issues Resolved

N/A

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.

…code paths.

Signed-off-by: David Venable <dlv@amazon.com>
@dlvenable dlvenable merged commit d858776 into opensearch-project:main Jan 16, 2026
46 of 48 checks passed
ashrao94 pushed a commit to ashrao94/data-prepper that referenced this pull request Jan 22, 2026
…code paths. (opensearch-project#6412)

Signed-off-by: David Venable <dlv@amazon.com>
san81 pushed a commit to san81/data-prepper that referenced this pull request Jan 27, 2026
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
…code paths. (opensearch-project#6412)

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Simon ELBAZ <elbazsimon9@gmail.com>
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
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