///////////////////////////////////////////////////////////////////////////////

    Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

///////////////////////////////////////////////////////////////////////////////

= Tracing
:description: Helidon Tracing Support
= :keywords: helidon, tracing

== Tracing Support
Helidon includes support for tracing through the `https://opentracing.io/[OpenTracing]` APIs.
Tracing is integrated with WebServer and Security.

Support for specific tracers is abstracted. Your application can depend on
the abstraction layer and provide a specific tracer implementation as a Java
`ServiceLoader` service.


=== Maven Coordinates

Declare the following dependency in your project to use the tracer abstraction:

[source,xml,subs="verbatim,attributes"]
.Tracer Abstraction
----
<dependency>
    <groupId>io.helidon.tracing</groupId>
    <artifactId>helidon-tracing</artifactId>
</dependency>
----

=== Configuring Tracing

To configure tracer with WebServer:

[source,java]
.Configuring OpenTracing `Tracer`
----
ServerConfiguration.builder()
                   .tracer(TracerBuilder.create("my-application")                    // <1>
                                 .collectorUri(URI.create("http://10.0.0.18:9411"))  // <2>
                                 .build())
                   .build()
----
<1> The name of the application (service) to associate with the tracing events
<2> The endpoint for tracing events, specific to the tracer used, usually loaded from Config
