kamon-io / Kamon

Distributed Tracing, Metrics and Context Propagation for applications running on the JVM
https://kamon.io
Other
1.41k stars 328 forks source link

Kamon filter's configuration key requires full path #920

Open yiminyuan opened 3 years ago

yiminyuan commented 3 years ago

According to https://kamon.io/docs/latest/core/utilities/, I wrote unit tests like this:

"Kamon filter tests" in {
  val config = ConfigFactory.parseString(
    """
      |kamon.util.filters {
      |  test-filter {
      |    includes = [ "**foo**" ]
      |  }
      |}
      |""".stripMargin
  )
  Kamon.reconfigure(config.withFallback(Kamon.config()))

  Kamon.filter("test-filter").accept("foo") shouldBe true  // Failure!!!
  Kamon.filter("kamon.util.filters.test-filter").accept("foo") shouldBe true
}
SimunKaracic commented 3 years ago

That's a documentation issue! Filters used to be nested inside of kamon.util.filters, but now you can just place them anywhere you want!

Sorry for the confusion, we'll fix it asap!