tracing


License

License

GroupId

GroupId

xyz.driver
ArtifactId

ArtifactId

tracing_2.11
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

tracing
tracing
Project URL

Project URL

https://github.com/drivergroup/tracing
Project Organization

Project Organization

xyz.driver
Source Code Management

Source Code Management

https://github.com/drivergroup/tracing

Download tracing_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/xyz.driver/tracing_2.11/ -->
<dependency>
    <groupId>xyz.driver</groupId>
    <artifactId>tracing_2.11</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/xyz.driver/tracing_2.11/
implementation 'xyz.driver:tracing_2.11:0.1.2'
// https://jarcasting.com/artifacts/xyz.driver/tracing_2.11/
implementation ("xyz.driver:tracing_2.11:0.1.2")
'xyz.driver:tracing_2.11:jar:0.1.2'
<dependency org="xyz.driver" name="tracing_2.11" rev="0.1.2">
  <artifact name="tracing_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='xyz.driver', module='tracing_2.11', version='0.1.2')
)
libraryDependencies += "xyz.driver" % "tracing_2.11" % "0.1.2"
[xyz.driver/tracing_2.11 "0.1.2"]

Dependencies

compile (7)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.12
com.pauldijou : jwt-core_2.11 jar 0.16.0
com.typesafe.akka : akka-http_2.11 jar 10.1.1
com.typesafe.akka : akka-http-spray-json_2.11 jar 10.1.1
com.typesafe.akka : akka-actor_2.11 jar 2.5.13
com.typesafe.akka : akka-stream_2.11 jar 2.5.13
io.spray : spray-json_2.11 jar 1.3.4

test (2)

Group / Artifact Type Version
com.typesafe.akka : akka-http-testkit_2.11 jar 10.1.1
org.scalatest : scalatest_2.11 jar 3.0.5

Project Modules

There are no modules declared in this project.

This project has been merged into driver-core (module core-reporting).


Build Status Download

Driver Tracing Library

A vendor-neutral tracing library for Akka-HTTP.

This library provides tracing directives for Akka-HTTP. It specifies common client abstractions and implementations that may be used with different tracing solutions, such as Google Stackdriver Tracing.

Getting Started

Driver tracing is published to maven central as a standard Scala library. Include it in sbt by adding the following snippet to your build.sbt:

libraryDependencies += "xyz.driver" %% "tracing" % "<latest version>"

Example

The library provides tracing directives which may be used to track and report traces accross multiple, nested service calls.

import xyz.driver.tracing._
import xyz.driver.tracing.TracingDirectives._

val tracer = new LoggingTracer(println)

val route =
  // report how long any request to this service takes
  trace(tracer) {
    path("my-service-endpoint") {
      get {
        // include a sub-trace with a custom name
        trace(tracer, Some("complex-call")) {
          // do something that takes time
          complete("done")
        }
      }
    } ~
    path("proxy-service-endpoint") {
      // extract tracing headers so they may be injected into nested requests
      extractTraceHeaders{ headers =>
        // call external service with the existing parent tracing headers
        complete("done")
      }
    }
  }

Tracing Backends

Various tracing aggregation backends are provided out of the box.

Logging

The LoggingTracer simply logs any traces locally.

Google Stackdriver Tracing

The GoogleTracer interacts with the Google Stack Driver API, as described here: https://cloud.google.com/trace/docs/reference/v1/rest/v1/projects.traces#Trace

Copying

Copyright 2017 Driver Inc.

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.

xyz.driver

Driver

Versions

Version
0.1.2
0.1.1
0.0.2