Skip to content

Commit 6c6dd9b

Browse files
authored
Merge pull request #58 from ovotech/remove-transitive-dep
Remove doobie-h2 dependency + fix publishing
2 parents 71a0c6d + fbac73a commit 6c6dd9b

File tree

2 files changed

+55
-21
lines changed

2 files changed

+55
-21
lines changed

README.md

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# natchez-extras
1+
# Natchez Extras
22

33
This repository consists of a number of additional integrations for [Natchez](https://github.com/tpolecat/natchez),
44
primarily to assist with integrating Natchez & Datadog. Separate to the Natchez integrations but included here for simplicity
@@ -20,28 +20,63 @@ If you're upgrading your dependencies the renamings are as follows:
2020
```
2121

2222
Other significant changes are the `Datadog` metrics object being renamed to `Dogstatsd` and the
23-
modules having their code moved into a subpackage under `com.ovoenergy.natchez.extras`
23+
modules having their code moved into a subpackage under `com.ovoenergy.natchez.extras`, for example:
2424

25-
i.e.
26-
27-
`com.ovoenergy.effect.Combine` becomes `com.ovoenergy.natchez.extras.combine.Combine`
25+
```scala
26+
import com.ovoenergy.effect.Combine // effect-utils
27+
import com.ovoenergy.natchez.extras.combine.Combine // natchez-extras
28+
```
2829

29-
This is to ensure that the `com.ovoenergy.natchez.extras` namespace won't be polluted by
30-
two modules defining, for example, a `syntax` object.
30+
This is to ensure that each module has an isolated package and so can
31+
define, for example, a `syntax` object without affecting anything else.
3132

3233
## Current modules
3334

34-
Module | Description | Artifact
35-
-----------|--------------------------------------------------------------------------------|-----------------------------------------
36-
Dogstatsd | Submits metrics to Datadog over UDP with FS2 | "com.ovoenergy" % "natchez-extras-dogstatsd"
37-
Datadog | Integrates [natchez](https://github.com/tpolecat/natchez) with the Datadog APM | "com.ovoenergy" % "natchez-extras-datadog"
38-
Doobie | Integrates [natchez](https://github.com/tpolecat/natchez) with Doobie | "com.ovoenergy" % "natchez-extras-doobie"
39-
SLF4J | Integrates [natchez](https://github.com/tpolecat/natchez) with SLF4J | "com.ovoenergy" % "natchez-extras-slf4j"
40-
Combine | Provides a function to combine two Natchez `EntryPoint[F]`s together | "com.ovoenergy" % "natchez-extras-combine"
41-
FS2 | Provides an `AllocatedSpan` you submit manually for streams | "com.ovoenergy" % "natchez-extras-fs2"
42-
Testkit | Provides a `TestEntrypoint` backed by a `Ref` for unit tests | "com.ovoenergy" % "natchez-extras-testkit"
43-
44-
### For maintainers
35+
### [Dogstatsd](https://ovotech.github.io/natchez-extras/docs/)
36+
![latest version](https://index.scala-lang.org/ovotech/natchez-extras/natchez-extras-dogstatsd/latest.svg)
37+
38+
This module allows you to send Metrics and Events to the Datadog agent over UDP with FS2.
39+
40+
### [Datadog](https://ovotech.github.io/natchez-extras/docs/natchez-datadog.html)
41+
![latest version](https://index.scala-lang.org/ovotech/natchez-extras/natchez-extras-datadog/latest.svg)
42+
43+
This module integrates Natchez with Datadog. It uses HTTP4s and does not depend on the Java Datadog library.
44+
45+
### [Doobie](https://ovotech.github.io/natchez-extras/docs/natchez-doobie.html)
46+
![latest version](https://index.scala-lang.org/ovotech/natchez-extras/natchez-extras-doobie/latest.svg)
47+
48+
This module integrates Natchez with Doobie so you can trace which DB queries are being run and for how long.
49+
50+
### [Sl4fj](https://ovotech.github.io/natchez-extras/docs/natchez-slf4j.html)
51+
![latest version](https://index.scala-lang.org/ovotech/natchez-extras/natchez-extras-slf4j/latest.svg)
52+
53+
This module provides an `Slf4j` integration with Natchez that logs whenever spans get started or completed.
54+
This is mainly useful when running applications locally or integrating with existing logging platforms.
55+
56+
### [Combine](https://ovotech.github.io/natchez-extras/docs/natchez-combine.html)
57+
![latest version](https://index.scala-lang.org/ovotech/natchez-extras/natchez-extras-combine/latest.svg)
58+
59+
This module allows two Natchez `EntryPoint`s to be combined so that they'll both be used. For example
60+
if you want to log spans with the above Slf4j integration as well as submitting them to Datadog.
61+
62+
### [FS2](https://ovotech.github.io/natchez-extras/docs/natchez-fs2.html)
63+
![latest version](https://index.scala-lang.org/ovotech/natchez-extras/natchez-extras-fs2/latest.svg)
64+
65+
This module provides an `AllocatedSpan` that can be manually submitted, for use in FS2 streams
66+
where the `Resource` based model of Natchez isn't a good fit if you want to have one trace per stream item.
67+
68+
### [Testkit](https://ovotech.github.io/natchez-extras/docs/natchez-testkit.html)
69+
![latest version](https://index.scala-lang.org/ovotech/natchez-extras/natchez-extras-testkit/latest.svg)
70+
71+
This module provides a `TestEntrypoint` backed by a `Ref` which can be useful in unit tests.
72+
73+
### [Log4cats](https://ovotech.github.io/natchez-extras/docs/natchez-log4cats.html)
74+
![latest version](https://index.scala-lang.org/ovotech/natchez-extras/natchez-extras-log4cats/latest.svg)
75+
76+
This module provides a `TracedLogger` for `log4cats` that will automatically add trace & span IDs
77+
to your log lines so that they're linked in the Datadog UI.
78+
79+
## Notes for maintainers
4580

4681
To create a release, push a tag to master of the format `x.y.z`. See the [semantic versioning guide](https://semver.org/)
4782
for details of how to choose a version number.

build.sbt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ lazy val natchezDoobie = project
146146
libraryDependencies ++= Seq(
147147
"org.tpolecat" %% "natchez-core" % natchezVersion,
148148
"org.tpolecat" %% "doobie-core" % doobieVersion,
149-
"org.tpolecat" %% "doobie-h2" % doobieVersion
149+
"org.tpolecat" %% "doobie-h2" % doobieVersion % Test
150150
),
151151
)
152152

@@ -206,8 +206,7 @@ lazy val root = (project in file("."))
206206
.settings(
207207
common ++ Seq(
208208
name := "natchez-extras",
209-
publish := nop,
210-
publishLocal := nop
209+
publish / skip := true
211210
))
212211
.aggregate(
213212
metricsCommon,

0 commit comments

Comments
 (0)