Giter Club home page Giter Club logo

opencensus-scala's Introduction

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.7.0-M3"

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

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

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

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

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.

doobie

Utilities to use opencensus in doobie 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.

opencensus-scala's People

Contributors

sebruck avatar yannick-cw avatar scala-steward avatar sullis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.