Skip to content

Commit

Permalink
Fix types in ServerMiddleware
Browse files Browse the repository at this point in the history
Change `Seq[Attribute[_]]` to `immutable.Iterable[Attribute[_]]` in
`ServerMiddleware`.
  • Loading branch information
NthPortal committed May 8, 2024
1 parent 451fdb4 commit b4f9584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import com.typesafe.tools.mima.core._

ThisBuild / tlBaseVersion := "0.6" // your current series x.y
ThisBuild / tlBaseVersion := "0.7" // your current series x.y

ThisBuild / licenses := Seq(License.Apache2)
ThisBuild / developers += tlGitHubDev("rossabaker", "Ross A. Baker")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ object ServerMiddleware {
* server span.
*/
def withAdditionalRequestAttributes(
additionalRequestAttributes: Request[F] => Seq[Attribute[_]]
additionalRequestAttributes: Request[F] => immutable.Iterable[Attribute[_]]
): ServerMiddlewareBuilder[F] =
copy(additionalRequestAttributes = additionalRequestAttributes)

/** Sets how to derive additional `Attribute`s from a response to add to the
* server span.
*/
def withAdditionalResponseAttributes(
additionalResponseAttributes: Response[F] => Seq[Attribute[_]]
additionalResponseAttributes: Response[F] => immutable.Iterable[Attribute[_]]
): ServerMiddlewareBuilder[F] =
copy(additionalResponseAttributes = additionalResponseAttributes)

Expand All @@ -164,7 +164,7 @@ object ServerMiddleware {
)(implicit kt: KindTransformer[F, G]): Http[G, F] =
Kleisli { (req: Request[F]) =>
if (
shouldTrace(req.requestPrelude) == ShouldTrace.DoNotTrace ||
!shouldTrace(req.requestPrelude).shouldTrace ||
!Tracer[F].meta.isEnabled
) {
f(req)
Expand Down

0 comments on commit b4f9584

Please sign in to comment.