See Jack's PR adding the Kibana-side support for this for Java (and Python for sampling_rate): https://github.com/elastic/kibana/pull/231835