Skip to content

Commit

Permalink
Make context.Storage.Scope AutoCloseable (#637)
Browse files Browse the repository at this point in the history
For a small convenience increase when using it with `scala.util.Using`, `cats.effect.Resource` or whatever resource management tools one might use.
  • Loading branch information
liff authored Mar 6, 2020
1 parent e093cab commit ba20bdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kamon-core/src/main/scala/kamon/context/Storage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object Storage {
* Encapsulates the extend during which a Context is held by an Storage implementation. Once a Scope is closed, the
* Context will be removed from the Storage that created the Scope.
*/
trait Scope {
trait Scope extends AutoCloseable {

/**
* Returns the Context managed by this Scope.
Expand Down Expand Up @@ -181,4 +181,4 @@ object Storage {
contexts.result()
}
}
}
}

0 comments on commit ba20bdc

Please sign in to comment.