Skip to content

Move experiment tracking behavior to configuration

What does this MR do?

This is mostly a quality of life fix. I noticed recently that if you run:

Gitlab::Experiment.new(:example).track(:foo) # => log output
experiment(:example).track(:foo) # => calls to Gitlab::Tracking

This is because the raw base class utilizes the configuration, and ApplicationExperiment (the base class utilized when calling experiment) overrides the track method. I figured now that we've normalized this a bit, we should move it up to minimize one aspect of potential developer confusion.

Note:

The same is currently true with our #publish method, but we're working to get that minimized and cleaned up as well, so I'm saving that for a separate MR.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Jeremy Jackson

Merge request reports