mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 06:44:51 +02:00
Refactor Stackdriver-over-REST specific code to a different package
Downstream users who use gRPC rather than REST don't want to pull down rest-related dependencies. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=145834701
This commit is contained in:
parent
bfc4841761
commit
3f9c53b850
10 changed files with 12 additions and 1127 deletions
|
@ -15,6 +15,7 @@
|
|||
package google.registry.monitoring.metrics;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.joda.time.Instant;
|
||||
import org.joda.time.Interval;
|
||||
|
@ -32,7 +33,8 @@ public abstract class MetricPoint<V> {
|
|||
* <p>Callers should insure that the count of {@code labelValues} matches the count of labels for
|
||||
* the given metric.
|
||||
*/
|
||||
static <V> MetricPoint<V> create(
|
||||
@VisibleForTesting
|
||||
public static <V> MetricPoint<V> create(
|
||||
Metric<V> metric, ImmutableList<String> labelValues, Instant timestamp, V value) {
|
||||
MetricsUtils.checkLabelValuesLength(metric, labelValues);
|
||||
|
||||
|
@ -47,7 +49,8 @@ public abstract class MetricPoint<V> {
|
|||
* <p>Callers should insure that the count of {@code labelValues} matches the count of labels for
|
||||
* the given metric.
|
||||
*/
|
||||
static <V> MetricPoint<V> create(
|
||||
@VisibleForTesting
|
||||
public static <V> MetricPoint<V> create(
|
||||
Metric<V> metric,
|
||||
ImmutableList<String> labelValues,
|
||||
Instant startTime,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue