Skip to content

[request] Allow overriding of request configuration on fluent request builders #537

@jszwedko

Description

@jszwedko

Describe the feature

Hi all!

We have a feature request on vector to allow setting the x-amzn-logs-format HTTP header to json/emf when publishing events to CloudWatch Logs via PutLogEvents to send embedded metrics.

I found an example of doing it with the Java SDK:

PutLogEventsRequest putLogEventsRequest = PutLogEventsRequest.builder()
                        .overrideConfiguration(builder ->
                                // provide the log-format header of json/emf
                                builder.headers(Collections.singletonMap("x-amzn-logs-format",  Collections.singletonList("json/emf"))))
                        .logEvents(Collections.singletonList(inputLogEvent))
                        .logGroupName(logGroupName)
                        .logStreamName(logStreamName)
                        .sequenceToken(sequenceToken)
                        .build();

But I don't see a similar sort of method for overriding request headers for the Rust SDK. Am I missing something? Or would this be a feature request?

Use Case

Overriding request headers on a per API call-basis.

Proposed Solution

Add a method to all fluent builders that allows overriding request configuration including headers.

Here is what the Java SDK seems to support overriding:

https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/core/RequestOverrideConfiguration.html

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

A note for the community

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment

Metadata

Metadata

Assignees

Labels

feature-requestA feature should be added or improved.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions