Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,23 @@ public static Map<InstrumentSelector, View> getInternalViews() {
ImmutableSet.<AttributeKey>builder()
.add(BIGTABLE_PROJECT_ID_KEY, INSTANCE_ID_KEY, APP_PROFILE_KEY, CLIENT_NAME_KEY)
.build());
defineView(
views,
BATCH_WRITE_FLOW_CONTROL_TARGET_QPS_NAME,
null,
InstrumentType.GAUGE,
"1",
ImmutableSet.<AttributeKey>builder().addAll(COMMON_ATTRIBUTES).build());
defineView(
views,
BATCH_WRITE_FLOW_CONTROL_FACTOR_NAME,
AGGREGATION_BATCH_WRITE_FLOW_CONTROL_FACTOR_HISTOGRAM,
InstrumentType.HISTOGRAM,
"1",
ImmutableSet.<AttributeKey>builder()
.addAll(COMMON_ATTRIBUTES)
.add(STATUS_KEY, APPLIED_KEY)
.build());
return views.build();
}

Expand Down Expand Up @@ -373,23 +390,6 @@ public static Map<InstrumentSelector, View> getAllViews() {
.addAll(COMMON_ATTRIBUTES)
.add(STREAMING_KEY, STATUS_KEY)
.build());
defineView(
views,
BATCH_WRITE_FLOW_CONTROL_TARGET_QPS_NAME,
null,
InstrumentType.GAUGE,
"1",
ImmutableSet.<AttributeKey>builder().addAll(COMMON_ATTRIBUTES).build());
defineView(
views,
BATCH_WRITE_FLOW_CONTROL_FACTOR_NAME,
AGGREGATION_BATCH_WRITE_FLOW_CONTROL_FACTOR_HISTOGRAM,
InstrumentType.HISTOGRAM,
"1",
ImmutableSet.<AttributeKey>builder()
.addAll(COMMON_ATTRIBUTES)
.add(STATUS_KEY, APPLIED_KEY)
.build());
return views.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ public void setUp() throws Exception {
meterProvider.registerView(entry.getKey(), entry.getValue());
}

for (Map.Entry<InstrumentSelector, View> entry :
BuiltinMetricsConstants.getInternalViews().entrySet()) {
meterProvider.registerView(entry.getKey(), entry.getValue());
}

OpenTelemetrySdk otel =
OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build();
BuiltinMetricsTracerFactory facotry = BuiltinMetricsTracerFactory.create(otel, baseAttributes);
Expand Down
Loading