Skip to content

Commit

Permalink
finagle-stats, finagle-stats-core: bump to 2.13
Browse files Browse the repository at this point in the history
Problem

No cross-build for finagle-stats 2.13 and finagle-stats-core 2.13

Solution

include 2.13 in finagle-stats and finagle-stats-core cross versions.

Signed-off-by: Yufan Gong <yufang@twitter.com>

Differential Revision: https://phabricator.twitter.biz/D421449
  • Loading branch information
hderms authored and jenkins committed Jan 22, 2020
1 parent fee83b1 commit 4144d73
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ New Features
and server. Off by default, clients and servers must be configured to negotiate.
``PHAB_ID=D414638``

* finagle-stats: Enables cross-build for 2.13.0. ``PHAB_ID=D421449``

* finagle-stats-core: Enables cross-build for 2.13.0. ``PHAB_ID=D421449``

19.12.0
-------

Expand Down
6 changes: 4 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ lazy val finagleStatsCore = Project(
id = "finagle-stats-core",
base = file("finagle-stats-core")
).settings(
sharedSettings
sharedSettings,
withTwoThirteen
).settings(
name := "finagle-stats-core",
libraryDependencies ++= Seq(
Expand All @@ -481,7 +482,8 @@ lazy val finagleStats = Project(
id = "finagle-stats",
base = file("finagle-stats")
).settings(
sharedSettings
sharedSettings,
withTwoThirteen
).settings(
name := "finagle-stats"
).dependsOn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class JsonExporter(metrics: MetricsView, verbose: Tunable[String], timer: Timer)

def filterSample(sample: collection.Map[String, Number]): collection.Map[String, Number] =
statsFilterRegex match {
case Some(regex) => sample.filterKeys(!regex.pattern.matcher(_).matches)
case Some(regex) => sample.filterKeys(!regex.pattern.matcher(_).matches).toMap
case None => sample
}

Expand All @@ -212,11 +212,12 @@ class JsonExporter(metrics: MetricsView, verbose: Tunable[String], timer: Timer)
verbose: Option[String => Boolean]
): collection.Map[String, A] = verbose match {
case Some(pattern) =>
sample.filterKeys(
name => metrics.verbosity.get(name) != Verbosity.Debug || pattern(name)
)
sample
.filterKeys(
name => metrics.verbosity.get(name) != Verbosity.Debug || pattern(name)
).toMap

case None =>
sample.filterKeys(name => metrics.verbosity.get(name) != Verbosity.Debug)
sample.filterKeys(name => metrics.verbosity.get(name) != Verbosity.Debug).toMap
}
}

0 comments on commit 4144d73

Please sign in to comment.