io.opentracing.contrib:opentracing-grizzly-http-server

OpenTracing Instrumentation for Grizzly HTTP Server

License

License

Categories

Categories

Grizzly Net Networking
GroupId

GroupId

io.opentracing.contrib
ArtifactId

ArtifactId

opentracing-grizzly-http-server
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

io.opentracing.contrib:opentracing-grizzly-http-server
OpenTracing Instrumentation for Grizzly HTTP Server
Project URL

Project URL

https://github.com/opentracing-contrib/java-grizzly-http-server
Source Code Management

Source Code Management

https://github.com/opentracing-contrib/java-grizzly-http-server

Download opentracing-grizzly-http-server

How to add to project

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

Dependencies

provided (6)

Group / Artifact Type Version
io.opentracing : opentracing-api jar 0.32.0
io.opentracing : opentracing-util jar 0.32.0
net.bytebuddy : byte-buddy jar 1.9.13
net.bytebuddy : byte-buddy-agent jar 1.9.13
org.glassfish.grizzly : grizzly-framework jar 2.3.35
org.glassfish.grizzly : grizzly-http jar 2.3.35

test (5)

Group / Artifact Type Version
io.opentracing : opentracing-mock jar 0.32.0
io.opentracing.contrib : opentracing-concurrent jar 0.3.0
junit : junit jar 4.12
org.glassfish.grizzly : grizzly-http-client jar 1.15
org.glassfish.grizzly : grizzly-http-server jar 2.3.35

Project Modules

There are no modules declared in this project.

OpenTracing Grizzly HTTP Server Instrumentation

OpenTracing instrumentation for Grizzly HTTP Server.

OpenTracing Agents

When using a runtime agent like java-agent or java-specialagent TCPNIOTransports will be automatically instrumented as long as their FilterChain contains an HttpServerFilter. This is the case with the plain HttpServer through its constructor or HttpServer.createSimpleServer static factory methods:

HttpServer httpServer = new HttpServer();
NetworkListener listener = new NetworkListener("grizzly", "localhost", "8080");
httpServer.addListener(listener);
httpServer.start();

or

HttpServer httpServer = HttpServer.createSimpleServer();
httpServer.start();

Alternatively, chains created directly will also be instrumented automatically under the same condition:

FilterChainBuilder filterChainBuilder = FilterChainBuilder.stateless();

filterChainBuilder.add(new TransportFilter());
filterChainBuilder.add(new HttpServerFilter());
filterChainBuilder.add(new SomeWorkerFilter());

TCPNIOTransport transport = TCPNIOTransportBuilder.newInstance().build();
transport.setProcessor(filterChainBuilder.build());
transport.bind("localhost", "8080");
transport.start();

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 traced filter chain instance must be instantiated directly. Use of the plain HttpServer without a runtime Agent is not currently supported.

FilterChainBuilder filterChainBuilder = new TracedFilterChainBuilder();

filterChainBuilder.add(new TransportFilter());
filterChainBuilder.add(new HttpServerFilter());
filterChainBuilder.add(new SomeWorkFilter());
...
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.2.0
0.1.3
0.1.2
0.1.1
0.1.0