-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MeterProvider that delegates to Micrometer MeterRegistry #328
Conversation
Thanks @HaloFour! Are you able to be a component owner for this? If so, can you update https://github.com/open-telemetry/opentelemetry-java-contrib/blob/main/.github/component_owners.yml in this PR? I'd suggest renaming the top-level directory from |
Hey @trask! I wouldn't mind being a component owner for this at all. I've updated the component_owners file and renamed the module as suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for a late review, it took me a while to find some time to sit down and read through this PR. Left a couple of comments; but overall it looks like a very nice addition to the contrib repo 👍
...vider/src/main/java/io/opentelemetry/contrib/metrics/micrometer/MicrometerMeterProvider.java
Outdated
Show resolved
Hide resolved
...ava/io/opentelemetry/contrib/metrics/micrometer/internal/instruments/AbstractInstrument.java
Outdated
Show resolved
Hide resolved
import io.opentelemetry.contrib.metrics.micrometer.internal.state.MeterSharedState; | ||
import javax.annotation.Nullable; | ||
|
||
abstract class AbstractInstrumentBuilder<BuilderT extends AbstractInstrumentBuilder<BuilderT>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're usually using UPPERCASE names for type parameters:
abstract class AbstractInstrumentBuilder<BuilderT extends AbstractInstrumentBuilder<BuilderT>> { | |
abstract class AbstractInstrumentBuilder<BUILDER extends AbstractInstrumentBuilder<BUILDER>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my preferred format as well, either spotless or checkstyle disagreed and required this format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting... looks like we might have inconsistent errorprone configs between this repo and instrumentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the warning:
warning: [TypeParameterNaming] Type Parameter BUILDER must be a single letter with an optional numeric suffix, or an UpperCamelCase name followed by the letter 'T'.
abstract class AbstractInstrumentBuilder<BUILDER extends AbstractInstrumentBuilder<BUILDER>> {
^
(see https://google.github.io/styleguide/javaguide.html#s5.2.8-type-variable-names)
Did you mean 'abstract class AbstractInstrumentBuilder<BuilderT extends AbstractInstrumentBuilder<BuilderT>> {' or 'abstract class AbstractInstrumentBuilder<B extends AbstractInstrumentBuilder<B>> {'?
error: warnings found and -Werror specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #348
...er/src/main/java/io/opentelemetry/contrib/metrics/micrometer/ScheduledCallbackRegistrar.java
Outdated
Show resolved
Hide resolved
...o/opentelemetry/contrib/metrics/micrometer/internal/instruments/MicrometerDoubleCounter.java
Outdated
Show resolved
Hide resolved
.../io/opentelemetry/contrib/metrics/micrometer/internal/instruments/MicrometerDoubleGauge.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/opentelemetry/contrib/metrics/micrometer/internal/state/MeterSharedState.java
Outdated
Show resolved
Hide resolved
...egrationTest/java/io/opentelemetry/contrib/metrics/micrometer/PrometheusIntegrationTest.java
Outdated
Show resolved
Hide resolved
...rovider/src/test/java/io/opentelemetry/contrib/metrics/micrometer/TestCallbackRegistrar.java
Outdated
Show resolved
Hide resolved
.../io/opentelemetry/contrib/metrics/micrometer/internal/PollingMeterCallbackRegistrarTest.java
Outdated
Show resolved
Hide resolved
ee2d9c7
to
f5fe2d4
Compare
...r-provider/src/main/java/io/opentelemetry/contrib/metrics/micrometer/internal/Constants.java
Outdated
Show resolved
Hide resolved
...va/io/opentelemetry/contrib/metrics/micrometer/internal/instruments/AtomicDoubleCounter.java
Outdated
Show resolved
Hide resolved
.../io/opentelemetry/contrib/metrics/micrometer/internal/instruments/AbstractUpDownCounter.java
Outdated
Show resolved
Hide resolved
...vider/src/main/java/io/opentelemetry/contrib/metrics/micrometer/MicrometerMeterProvider.java
Outdated
Show resolved
Hide resolved
...entelemetry/contrib/metrics/micrometer/internal/instruments/MicrometerDoubleCounterTest.java
Outdated
Show resolved
Hide resolved
oh, that was unexpected, re-opening |
0b88d25
to
befdef4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks! 👍
thx @HaloFour! |
Description:
Feature addition - Adds an implementation of OpenTelemetry Metrics
MeterProvider
which wraps and delegates metrics to Micrometer 1.xMeterRegistry
. This is to allow an existing project with an investment in Micrometer to iteratively migrate to OpenTelemetry without having to replace existing infrastructure code.Existing Issue(s):
N/A
Outstanding items: