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

feat(kinesisfirehose): add HTTP Endpoint and Datadog destination #33657

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: add retry options
  • Loading branch information
Benjamin Pottier authored and benjaminpottier committed Mar 5, 2025
commit e5f8c6d4c5ca3b6211e18e74d65d68a4a0af6517
14 changes: 14 additions & 0 deletions packages/aws-cdk-lib/aws-kinesisfirehose/lib/datadog.ts
Original file line number Diff line number Diff line change
@@ -44,6 +44,9 @@ export interface BufferHints {
size?: Size;
}

/**
* Props for defining a Datadog destination of a Kinesis Data Firehose delivery stream.
*/
export interface DatadogProps extends CommonDestinationProps {
/**
* The API key required to enable data delivery from Amazon Data Firehose.
@@ -58,8 +61,16 @@ export interface DatadogProps extends CommonDestinationProps {
* @default - 60 second interval with 4MiB size.
*/
readonly bufferHints?: BufferHints;
/**
* The time period during which Amazon Data Firehose retries sending data to the selected HTTP endpoint.
* @default 60 seconds
*/
readonly retryDuration?: Duration;
}

/**
* A Datadog destination for data from a Kinesis Data Firehose delivery stream.
*/
export class Datadog implements IDestination {
constructor(private readonly props: DatadogProps) { }

@@ -91,6 +102,9 @@ export class Datadog implements IDestination {
requestConfiguration: {
contentEncoding: 'GZIP',
},
retryOptions: {
DurationInSeconds: this.props.retryDuration?.toSeconds() ?? 60,
},
bufferingHints: {
sizeInMBs: this.props.bufferHints?.size?.toMebibytes() ?? 4,
intervalInSeconds: this.props.bufferHints?.interval?.toSeconds() ?? 60,