-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from trace4cats/feature/extra-attributes
Allow to inject extra attributes
- Loading branch information
Showing
4 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
modules/http4s-common/src/main/scala/trace4cats/http4s/common/Http4sAttributes.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
package trace4cats.http4s.common | ||
|
||
import cats.Eval | ||
import cats.effect.SyncIO | ||
import org.typelevel.vault.Key | ||
import trace4cats.model.AttributeValue | ||
|
||
object Http4sAttributes { | ||
object Keys { | ||
val SpanName: Key[String] = Key.newKey[SyncIO, String].unsafeRunSync() | ||
val ExtraRequestAttributes: Key[Eval[Map[String, AttributeValue]]] = | ||
Key.newKey[SyncIO, Eval[Map[String, AttributeValue]]].unsafeRunSync() | ||
val ExtraResponseAttributes: Key[Eval[Map[String, AttributeValue]]] = | ||
Key.newKey[SyncIO, Eval[Map[String, AttributeValue]]].unsafeRunSync() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters