-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Neill Turner
committed
Dec 20, 2024
1 parent
3cd8ddf
commit e6ea204
Showing
4 changed files
with
10 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,12 @@ | ||
DfE::Analytics.configure do |config| | ||
# Whether to log events instead of sending them to BigQuery. | ||
# | ||
# config.log_only = true | ||
config.log_only = (%w[development test].include?(ENV["RAILS_ENV"]) || ENV["ENVIRONMENT_NAME"].start_with?("review")) | ||
|
||
# Whether to use ActiveJob or dispatch events immediately. | ||
# | ||
# config.async = true | ||
|
||
# Which ActiveJob queue to put events on | ||
# | ||
# config.queue = :default | ||
|
||
# The name of the BigQuery table we’re writing to. | ||
# | ||
# config.bigquery_table_name = ENV['BIGQUERY_TABLE_NAME'] | ||
|
||
# The name of the BigQuery project we’re writing to. | ||
# | ||
# config.bigquery_project_id = ENV['BIGQUERY_PROJECT_ID'] | ||
|
||
# The name of the BigQuery dataset we're writing to. | ||
# | ||
# config.bigquery_dataset = ENV['BIGQUERY_DATASET'] | ||
|
||
# Service account JSON key for the BigQuery API. See | ||
# https://cloud.google.com/bigquery/docs/authentication/service-account-file | ||
# | ||
# config.bigquery_api_json_key = ENV['BIGQUERY_API_JSON_KEY'] | ||
|
||
# Passed directly to the retries: option on the BigQuery client | ||
# | ||
# config.bigquery_retries = 3 | ||
|
||
# Passed directly to the timeout: option on the BigQuery client | ||
# | ||
# config.bigquery_timeout = 120 | ||
|
||
# A proc which returns true or false depending on whether you want to | ||
# enable analytics. You might want to hook this up to a feature flag or | ||
# environment variable. | ||
# | ||
config.enable_analytics = proc { Rails.env.production? } | ||
|
||
# Enable entity table check job | ||
# | ||
config.queue = :analytics | ||
config.environment = HostingEnvironment.environment_name | ||
config.entity_table_checks_enabled = true | ||
|
||
# The environment we’re running in. This value will be attached | ||
# to all events we send to BigQuery. | ||
# | ||
# config.environment = ENV.fetch('RAILS_ENV', 'development') | ||
config.enable_analytics = | ||
proc do | ||
disabled_by_default = Rails.env.development? | ||
ENV.fetch("BIGQUERY_DISABLE", disabled_by_default.to_s) != "true" | ||
end | ||
config.azure_federated_auth = ENV.include? "GOOGLE_CLOUD_CREDENTIALS" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters