Skip to content

Commit

Permalink
fix: optional stack params
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioCafolla committed Aug 2, 2023
1 parent 33328cf commit b77564d
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 100 deletions.
34 changes: 17 additions & 17 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions src/newrelic/newrelic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export interface NewRelicStackProps extends BaseStackProps {
readonly newRelicLicenseKey: string;
readonly newRelicAccountId: string;
readonly newRelicBucketName: string;
readonly newRelicApiUrlMetrics: EndpointUrlMetrics;
readonly newRelicApiUrlLogs: EndpointUrlLogs;
readonly newRelicApiUrlMetrics?: EndpointUrlMetrics;
readonly newRelicApiUrlLogs?: EndpointUrlLogs;
readonly cloudwatchMetricStreamProps?: CfnMetricStreamProps;
}

Expand Down Expand Up @@ -184,18 +184,17 @@ export class NewRelicStack extends BaseStack {
):firehose.CfnDeliveryStream {
if (this.stage == 'production') {
// Minute in one day: 1440
// Interval: 5min
// Sends per day: 1440/5 = 288
// Usage per day: 288*5mb = 1.5gb
// Interval: 10min
// Sends per day: 1440/10 = 144
// Usage per day: 144*10mb = 1.5gb
var bufferingHints: firehose.CfnDeliveryStream.BufferingHintsProperty = {
intervalInSeconds: 300, // 5 minute
sizeInMBs: 5,
intervalInSeconds: 600, // 10 minute
sizeInMBs: 10,
};
} else {
// Usage per day: 144*3mb = 0.432gb
var bufferingHints: firehose.CfnDeliveryStream.BufferingHintsProperty = {
intervalInSeconds: 600, // 10 minute
sizeInMBs: 3,
intervalInSeconds: 900, // 15 minute
sizeInMBs: 10,
};
}

Expand Down
Loading

0 comments on commit b77564d

Please sign in to comment.