File tree Expand file tree Collapse file tree 4 files changed +88
-3
lines changed
main/java/io/micrometer/core/instrument/config/filter
test/java/io/micrometer/core/instrument/config Expand file tree Collapse file tree 4 files changed +88
-3
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2025 VMware, Inc.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package io .micrometer .core .instrument .config .filter ;
17+
18+ class FilterSupport {
19+
20+ /**
21+ * At the moment of writing, it was impossible to estimate tags count from the outside
22+ * of class, but quite often a temporary storage (ArrayList) had to be allocated
23+ * during processing. To avoid excessive resizes, this constant is introduced to
24+ * preallocate space for such a list.
25+ */
26+ public static final int DEFAULT_TAG_COUNT_EXPECTATION = 32 ;
27+
28+ private FilterSupport () {
29+ }
30+
31+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2025 VMware, Inc.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package io .micrometer .core .instrument .config .filter ;
17+
18+ import io .micrometer .core .instrument .config .MeterFilter ;
19+
20+ /**
21+ * A fallback for all factory methods that have received an input functionally equivalent
22+ * to "abstain from processing".
23+ *
24+ * @since 1.15
25+ */
26+ public class NoOpFilter implements MeterFilter {
27+
28+ private static final MeterFilter INSTANCE = new NoOpFilter ();
29+
30+ private NoOpFilter () {
31+ }
32+
33+ public static MeterFilter create () {
34+ return INSTANCE ;
35+ }
36+
37+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2025 VMware, Inc.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package io .micrometer .core .instrument .config .filter ;
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package io .micrometer .core .instrument ;
16+ package io .micrometer .core .instrument . config ;
1717
1818import io .micrometer .common .lang .Nullable ;
1919import io .micrometer .core .Issue ;
20- import io .micrometer .core .instrument .config .MeterFilter ;
21- import io .micrometer .core .instrument .config .MeterFilterReply ;
20+ import io .micrometer .core .instrument .Meter ;
21+ import io .micrometer .core .instrument .MeterRegistry ;
22+ import io .micrometer .core .instrument .Tags ;
2223import io .micrometer .core .instrument .distribution .DistributionStatisticConfig ;
2324import io .micrometer .core .instrument .simple .SimpleMeterRegistry ;
2425import org .assertj .core .api .Condition ;
You can’t perform that action at this time.
0 commit comments