# Copyright (C) 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

cassandraToBigtableConfigs:
  # [Optional] Global default GCP Project ID
  projectId: YOUR_GCP_PROJECT_ID
  # [Optional] schema mapping configuration table name
  schemaMappingTable: SCHEMA_MAPPING_TABLE_NAME
  #[Required] Default column family for premitive data types
  defaultColumnFamily: DEFAULT_COLUMN_FAMILY

listeners:
- name: cluster1
  port: PORT_NUMBER
  bigtable:
    # [Optional], skip if it is the same as global_projectId.
    projectId: YOUR_GCP_PROJECT_ID

    #If you want to use multiple instances then pass the instance names by comma seperated
    #Instance name should not contain any special characters except underscore(_)
    instanceIds: GCP_BIGTABLE_INSTANCE_ID

    # [Required] Name of the table  where cassandra schema to bigtable schema mapping is stored.
    schemaMappingTable: SCHEMA_MAPPING_TABLE_NAME

    #[Optional] appProfileID is required only if you want to use a specific app profile.
    appProfileID: GCP_BIGTABLE_APP_PROFILE_ID

    #[Required] Default column family for primitive data types is "cf1"
    defaultColumnFamily: DEFAULT_COLUMN_FAMILY

    # Number of grpc channels to be used for Bigtable session.
    Session:
      grpcChannels: 4

otel:
  # Set enabled to true or false for OTEL metrics/traces/logs.
  enabled: False

  # Set enabled to true or false for client side OTEL (metrics/traces).
  enabledClientSideMetrics: True

  # Name of the collector service to be setup as a sidecar
  serviceName: YOUR_OTEL_COLLECTOR_SERVICE_NAME

  healthcheck:
    # Enable the health check in this proxy application config only if the
    # "health_check" extension is added to the OTEL collector service configuration.
    #
    # Recommendation:
    # Enable the OTEL health check if you need to verify the collector's availability
    # at the start of the application. For development or testing environments, it can
    # be safely disabled to reduce complexity.

    # Enable/Disable Health Check for OTEL, Default 'False'.
    enabled: False
    # Health check endpoint for the OTEL collector service
    endpoint: localhost:13133
  metrics:
    # Collector service endpoint
    endpoint: METRICS_SERVICE_ENDPOINT

  traces:
    # Collector service endpoint
    endpoint: TRACER_SERVICE_ENDPOINT
    #Sampling ratio should be between 0 and 1. Here 0.05 means 5/100 Sampling ratio.
    samplingRatio: 1

loggerConfig:
  # Specifies the type of output, here it is set to 'file' indicating logs will be written to a file.
  # Value of `outputType` should be `file` for file type or `stdout` for standard output.
  # Default value is `stdout`.
  outputType: stdout
  # Set this only if the outputType is set to `file`.
  # The path and name of the log file where logs will be stored. For example, output.log, Required Key.
  # Default `/var/log/cassandra-to-spanner-proxy/output.log`.
  fileName: output/output.log
  # Set this only if the outputType is set to `file`.
  # The maximum size of the log file in megabytes before it is rotated. For example, 500 for 500 MB.
  maxSize: 10
  # Set this only if the outputType is set to `file`.
  # The maximum number of backup log files to keep. Once this limit is reached, the oldest log file will be deleted.
  maxBackups: 2
  # Set this only if the outputType is set to `file`.
  # The maximum age in days for a log file to be retained. Logs older than this will be deleted. Required Key.
  # Default 3 days
  maxAge: 1

  # Set this only if the outputType is set to `file`.
  # Default value is set to 'False'. Change the value to 'True', if log files are required to be compressed.
  compress: True
