https://github.com/instana/instana-java-opentracing
Instana Java OpenTracing
https://github.com/instana/instana-java-opentracing
apm opentracing performance tracing
Last synced: 5 days ago
JSON representation
Instana Java OpenTracing
- Host: GitHub
- URL: https://github.com/instana/instana-java-opentracing
- Owner: instana
- License: mit
- Created: 2016-11-22T13:45:02.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-11-22T08:52:15.000Z (over 2 years ago)
- Last Synced: 2025-05-11T02:11:49.769Z (5 days ago)
- Topics: apm, opentracing, performance, tracing
- Language: Java
- Homepage:
- Size: 36.1 KB
- Stars: 20
- Watchers: 53
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Instana Java OpenTracing [](https://travis-ci.org/instana/instana-java-opentracing)
Instana is capable of collecting traces that are described via the [OpenTracing](http://opentracing.io) API. In order to collect such traces, this tracer implementation must be used.
The artifact is available on Maven Central. When using Maven you can include the tracer with:
```
com.instana
instana-java-opentracing
0.33.0```
The older 0.20.7, 0.30.3, 0.31.0 and 0.32.0 are also available.
The implementation's version number follows the [OpenTracing API version](https://github.com/opentracing/opentracing-java) that it implements.
The tracer is fully compliant with the OpenTracing API and is available via:
```java
io.opentracing.Tracer tracer = new InstanaTracer();
```
it will try to load a ScopeManager via the Java Service Loader.
Or when explicitly using a specific ScopeManager:```java
io.opentracing.util.ThreadLocalScopeManager scopeManager = new ThreadLocalScopeManager();
io.opentracing.Tracer tracer = new InstanaTracer(scopeManager);
```The Instana tracer supports context propagation using all of OpenTracing's built-in formats, i.e. `Format.Builtin#TEXT_MAP`, `Format.Builtin#HTTP_HEADERS` and `Format.Builtin#BINARY`.
When the Instana monitoring agent is not attached, the Instana OpenTracing API will act as an inactive tracer, similarly to the [OpenTracing noop-tracer](https://github.com/opentracing/opentracing-java/tree/master/opentracing-noop). To activate opentracing you must activate it in the agent configuation:
```
# Java Tracing
com.instana.plugin.javatrace:
instrumentation:
# Lightweight Bytecode Instrumentation, enabled by default
enabled: true
# OpenTracing instrumentation, disabled by default
opentracing: true
```