OpenTracing Instrumentation for Solr Client
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.mvn/wrapper
src
travis
.gitignore
.settings.xml
.travis.yml
LICENSE
README.md
header.txt
mvnw
mvnw.cmd
pom.xml

README.md

Build Status Coverage Status Released Version

OpenTracing Solr Client Instrumentation

OpenTracing instrumentation for Solr Client.

Installation

pom.xml

<dependency>
    <groupId>io.opentracing.contrib</groupId>
    <artifactId>opentracing-solr-client</artifactId>
    <version>VERSION</version>
</dependency>

Usage

// Instantiate tracer
Tracer tracer = ...

// Optionally register it with GlobalTracer:
GlobalTracer.register(tracer);

HttpSolrClient

// Instantiate HttpSolrClient using TracingHttpSolrClientBuilder
HttpSolrClient client = new TracingHttpSolrClientBuilder(solrUrl, tracer).build();

// If tracer is registered with GlobalTracer:
HttpSolrClient client = new TracingHttpSolrClientBuilder(solrUrl).build();

SolrClient implementations

Usage of other SolrClient implementations requires providing TracingHttpClient as HttpClient e.g.:

CloudSolrClient client = new CloudSolrClient.Builder(urls)
        .withHttpClient(new TracingHttpClient(HttpClientUtil.createClient(null), tracer))
        .build()

License

Apache 2.0 License.