aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/util/JavaTags.scala
blob: 90bece5c5adf2aaa1fa7e59261f15726d5d371f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package kamon.util

object JavaTags {

  /**
   *  Helper method to transform Java maps into Scala maps. Typically this will be used as a static import from
   *  Java code that wants to use tags, as tags are defined as scala.collection.mutable.Map[String, String] and
   *  creating them directly from Java is quite verbose.
   */
  def tagsFromMap(tags: java.util.Map[String, String]): Map[String, String] = {
    import scala.collection.JavaConversions._
    tags.toMap
  }
}