-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #438 from zalando/feature/metrics
Introduced Metrics factory for starter
- Loading branch information
Showing
7 changed files
with
54 additions
and
51 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
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
15 changes: 0 additions & 15 deletions
15
...spring-boot-starter/src/main/java/org/zalando/riptide/spring/CircuitBreakerListeners.java
This file was deleted.
Oops, something went wrong.
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
41 changes: 41 additions & 0 deletions
41
riptide-spring-boot-starter/src/main/java/org/zalando/riptide/spring/Metrics.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,41 @@ | ||
package org.zalando.riptide.spring; | ||
|
||
import com.google.common.collect.ImmutableList; | ||
import io.micrometer.core.instrument.MeterRegistry; | ||
import io.micrometer.core.instrument.Tag; | ||
import org.zalando.riptide.Plugin; | ||
import org.zalando.riptide.failsafe.CircuitBreakerListener; | ||
import org.zalando.riptide.failsafe.RetryListener; | ||
import org.zalando.riptide.failsafe.metrics.MetricsCircuitBreakerListener; | ||
import org.zalando.riptide.failsafe.metrics.MetricsRetryListener; | ||
import org.zalando.riptide.metrics.MetricsPlugin; | ||
|
||
final class Metrics { | ||
|
||
private Metrics() { | ||
|
||
} | ||
|
||
public static Plugin createMetricsPlugin(final MeterRegistry registry, | ||
final ImmutableList<Tag> tags) { | ||
return new MetricsPlugin(registry).withDefaultTags(tags); | ||
} | ||
|
||
public static CircuitBreakerListener createCircuitBreakerListener(final MeterRegistry registry, | ||
final ImmutableList<Tag> defaultTags) { | ||
return new MetricsCircuitBreakerListener(registry).withDefaultTags(defaultTags); | ||
} | ||
|
||
public static CircuitBreakerListener getDefaultCircuitBreakerListener() { | ||
return CircuitBreakerListener.DEFAULT; | ||
} | ||
|
||
public static RetryListener createRetryListener(final MeterRegistry registry, | ||
final ImmutableList<Tag> defaultTags) { | ||
return new MetricsRetryListener(registry).withDefaultTags(defaultTags); | ||
} | ||
|
||
public static RetryListener getDefaultRetryListener() { | ||
return RetryListener.DEFAULT; | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
riptide-spring-boot-starter/src/main/java/org/zalando/riptide/spring/RetryListeners.java
This file was deleted.
Oops, something went wrong.