ovotech / natchez-extras

Integrations between Natchez, Doobie, HTTP4s, Log4cats and Datadog. Formerly called effect-utils.
https://ovotech.github.io/natchez-extras/
Apache License 2.0
31 stars 18 forks source link

Record submitted tags in TestEntryPoint #68

Closed tomverran closed 3 years ago

tomverran commented 3 years ago

This fixes a long standing annoyance with TestEntryPoint which was that it didn't keep track of any tags submitted to the spans it created. Now it does so tests can be written that ensure applications are sending the right tags along to Natchez.

I renamed TestSpan to CompletedSpan to make it clearer that spans are only available for inspection by tests after they've been completed and I inlined the creation of spans & resource handling because the two separate functions confused me at first.