diff --git a/README.md b/README.md index 8cd5227..7956d17 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ for counters, timers, gauges and distributions. Add the following dependency to your `build.sbt`: ```scala -libraryDependencies += "io.github.keirlawson" %% "meters4s" % "" +libraryDependencies += "com.ovoenergy" %% "meters4s" % "" ``` Or for Cats Effect 2.x use the 0.4.x series. @@ -24,24 +24,24 @@ StatsD to provide and ergonomic means for creating reporters for these registrie follows: ```scala -libraryDependencies += "io.github.keirlawson" %% "meters4s-datadog" % "" +libraryDependencies += "com.ovoenergy" %% "meters4s-datadog" % "" ``` or ```scala -libraryDependencies += "io.github.keirlawson" %% "meters4s-statsd" % "" +libraryDependencies += "com.ovoenergy" %% "meters4s-statsd" % "" ``` or ```scala -libraryDependencies += "io.github.keirlawson" %% "meters4s-prometheus" % "" +libraryDependencies += "com.ovoenergy" %% "meters4s-prometheus" % "" ``` ## Usage -For comprehensive API documentation check [the scaladoc](https://keirlawson.github.io/meters4s/latest/api/). +For comprehensive API documentation check [the scaladoc](https://ovotech.github.io/meters4s/latest/api/). A simple usage example for incrementing a counter, backed by a Micrometer `SimpleMeterRegistry`: diff --git a/build.sbt b/build.sbt index 6e98c75..1cbc2f1 100644 --- a/build.sbt +++ b/build.sbt @@ -9,7 +9,7 @@ lazy val root = (project in file(".")) name := "meters4s", commonSettings, libraryDependencies ++= commonDependencies, - git.remoteRepo := "git@github.com:keirlawson/meters4s.git", + git.remoteRepo := "git@github.com:ovotech/meters4s.git", ScalaUnidoc / siteSubdirName := "latest/api", addMappingsToSiteDir( ScalaUnidoc / packageDoc / mappings, @@ -39,25 +39,27 @@ lazy val root = (project in file(".")) .aggregate(core, datadog, statsd, prometheus, docs, http4s) lazy val commonSettings = Seq( - organization := "io.github.keirlawson", + organization := "com.ovoenergy", scalaVersion := "3.3.0", crossScalaVersions ++= additionalSupportedScalaVersions, - homepage := Some(url("https://github.com/keirlawson/meters4s")), + organizationName := "OVO Energy", + organizationHomepage := Some(url("https://www.ovoenergy.com/")), + homepage := Some(url("https://github.com/ovotech/meters4s")), startYear := Some(2020), licenses := Seq( ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")) ), scmInfo := Some( ScmInfo( - url("https://github.com/keirlawson/meters4s"), - "git@github.com:keirlawson/meters4s.git" + url("https://github.com/ovotech/meters4s"), + "git@github.com:ovotech/meters4s.git" ) ), developers := List( Developer( "keirlawson", "Keir Lawson", - "keirlawson@gmail.com", + "keir,lawson@ovoenergy.com", url("https://github.com/keirlawson") ) ) @@ -65,7 +67,7 @@ lazy val commonSettings = Seq( lazy val publishSettings = Seq( publishTo := sonatypePublishToBundle.value, - sonatypeProfileName := "io.github.keirlawson", + sonatypeProfileName := "com.ovoenergy", publishMavenStyle := true ) diff --git a/docs/README.md b/docs/README.md index ce5d348..74e1bf8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -17,7 +17,7 @@ resolvers ++= Seq( Add the following depdency to your `build.sbt`: ```scala -libraryDependencies += "io.github.keirlawson" %% "meters4s" % "@VERSION@" +libraryDependencies += "com.ovoenergy" %% "meters4s" % "@VERSION@" ``` You will likely also want to add the module corresponding to whichever monitoring system you want to report metrics to. All @@ -28,18 +28,18 @@ For developer convience we also provide a couple of modules for particular monit StatsD to provide and ergonomic means for creating reporters for these registries. These can be added to your poject as follows: ```scala -libraryDependencies += "io.github.keirlawson" %% "meters4s-datadog" % "@VERSION@" +libraryDependencies += "com.ovoenergy" %% "meters4s-datadog" % "@VERSION@" ``` or ```scala -libraryDependencies += "io.github.keirlawson" %% "meters4s-statsd" % "@VERSION@" +libraryDependencies += "com.ovoenergy" %% "meters4s-statsd" % "@VERSION@" ``` ## Usage -For comprehensive API documentation check [the scaladoc](https://keirlawson.github.io/meters4s/latest/api/). +For comprehensive API documentation check [the scaladoc](https://ovotech.github.io/meters4s/latest/api/). A simple usage example for incrementing a counter, backed by a Micrometer `SimpleMeterRegistry`: diff --git a/prometheus/src/main/scala/meter4s/prometheus/Prometheus.scala b/prometheus/src/main/scala/meter4s/prometheus/Prometheus.scala index bd6e51b..d2c07f8 100644 --- a/prometheus/src/main/scala/meter4s/prometheus/Prometheus.scala +++ b/prometheus/src/main/scala/meter4s/prometheus/Prometheus.scala @@ -1,3 +1,19 @@ +/* + * Copyright 2020 OVO Energy + * + * 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. + */ + package meter4s.prometheus import cats.effect.{Async, Resource, Sync} import meters4s.{MetricsConfig, Reporter}