forked from micrometer-metrics/micrometer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deadlock in registry when performing nested meter registration
* Added timerPercentilesMax and timerPercentilesMin to Spectator-based registries.
- Loading branch information
1 parent
44ec768
commit 2651452
Showing
12 changed files
with
146 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
micrometer-core/src/main/java/io/micrometer/core/instrument/spectator/SpectatorConf.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package io.micrometer.core.instrument.spectator; | ||
|
||
import com.netflix.spectator.api.RegistryConfig; | ||
|
||
import java.time.Duration; | ||
|
||
public interface SpectatorConf extends RegistryConfig { | ||
/** | ||
* Property prefix to prepend to configuration names. | ||
*/ | ||
String prefix(); | ||
|
||
/** | ||
* A bucket filter clamping the bucket domain of timer percentiles histograms to some max value. | ||
* This is used to limit the number of buckets shipped to save on storage. | ||
*/ | ||
default Duration timerPercentilesMax() { | ||
String v = get(prefix() + ".timerPercentilesMax"); | ||
return v == null ? Duration.ofMinutes(2) : Duration.parse(v); | ||
} | ||
|
||
/** | ||
* A bucket filter clamping the bucket domain of timer percentiles histograms to some min value. | ||
* This is used to limit the number of buckets shipped to save on storage. | ||
*/ | ||
default Duration timerPercentilesMin() { | ||
String v = get(prefix() + ".timerPercentilesMin"); | ||
return v == null ? Duration.ofMillis(10) : Duration.parse(v); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
micrometer-spring-legacy/src/samples/java/io/micrometer/spring/samples/InfluxSample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.micrometer.spring.samples; | ||
|
||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.boot.builder.SpringApplicationBuilder; | ||
import org.springframework.scheduling.annotation.EnableScheduling; | ||
|
||
@SpringBootApplication(scanBasePackages = "io.micrometer.spring.samples.components") | ||
@EnableScheduling | ||
public class InfluxSample { | ||
public static void main(String[] args) { | ||
new SpringApplicationBuilder(AtlasSample.class).profiles("influx").run(args); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
micrometer-spring-legacy/src/samples/resources/application-influx.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# Copyright 2017 Pivotal Software, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
metrics: | ||
influx: | ||
enabled: true | ||
step: PT10S | ||
readTimeout: PT30S | ||
batchSize: 20000 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters