io.opentracing.contrib:opentracing-apache-httpclient-parent

OpenTracing instrumentation for Apache HttpClient

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

io.opentracing.contrib
ArtifactId

ArtifactId

opentracing-apache-httpclient-parent
Last Version

Last Version

0.3.3
Release Date

Release Date

Type

Type

pom
Description

Description

io.opentracing.contrib:opentracing-apache-httpclient-parent
OpenTracing instrumentation for Apache HttpClient
Project URL

Project URL

https://github.com/opentracing-contrib/java-apache-httpclient
Source Code Management

Source Code Management

https://github.com/opentracing-contrib/java-apache-httpclient

Download opentracing-apache-httpclient-parent

How to add to project

<!-- https://jarcasting.com/artifacts/io.opentracing.contrib/opentracing-apache-httpclient-parent/ -->
<dependency>
    <groupId>io.opentracing.contrib</groupId>
    <artifactId>opentracing-apache-httpclient-parent</artifactId>
    <version>0.3.3</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/io.opentracing.contrib/opentracing-apache-httpclient-parent/
implementation 'io.opentracing.contrib:opentracing-apache-httpclient-parent:0.3.3'
// https://jarcasting.com/artifacts/io.opentracing.contrib/opentracing-apache-httpclient-parent/
implementation ("io.opentracing.contrib:opentracing-apache-httpclient-parent:0.3.3")
'io.opentracing.contrib:opentracing-apache-httpclient-parent:pom:0.3.3'
<dependency org="io.opentracing.contrib" name="opentracing-apache-httpclient-parent" rev="0.3.3">
  <artifact name="opentracing-apache-httpclient-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='io.opentracing.contrib', module='opentracing-apache-httpclient-parent', version='0.3.3')
)
libraryDependencies += "io.opentracing.contrib" % "opentracing-apache-httpclient-parent" % "0.3.3"
[io.opentracing.contrib/opentracing-apache-httpclient-parent "0.3.3"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • opentracing-apache-httpclient

Build Status Released Version

OpenTracing Apache HttpClient

Apache HttpClient instrumentation.

Configuration

GlobalTracer.register(tracer);
HttpClient httpClient = new TracingHttpClientBuilder()
    .build();

//custom configuration
HttpClient httpClient = new TracingHttpClientBuilder(
        redirectStrategy, 
        redirectHandlingDisabled,
        GlobalTracer.get(),
        spanDecorators)
    .build();

Linking to parent span

If parent span context is not passed created client spans will be in a new trace.

SpanManager

spanManager.activate(parentSpan); // called in the same thread as client.execute()
client.execute(new HttpGet("url"));

Manually

BasicHttpContext basicHttpContext = new BasicHttpContext();
basicHttpContext.setAttribute(Constants.PARENT_CONTEXT, parentSpan.context());
client.execute(new HttpGet("url"), basicHttpContext);

Development

./mvnw clean install

Release

Follow instructions in RELEASE

io.opentracing.contrib

3rd-Party OpenTracing API Contributions

3rd-party contributions that use OpenTracing. **The repositories in this org are *not* affiliated with the CNCF.**

Versions

Version
0.3.3
0.3.2
0.2.2
0.2.1
0.2.0
0.1.0
0.1.0-RC1
0.0.2
0.0.1