-
Notifications
You must be signed in to change notification settings - Fork 34
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
Verify class compatibility before attempting cast #1427
Conversation
@@ -19,6 +19,7 @@ | |||
import static com.splunk.opentelemetry.instrumentation.jvmmetrics.AllocatedMemoryMetrics.METRIC_NAME; | |||
|
|||
import com.splunk.opentelemetry.instrumentation.jvmmetrics.AllocatedMemoryMetrics; | |||
import io.micrometer.common.lang.NonNull; |
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.
wrong import?
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.
Nope, micrometer has their own. 🙄
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.
why on earth would you want to use the micrometer one?
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.
This class is an implementation of a micrometer interface. That interface uses the micrometer specific annotation. Using an annotation that doesn't match the actual interface declaration seems hacky.
...rc/main/java/com/splunk/opentelemetry/instrumentation/jvmmetrics/AllocatedMemoryMetrics.java
Show resolved
Hide resolved
...rc/main/java/com/splunk/opentelemetry/instrumentation/jvmmetrics/AllocatedMemoryMetrics.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/splunk/opentelemetry/instrumentation/jvmmetrics/AllocatedMemoryMetrics.java
Show resolved
Hide resolved
Bumps [io.grpc:grpc-bom](https://github.com/grpc/grpc-java) from 1.57.2 to 1.58.0. - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](grpc/grpc-java@v1.57.2...v1.58.0) --- updated-dependencies: - dependency-name: io.grpc:grpc-bom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Truncate process.command_args * address review comment * improve comment
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3.3.1...v3.3.2) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 4.2.1. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v4.1.1...v4.2.1) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#1429) * Bump com.google.protobuf:protobuf-bom from 3.24.2 to 3.24.3 Bumps [com.google.protobuf:protobuf-bom](https://github.com/protocolbuffers/protobuf) from 3.24.2 to 3.24.3. - [Release notes](https://github.com/protocolbuffers/protobuf/releases) - [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl) - [Commits](protocolbuffers/protobuf@v3.24.2...v3.24.3) --- updated-dependencies: - dependency-name: com.google.protobuf:protobuf-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update licenses --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
@@ -43,7 +43,7 @@ jobs: | |||
java-version: 17 | |||
|
|||
- name: Cache Gradle Wrapper | |||
uses: actions/cache@v3.3.1 | |||
uses: actions/cache@v3.3.2 |
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.
It appears some unrelated changes have been merged into this branch
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.
had to merge due to conflict I think.
Superseded by #1435 |
There was a case in the field on an IBM J9 JVM, where an instance returned from
ManagementFactory.getThreadMXBean()
could not be cast safely to thecom.sun.management.ThreadMXBean
, even thought that class can be found on the classpath.It looks like other implementations have also encountered this, and so this fix is inspired by those other workarounds.