Skip to content

Commit

Permalink
enable error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ConjunctiveNormalForm committed Mar 6, 2024
1 parent 99d1e04 commit ad29dda
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
27 changes: 27 additions & 0 deletions bin/stacks/analytics-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ export class AnalyticsStack extends cdk.NestedStack {
roleArn: firehoseRole.roleArn,
compressionFormat: 'UNCOMPRESSED',
},
cloudWatchLoggingOptions: {
enabled: true,
},
roleArn: firehoseRole.roleArn,
copyCommand: {
copyOptions: "JSON 'auto ignorecase'",
Expand All @@ -496,6 +499,9 @@ export class AnalyticsStack extends cdk.NestedStack {

const rfqRequestFirehoseStream = new aws_firehose.CfnDeliveryStream(this, 'RfqRequestStream', {
redshiftDestinationConfiguration: {
cloudWatchLoggingOptions: {
enabled: true,
},
clusterJdbcurl: `jdbc:redshift://${rsCluster.clusterEndpoint.hostname}:${rsCluster.clusterEndpoint.port}/${RS_DATABASE_NAME}`,
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
Expand Down Expand Up @@ -529,6 +535,9 @@ export class AnalyticsStack extends cdk.NestedStack {

const uraResponseStream = new aws_firehose.CfnDeliveryStream(this, 'UnifiedRoutingResponseStream', {
redshiftDestinationConfiguration: {
cloudWatchLoggingOptions: {
enabled: true,
},
clusterJdbcurl: `jdbc:redshift://${rsCluster.clusterEndpoint.hostname}:${rsCluster.clusterEndpoint.port}/${RS_DATABASE_NAME}`,
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
Expand Down Expand Up @@ -562,6 +571,9 @@ export class AnalyticsStack extends cdk.NestedStack {

const rfqResponseFirehoseStream = new aws_firehose.CfnDeliveryStream(this, 'RfqResponseStream', {
redshiftDestinationConfiguration: {
cloudWatchLoggingOptions: {
enabled: true,
},
clusterJdbcurl: `jdbc:redshift://${rsCluster.clusterEndpoint.hostname}:${rsCluster.clusterEndpoint.port}/${RS_DATABASE_NAME}`,
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
Expand Down Expand Up @@ -595,6 +607,9 @@ export class AnalyticsStack extends cdk.NestedStack {

const fillStream = new aws_firehose.CfnDeliveryStream(this, 'FillRedshiftStream', {
redshiftDestinationConfiguration: {
cloudWatchLoggingOptions: {
enabled: true,
},
clusterJdbcurl: `jdbc:redshift://${rsCluster.clusterEndpoint.hostname}:${rsCluster.clusterEndpoint.port}/${RS_DATABASE_NAME}`,
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
Expand Down Expand Up @@ -628,6 +643,9 @@ export class AnalyticsStack extends cdk.NestedStack {

const orderStream = new aws_firehose.CfnDeliveryStream(this, 'OrderStream', {
redshiftDestinationConfiguration: {
cloudWatchLoggingOptions: {
enabled: true,
},
clusterJdbcurl: `jdbc:redshift://${rsCluster.clusterEndpoint.hostname}:${rsCluster.clusterEndpoint.port}/${RS_DATABASE_NAME}`,
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
Expand Down Expand Up @@ -661,6 +679,9 @@ export class AnalyticsStack extends cdk.NestedStack {

const botOrderLoaderStream = new aws_firehose.CfnDeliveryStream(this, 'botOrderLoaderStream', {
redshiftDestinationConfiguration: {
cloudWatchLoggingOptions: {
enabled: true,
},
clusterJdbcurl: `jdbc:redshift://${rsCluster.clusterEndpoint.hostname}:${rsCluster.clusterEndpoint.port}/${RS_DATABASE_NAME}`,
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
Expand Down Expand Up @@ -694,6 +715,9 @@ export class AnalyticsStack extends cdk.NestedStack {

const botOrderRouterStream = new aws_firehose.CfnDeliveryStream(this, 'botOrderRouterStream', {
redshiftDestinationConfiguration: {
cloudWatchLoggingOptions: {
enabled: true,
},
clusterJdbcurl: `jdbc:redshift://${rsCluster.clusterEndpoint.hostname}:${rsCluster.clusterEndpoint.port}/${RS_DATABASE_NAME}`,
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
Expand Down Expand Up @@ -727,6 +751,9 @@ export class AnalyticsStack extends cdk.NestedStack {

const botOrderBroadcasterStream = new aws_firehose.CfnDeliveryStream(this, 'botOrderBroadcasterStream', {
redshiftDestinationConfiguration: {
cloudWatchLoggingOptions: {
enabled: true,
},
clusterJdbcurl: `jdbc:redshift://${rsCluster.clusterEndpoint.hostname}:${rsCluster.clusterEndpoint.port}/${RS_DATABASE_NAME}`,
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
Expand Down
5 changes: 4 additions & 1 deletion bin/stacks/firehose-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ export class FirehoseStack extends cdk.NestedStack {
roleArn: firehoseRole.roleArn,
compressionFormat: 'GZIP',
prefix: 'events/',
}
cloudWatchLoggingOptions: {
enabled: true,
},
},
});
this.analyticsStreamArn = analyticsEventsStream.attrArn;
}
Expand Down

0 comments on commit ad29dda

Please sign in to comment.