Skip to content

Commit

Permalink
chore: feature gate aws-core features (vectordotdev#18482)
Browse files Browse the repository at this point in the history
feature gate aws_core features

Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
  • Loading branch information
StephenWakely committed Sep 5, 2023
1 parent f11eeb3 commit e19243f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/sinks/elasticsearch/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ impl HttpRequestBuilder {
Auth::Basic(auth) => {
auth.apply(&mut request);
}
#[cfg(feature = "aws-core")]
Auth::Aws {
credentials_provider: provider,
region,
Expand Down
4 changes: 3 additions & 1 deletion src/sinks/prometheus/remote_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ use std::io::Read;
use std::sync::Arc;
use std::task;

#[cfg(feature = "aws-core")]
use aws_credential_types::provider::SharedCredentialsProvider;
#[cfg(feature = "aws-core")]
use aws_types::region::Region;
use bytes::{Bytes, BytesMut};
use futures::{future::BoxFuture, stream, FutureExt, SinkExt};
Expand Down Expand Up @@ -399,7 +401,7 @@ impl HttpRequestBuilder {
builder = builder.header("X-Scope-OrgID", tenant_id);
}

let mut request = builder.body(body.into()).unwrap();
let mut request: Request<Bytes> = builder.body(body.into()).unwrap();
if let Some(auth) = &self.auth {
match auth {
Auth::Basic(http_auth) => http_auth.apply(&mut request),
Expand Down

0 comments on commit e19243f

Please sign in to comment.