Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.9.2 #344

Merged
merged 2 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Release 2.9.2 (2023-08-25)
--------------------------
Add ability to set custom tags for statsd metrics (#340)

Release 2.9.1 (2023-08-03)
--------------------------
PubSub: use debug for logging the inserts (#321)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ trait Collector {
)

lazy val metricRegistry: Option[HttpMetricsRegistry] = collectorConf.monitoring.metrics.statsd match {
case StatsdConfig(true, hostname, port, period, prefix) =>
case StatsdConfig(true, hostname, port, period, prefix, tags) =>
val constantTags = tags.map { case (k: String, v: String) => s"${k}:${v}" }

Some(
DatadogRegistry(
client = new NonBlockingStatsDClientBuilder()
Expand All @@ -145,6 +147,7 @@ trait Collector {
.enableAggregation(true)
.aggregationFlushInterval(period.toMillis.toInt)
.enableTelemetry(false)
.constantTags(constantTags.toArray: _*)
.build(),
DatadogSettings
.default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ package model {
enabled: Boolean,
hostname: String,
port: Int,
period: FiniteDuration = 1.minute,
prefix: String = "snowplow.collector"
period: FiniteDuration = 1.minute,
prefix: String = "snowplow.collector",
tags: Map[String, String] = Map("app" -> "collector")
)
final case class MetricsConfig(statsd: StatsdConfig)
final case class MonitoringConfig(metrics: MetricsConfig)
Expand Down
5 changes: 5 additions & 0 deletions examples/config.kafka.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ collector {
period = "10 seconds"
# Optional, override the default metric prefix
# "prefix": "snowplow.collector"

# Any key-value pairs to be tagged on every StatsD metric
"tags": {
"app": collector
}
}

# Configures how long the colletor should pause after receiving a sigterm before starting the graceful shutdown.
Expand Down
5 changes: 5 additions & 0 deletions examples/config.kinesis.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ collector {
period = "10 seconds"
# Optional, override the default metric prefix
# "prefix": "snowplow.collector"

# Any key-value pairs to be tagged on every StatsD metric
"tags": {
"app": collector
}
}

# Configures how long the colletor should pause after receiving a sigterm before starting the graceful shutdown.
Expand Down
5 changes: 5 additions & 0 deletions examples/config.nsq.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ collector {
period = "10 seconds"
# Optional, override the default metric prefix
# "prefix": "snowplow.collector"

# Any key-value pairs to be tagged on every StatsD metric
"tags": {
"app": collector
}
}

# Configures how long the colletor should pause after receiving a sigterm before starting the graceful shutdown.
Expand Down
5 changes: 5 additions & 0 deletions examples/config.pubsub.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ collector {
period = "10 seconds"
# Optional, override the default metric prefix
# "prefix": "snowplow.collector"

# Any key-value pairs to be tagged on every StatsD metric
"tags": {
"app": collector
}
}

# Configures how long the colletor should pause after receiving a sigterm before starting the graceful shutdown.
Expand Down
5 changes: 5 additions & 0 deletions examples/config.rabbitmq.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ collector {
period = "10 seconds"
# Optional, override the default metric prefix
# "prefix": "snowplow.collector"

# Any key-value pairs to be tagged on every StatsD metric
"tags": {
"app": collector
}
}

# Configures how long the colletor should pause after receiving a sigterm before starting the graceful shutdown.
Expand Down
5 changes: 5 additions & 0 deletions examples/config.sqs.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ collector {
period = "10 seconds"
# Optional, override the default metric prefix
# "prefix": "snowplow.collector"

# Any key-value pairs to be tagged on every StatsD metric
"tags": {
"app": collector
}
}

# Configures how long the colletor should pause after receiving a sigterm before starting the graceful shutdown.
Expand Down
5 changes: 5 additions & 0 deletions examples/config.stdout.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ collector {
period = "10 seconds"
# Optional, override the default metric prefix
# "prefix": "snowplow.collector"

# Any key-value pairs to be tagged on every StatsD metric
"tags": {
"app": collector
}
}

# Configures how long the colletor should pause after receiving a sigterm before starting the graceful shutdown.
Expand Down
Loading