Elasticsearch tracing

There is a way to configure the underlying HTTP client. Be aware this is SPI, to it’s intended for integrators and may change in backward-incompatible ways, more often than APIs (e.g. in minor versions).

You will need to:

  • Implement org.hibernate.search.backend.elasticsearch.client.spi.ElasticsearchHttpClientConfigurer
  • Implement BeanConfigurer like this:
    public class MyBeanConfigurer implements BeanConfigurer {
    	@Override
    	public void configure(BeanConfigurationContext context) {
    		context.assignRole(
    				ElasticsearchHttpClientConfigurer.class,
    				BeanReference.of( MyClientConfigurer.class )
    		);
    	}
    }
    
  • Register your bean configurer by adding a file named META-INF/services/org.hibernate.search.engine.environment.bean.spi.BeanConfigurer to your resources, containing a single line with the fully-qualified class name of MyBeanConfigurer (e.g. com.mycompany.MyBeanConfigurer).

You can have a look at the code of the AWS integration for an example: it needs to change the HTTP client configuration as well.