https://github.com/opentracing-contrib/java-okhttp
OpenTracing Okhttp client instrumentation
https://github.com/opentracing-contrib/java-okhttp
instrumentation okhttp okhttpclient opentracing tracing
Last synced: 7 months ago
JSON representation
OpenTracing Okhttp client instrumentation
- Host: GitHub
- URL: https://github.com/opentracing-contrib/java-okhttp
- Owner: opentracing-contrib
- License: apache-2.0
- Created: 2017-02-01T21:25:40.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T11:26:23.000Z (almost 6 years ago)
- Last Synced: 2025-06-11T17:57:40.762Z (9 months ago)
- Topics: instrumentation, okhttp, okhttpclient, opentracing, tracing
- Language: Java
- Homepage:
- Size: 103 KB
- Stars: 24
- Watchers: 4
- Forks: 15
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status][ci-img]][ci] [![Released Version][maven-img]][maven]
# OpenTracing OkHttp Client Instrumentation
OpenTracing instrumentation for OkHttp client.
## Configuration
Preferred way how to instrument OkHttpClient is to use `TracingCallFactory`:
```java
Call.Factory client = new TracingCallFactory(okHttpClient, tracer);
client.newCall(request)...
```
or use OkHttpClient directly. However when doing multiple async requests simultaneously, parent spans created
before invoking the client are not properly inferred.
```java
OkHttpClient client = TracingInterceptor.addTracing(new OkHttpClient.Builder(), tracer)
client.newCall(request)...
```
## Development
```shell
./mvnw clean install
```
## Release
Follow instructions in [RELEASE](RELEASE.md)
[ci-img]: https://travis-ci.org/opentracing-contrib/java-okhttp.svg?branch=master
[ci]: https://travis-ci.org/opentracing-contrib/java-okhttp
[maven-img]: https://img.shields.io/maven-central/v/io.opentracing.contrib/opentracing-okhttp3.svg?maxAge=2592000
[maven]: http://search.maven.org/#search%7Cga%7C1%7Copentracing-okhttp3