Coder Social home page Coder Social logo

datadog-scala's Introduction

Build Status

Datadog-Scala

A Scala library for interacting with the Datadog API.

As of October 2014 this library covers all the methods in the Datadog API Documentation.

Example

import github.gphat.datadog.Client
import scala.concurrent.ExecutionContext.Implicits.global

val client = new Client(apiKey = "XXX", appKey = "XXX")
client.getAllTimeboards.foreach({ response =>
    println(response.body)
})

Using It

This library is available on Maven Central.

// Add the Dep, 2.10 and 2.11 artifacts are published!
libraryDependencies += "com.github.gphat" %% "datadog-scala" % "1.1.3"

datadog-scala's People

Contributors

ddelautre avatar earldouglas avatar gphat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

datadog-scala's Issues

Scala 2.12 Build?

Wondering if an update can be pushed through that builds a scala 2.12 version. I'll open a pr.

Upgrade dependency on json4s to newer version

The current json4s dependency version is 3.2.11. This version is not binary compatible with newer versions (tested with 3.4.2). When users of datadog-scala depend on a newer json4s version, it causes this error:

java.lang.NoSuchMethodError: org.json4s.FieldSerializer.<init>(Lscala/PartialFunction;Lscala/PartialFunction;Lscala/reflect/Manifest;)V

	at github.gphat.datadog.Client.<init>(Client.scala:20)

The FieldSerializer class is source compatible, but not binary compatible, due to constructor changes.

Current dependency: https://github.com/json4s/json4s/blob/v3.2.11/core/src/main/scala/org/json4s/FieldSerializer.scala

Newer version: https://github.com/json4s/json4s/blob/v3.4.2/core/src/main/scala/org/json4s/FieldSerializer.scala

Please upgrade to a newer json4s version.

java.lang.ClassNotFoundException: scala.Product$class

Piece of code executed, based on library tests:

`import github.gphat.datadog._

val client = new Client(
  apiKey = "",
  appKey = ""
)

val metric: Metric = Metric(
  "foo.bar.test",
  Seq((1412183578, 12.0), (1412183579, 123.0)),
  Some("gauge"),
  Some(Seq("tag1", "tag2:foo")),
  Some("poop.example.com")
)

client.addMetrics(
  Seq(metric)
)`

And I'm getting this error:

ava.lang.ClassNotFoundException: scala.Product$class at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 18 common frames omitted Wrapped by: java.lang.NoClassDefFoundError: scala/Product$class at github.gphat.datadog.package$Metric.<init>(package.scala:5) at inventory.InventorySimulation.$anonfun$new$2(InventorySimulation.scala:111) at io.gatling.core.scenario.Simulation.$anonfun$executeBefore$1(Simulation.scala:176) at io.gatling.core.scenario.Simulation.$anonfun$executeBefore$1$adapted(Simulation.scala:176) at scala.collection.immutable.List.foreach(List.scala:392) at io.gatling.core.scenario.Simulation.executeBefore(Simulation.scala:176) at io.gatling.app.Runner.run0(Runner.scala:79) at io.gatling.app.Runner.run(Runner.scala:60) at io.gatling.app.Gatling$.start(Gatling.scala:73) at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46) at io.gatling.app.Gatling$.main(Gatling.scala:38) at io.gatling.app.Gatling.main(Gatling.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50) at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33) java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50) at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33) Caused by: java.lang.NoClassDefFoundError: scala/Product$class at github.gphat.datadog.package$Metric.<init>(package.scala:5) at inventory.InventorySimulation.$anonfun$new$2(InventorySimulation.scala:111) at io.gatling.core.scenario.Simulation.$anonfun$executeBefore$1(Simulation.scala:176) at io.gatling.core.scenario.Simulation.$anonfun$executeBefore$1$adapted(Simulation.scala:176) at scala.collection.immutable.List.foreach(List.scala:392) at io.gatling.core.scenario.Simulation.executeBefore(Simulation.scala:176) at io.gatling.app.Runner.run0(Runner.scala:79) at io.gatling.app.Runner.run(Runner.scala:60) at io.gatling.app.Gatling$.start(Gatling.scala:73) at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46) at io.gatling.app.Gatling$.main(Gatling.scala:38) at io.gatling.app.Gatling.main(Gatling.scala) ... 6 more Caused by: java.lang.ClassNotFoundException: scala.Product$class at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 18 more

Any clue about what's wrong? I've seen last package builds failed...is this library still active?

Metric Aggregation and counter metric type

I am having an issue where I am emitting "counter" type metrics which I expect would apply as new counter = original counter +/- the metric value. This doesn't appear to be the case when I look at metrics explorer, the values are always 1.

I think I saw in other datadog clients there is metrics aggregation. Is it the case here that metrics aggregation is needed, but not provided by this client?

Tagged / Released version?

Would you be willing to release a non-snapshot version of this library? It seems like it'd be a good fit for what I'm doing, but I can't pull in a snapshot dependency.

Thanks

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.