opencensus-scala-http4s


License

License

MIT
Categories

Categories

Scala Languages
GroupId

GroupId

com.github.sebruck
ArtifactId

ArtifactId

opencensus-scala-http4s_2.12
Last Version

Last Version

0.7.2
Release Date

Release Date

Type

Type

jar
Description

Description

opencensus-scala-http4s
opencensus-scala-http4s
Project URL

Project URL

https://github.com/Sebruck/opencensus-scala/
Project Organization

Project Organization

com.github.sebruck
Source Code Management

Source Code Management

https://github.com/Sebruck/opencensus-scala/

Download opencensus-scala-http4s_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.sebruck/opencensus-scala-http4s_2.12/ -->
<dependency>
    <groupId>com.github.sebruck</groupId>
    <artifactId>opencensus-scala-http4s_2.12</artifactId>
    <version>0.7.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.sebruck/opencensus-scala-http4s_2.12/
implementation 'com.github.sebruck:opencensus-scala-http4s_2.12:0.7.2'
// https://jarcasting.com/artifacts/com.github.sebruck/opencensus-scala-http4s_2.12/
implementation ("com.github.sebruck:opencensus-scala-http4s_2.12:0.7.2")
'com.github.sebruck:opencensus-scala-http4s_2.12:jar:0.7.2'
<dependency org="com.github.sebruck" name="opencensus-scala-http4s_2.12" rev="0.7.2">
  <artifact name="opencensus-scala-http4s_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.sebruck', module='opencensus-scala-http4s_2.12', version='0.7.2')
)
libraryDependencies += "com.github.sebruck" % "opencensus-scala-http4s_2.12" % "0.7.2"
[com.github.sebruck/opencensus-scala-http4s_2.12 "0.7.2"]

Dependencies

compile (4)

Group / Artifact Type Version
com.github.sebruck : opencensus-scala-core_2.12 jar 0.7.2
com.github.sebruck : opencensus-scala-http_2.12 jar 0.7.2
org.http4s : http4s-dsl_2.12 jar 0.21.1
org.http4s : http4s-client_2.12 jar 0.21.1

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.1.1

Project Modules

There are no modules declared in this project.

Build Status

opencensus-scala

This project is a lightweight scala wrapper for the opencensus-java library and provides instrumentation for scala based frameworks.

The API documentation can be found here.

Implementation status

Opencensus-scala supports the tracing and stats apis of opencensus.

Instrumentations

Framework Tracing Stats
Akka HTTP supported planned
Http4s supported planned
Elastic4s supported planned
Play planned planned

Quickstart

Dependencies

Add the following dependencies to your sbt project.

// If you want to use only the core module
"com.github.sebruck" %% "opencensus-scala-core" % "0.6.0" 

// Dependent on the trace exporters you want to use add one or more of the following
"io.opencensus" % "opencensus-exporter-trace-stackdriver" % "0.15.0"
"io.opencensus" % "opencensus-exporter-trace-logging"     % "0.15.0"
"io.opencensus" % "opencensus-exporter-trace-instana"     % "0.15.0"
"io.opencensus" % "opencensus-exporter-trace-zipkin"      % "0.15.0"

// If you want to use opencensus-scala inside an Akka HTTP project 
"com.github.sebruck" %% "opencensus-scala-akka-http" % "0.6.0" 

// If you want to use opencensus-scala inside a http4s project 
"com.github.sebruck" %% "opencensus-scala-http4s" % "0.6.0" 

// If you want to use opencensus-scala inside a elastic4s project 
"com.github.sebruck" %% "opencensus-scala-elastic4s" % "0.6.0" 

Configuration

opencensus-scala uses typesafe config to configure exporters, sampling rates and many more. For a full reference have a look at the default configuration.

To activate the Stackdriver trace exporter with the default sampling rate of 1/10000 add the following to your application.conf.

opencensus-scala {
  trace {
    exporters {
      stackdriver {
        enabled = true 
        project-id = "MY-GC-Project"
      }
    }
  }
}

For documentation how to use the several modules, have a look at the modules section.

Modules

Core

Utilities to use opencensus in a scala idiomatic way.

Learn more at the documentation.

Akka HTTP

Utilities to use opencensus in Akka HTTP applications.

Learn more at the documentation.

http4s

Utilities to use opencensus in http4s applications.

Learn more at the documentation.

elastic4s

Utilities to use opencensus in elastic4s applications.

Learn more at the documentation.

Contributing

Contributions are very welcome! As a starting point, have a look at the open issues.

Please also check the CONTRIBUTION.md.

Versions

Version
0.7.2
0.7.1
0.7.0
0.7.0-M3
0.7.0-M2
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0