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 2 months 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-17T08:17:34.000Z (3 months ago)
- Last Synced: 2025-03-22T09:11:56.250Z (2 months ago)
- Language: Scala
- Size: 148 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 4
-
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)
}
}
}
}
```