Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opentracing-contrib/java-grizzly-ahc
OpenTracing instrumentation for Grizzly AsyncHttpClient
https://github.com/opentracing-contrib/java-grizzly-ahc
grizzly-ahc instrumentation opentracing tracing
Last synced: about 2 months ago
JSON representation
OpenTracing instrumentation for Grizzly AsyncHttpClient
- Host: GitHub
- URL: https://github.com/opentracing-contrib/java-grizzly-ahc
- Owner: opentracing-contrib
- License: apache-2.0
- Created: 2018-12-15T23:33:34.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-13T11:18:28.000Z (about 4 years ago)
- Last Synced: 2024-04-24T06:34:25.705Z (9 months ago)
- Topics: grizzly-ahc, instrumentation, opentracing, tracing
- Language: Java
- Homepage:
- Size: 94.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenTracing Grizzly Async HTTP Client Instrumentation
OpenTracing instrumentation for Grizzly Async HTTP Client.## OpenTracing Agents
When using a runtime agent like [java-agent](https://github.com/opentracing-contrib/java-agent) or [java-specialagent](https://github.com/opentracing-contrib/java-specialagent) `AsyncHttpClient`s will be automatically instrumented by injecting a `TracingRequestFilter` into its `AsyncHttpClientConfig`. This is the case with the plain `AsyncHttpClient` or `SimpleAsyncHttpClient`:```java
AsyncHttpClient client = new AsyncHttpClient();
Response response = client.prepareGet("http://localhost:8080/root").execute().get();
```
or
```java
SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder()
.setUrl("http://localhost:8080/root")
.build();Response respose = client.get().get();
```
Refer to the agents' documentation for how to include this library as an instrumentation plugin.## Non-Agent Configuration
When not using any of the OpenTracing Agents the `TracingRequestFiler` must be added directly to the `AsyncHttpClientConfig`.```java
AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()
.addRequestFilter(new TracingRequestFilter())
.build();AsyncHttpClient client = new AsyncHttpClient(config);
```