|
1 | 1 | /* |
2 | | - * Copyright (c) 2023, 2024 Oracle and/or its affiliates. |
| 2 | + * Copyright (c) 2023, 2025 Oracle and/or its affiliates. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
34 | 34 | */ |
35 | 35 | class MMeter<M extends io.micrometer.core.instrument.Meter> implements Meter { |
36 | 36 |
|
37 | | - private static final String DEFAULT_SCOPE = "application"; |
38 | | - |
39 | 37 | private final M delegate; |
40 | 38 | private final Meter.Id id; |
41 | 39 |
|
@@ -277,51 +275,6 @@ protected Meter.Id id() { |
277 | 275 |
|
278 | 276 | } |
279 | 277 |
|
280 | | - static class Id implements Meter.Id { |
281 | | - |
282 | | - private final io.micrometer.core.instrument.Meter.Id delegate; |
283 | | - |
284 | | - private Id(io.micrometer.core.instrument.Meter.Id delegate) { |
285 | | - this.delegate = delegate; |
286 | | - } |
287 | | - |
288 | | - static Id create(io.micrometer.core.instrument.Meter.Id id) { |
289 | | - return new Id(id); |
290 | | - } |
291 | | - |
292 | | - @Override |
293 | | - public String name() { |
294 | | - return delegate.getName(); |
295 | | - } |
296 | | - |
297 | | - @Override |
298 | | - public String toString() { |
299 | | - return String.format("ID[name=%s,tagsMap=[%s]]", delegate.getName(), delegate.getTags()); |
300 | | - } |
301 | | - |
302 | | - @Override |
303 | | - public Iterable<Tag> tags() { |
304 | | - return MTag.neutralTags(delegate.getTags()); |
305 | | - } |
306 | | - |
307 | | - @Override |
308 | | - public boolean equals(Object o) { |
309 | | - if (this == o) { |
310 | | - return true; |
311 | | - } |
312 | | - if (o == null || getClass() != o.getClass()) { |
313 | | - return false; |
314 | | - } |
315 | | - Id id = (Id) o; |
316 | | - return Objects.equals(delegate, id.delegate); |
317 | | - } |
318 | | - |
319 | | - @Override |
320 | | - public int hashCode() { |
321 | | - return Objects.hash(delegate); |
322 | | - } |
323 | | - } |
324 | | - |
325 | 278 | static class PlainId implements Meter.Id { |
326 | 279 |
|
327 | 280 | private final String name; |
@@ -383,8 +336,5 @@ public int hashCode() { |
383 | 336 | return Objects.hash(name, tags); |
384 | 337 | } |
385 | 338 |
|
386 | | - private static Tag tag(io.micrometer.core.instrument.Tag tag) { |
387 | | - return Tag.create(tag.getKey(), tag.getValue()); |
388 | | - } |
389 | 339 | } |
390 | 340 | } |
0 commit comments