Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dwolla/dwolla-otel-natchez
Utilities for configuring a Natchez EntryPoint for OpenTelemetry at Dwolla
https://github.com/dwolla/dwolla-otel-natchez
Last synced: about 11 hours ago
JSON representation
Utilities for configuring a Natchez EntryPoint for OpenTelemetry at Dwolla
- Host: GitHub
- URL: https://github.com/dwolla/dwolla-otel-natchez
- Owner: Dwolla
- License: mit
- Created: 2022-12-29T23:57:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T20:50:31.000Z (9 days ago)
- Last Synced: 2024-10-28T21:35:50.016Z (9 days ago)
- Language: Scala
- Size: 127 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# dwolla-otel-natchez
Provides `OpenTelemetryAtDwolla`, a utility object that configures a Natchez `EntryPoint[F]` for use with OpenTelemetry, using defaults appropriate for Dwolla tagless-final applications.
## Example Usage
```scala
import cats.effect.{Trace => _, _}
import com.dwolla.tracing.DwollaEnvironment.Local
import com.dwolla.tracing._object MyApp extends IOApp {
override def run(args: List[String]): IO[ExitCode] = {
OpenTelemetryAtDwolla[IO]("example-app", args.headOption.flatMap(DwollaEnvironment(_)).getOrElse(Local))
.use { entryPoint =>entryPoint.root("root span").use { span =>
span.put("demo-type" -> "Hello World").as(ExitCode.Success)
}
}
}
}
```