2021-02-22 17:27:13 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
Gitlab::Experiment.configure do |config|
|
|
|
|
config.base_class = 'ApplicationExperiment'
|
2021-09-30 23:02:18 +05:30
|
|
|
config.mount_at = '/-/experiment'
|
2021-04-17 20:07:23 +05:30
|
|
|
config.cache = Gitlab::Experiment::Cache::RedisHashStore.new(
|
|
|
|
pool: ->(&block) { Gitlab::Redis::SharedState.with { |redis| block.call(redis) } }
|
|
|
|
)
|
2021-09-30 23:02:18 +05:30
|
|
|
config.tracking_behavior = lambda do |action, event_args|
|
|
|
|
Gitlab::Tracking.event(name, action.to_s, **event_args.merge(
|
|
|
|
context: (event_args[:context] || []) << SnowplowTracker::SelfDescribingJson.new(
|
|
|
|
'iglu:com.gitlab/gitlab_experiment/jsonschema/1-0-0', signature
|
|
|
|
)
|
|
|
|
))
|
2021-09-04 01:27:46 +05:30
|
|
|
end
|
2021-02-22 17:27:13 +05:30
|
|
|
end
|