Skip to content

Commit

Permalink
Telemetry is no longer initialized when telemetry disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosroman committed May 30, 2024
1 parent 1969237 commit 3f393a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Changelog
=========
# 0.49.2-SNAPSHOT / TBC
* [BUGFIX] Telemetry is no longer initialized when telemetry is disabled [#522][]

# 0.49.1 / 2024-04-09
* [FEATURE] Add ZGC Major and Minor Cycles and ZGC Major and Minor Pauses beans support out of the box (Generational ZGC support) [#509][]
Expand Down Expand Up @@ -342,7 +343,7 @@ Changelog
* [IMPROVEMENT] `java-dogstatsd-client` connections errors are now logged. See [#208][] (Thanks [@mattdrees][])
* [IMPROVEMENT] Lower log level of log entry dumping all configs from AutoConfig. See [#212][]
* [BUGFIX] GC metrics `jvm.gc.eden_size` and `jvm.gc.survivor_size` were not collected for
`Eden Space` and `Survivor Space` memory pools. See [#214][]
`Eden Space` and `Survivor Space` memory pools. See [#214][]

# 0.26.2 / 2019-06-04

Expand Down Expand Up @@ -767,6 +768,7 @@ Changelog
[#477]: https://github.com/DataDog/jmxfetch/issues/477
[#509]: https://github.com/DataDog/jmxfetch/issues/509
[#512]: https://github.com/DataDog/jmxfetch/pull/512
[#522]: https://github.com/DataDog/jmxfetch/pull/522
[@alz]: https://github.com/alz
[@aoking]: https://github.com/aoking
[@arrawatia]: https://github.com/arrawatia
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/datadog/jmxfetch/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ public App(final AppConfig appConfig) {
}
this.configs = getConfigs(this.appConfig);

this.initTelemetryBean();
if (this.appConfig.getJmxfetchTelemetry()) {
this.initTelemetryBean();
}
}

private ObjectName getAppTelemetryBeanName() {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/datadog/jmxfetch/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ public class AppConfig {
required = false)
private boolean statsdTelemetry;

/* Do not default to true as this affects embedded mode where
customers can have custom MBean managers */
@Parameter(
names = {"--jmxfetch_telemetry", "-jt"},
description = "Enable additional jmxfetch telemetry reporting",
Expand Down

0 comments on commit 3f393a2

Please sign in to comment.