Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions runtime/defaults/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,19 @@ quarkus.rds.sync-client.type=apache
polaris.file-io.type=default

polaris.event-listener.type=no-op

# Persistence event listener settings
# polaris.event-listener.type=persistence-in-memory-buffer
# polaris.event-listener.persistence-in-memory-buffer.buffer-time=5000ms
# polaris.event-listener.persistence-in-memory-buffer.max-buffer-size=5

# AWS CloudWatch event listener settings
# polaris.event-listener.type=aws-cloudwatch
# polaris.event-listener.aws-cloudwatch.log-group=polaris-cloudwatch-default-group
# polaris.event-listener.aws-cloudwatch.log-stream=polaris-cloudwatch-default-stream
# polaris.event-listener.aws-cloudwatch.region=us-east-1
# polaris.event-listener.aws-cloudwatch.synchronous-mode=false

polaris.log.request-id-header-name=Polaris-Request-Id
# polaris.log.mdc.aid=polaris
# polaris.log.mdc.sid=polaris-service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,74 @@
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.polaris.service.events.jsonEventListener.aws.cloudwatch;

/** Configuration interface for AWS CloudWatch event listener settings. */
import io.quarkus.runtime.annotations.StaticInitSafe;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;
import io.smallrye.config.WithName;
import jakarta.enterprise.context.ApplicationScoped;

/** Configuration interface for AWS CloudWatch event listener integration. */
@StaticInitSafe
@ConfigMapping(prefix = "polaris.event-listener.aws-cloudwatch")
@ApplicationScoped
public interface AwsCloudWatchConfiguration {

/**
* Returns the AWS CloudWatch log group name for event logging.
*
* <p>The log group is a collection of log streams that share the same retention, monitoring, and
* access control settings. If not specified, defaults to "polaris-cloudwatch-default-group".
*
* <p>Configuration property: {@code polaris.event-listener.aws-cloudwatch.log-group}
*
* @return a String containing the log group name, or the default value if not configured
*/
@WithName("log-group")
@WithDefault("polaris-cloudwatch-default-group")
String awsCloudWatchLogGroup();

/**
* Returns the AWS CloudWatch log stream name for event logging.
*
* <p>A log stream is a sequence of log events that share the same source. Each log stream belongs
* to one log group. If not specified, defaults to "polaris-cloudwatch-default-stream".
*
* <p>Configuration property: {@code polaris.event-listener.aws-cloudwatch.log-stream}
*
* @return a String containing the log stream name, or the default value if not configured
*/
@WithName("log-stream")
@WithDefault("polaris-cloudwatch-default-stream")
String awsCloudWatchLogStream();

/**
* Returns the AWS region where CloudWatch logs should be sent.
*
* <p>This specifies the AWS region for the CloudWatch service endpoint. The region must be a
* valid AWS region identifier. If not specified, defaults to "us-east-1".
*
* <p>Configuration property: {@code polaris.event-listener.aws-cloudwatch.region}
*
* @return a String containing the AWS region, or the default value if not configured
*/
@WithName("region")
@WithDefault("us-east-1")
String awsCloudWatchRegion();

/**
* Returns the synchronous mode setting for CloudWatch logging.
*
* <p>When set to "true", log events are sent to CloudWatch synchronously, which may impact
* application performance but ensures immediate delivery. When set to "false" (default), log
* events are sent asynchronously for better performance.
*
* <p>Configuration property: {@code polaris.event-listener.aws-cloudwatch.synchronous-mode}
*
* @return a boolean value indicating the synchronous mode setting
*/
@WithName("synchronous-mode")
@WithDefault("false")
boolean synchronousMode();
}

This file was deleted.