Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

feat: relocate Opencensus configurations from java-core to gax #1646

Merged
merged 4 commits into from
Apr 6, 2022

Conversation

mpeddada1
Copy link
Contributor

Opencensus is used by libraries like Pub/Sub and Spanner.
Tested this out manually with Pub/Sub and Spanner. Without this feature, Pub/Sub results in:

   Caused by: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Failed computing credential metadata
       io.grpc.Status.asRuntimeException(Status.java:535)
       [...]
     Caused by: java.util.ServiceConfigurationError: Provider io.opencensus.impl.trace.TraceComponentImpl could not be instantiated.
       io.opencensus.internal.Provider.createInstance(Provider.java:46)
       io.opencensus.trace.Tracing.loadTraceComponent(Tracing.java:110)
       io.opencensus.trace.Tracing.<clinit>(Tracing.java:38)
       com.google.api.client.http.OpenCensusUtils.<clinit>(OpenCensusUtils.java:56)
       com.google.api.client.http.HttpRequest.<init>(HttpRequest.java:203)
       [...]
     Caused by: java.lang.NoSuchMethodException: io.opencensus.impl.trace.TraceComponentImpl.<init>()
       java.lang.Class.getConstructor0(DynamicHub.java:3349)
       java.lang.Class.getConstructor(DynamicHub.java:2151)
       io.opencensus.internal.Provider.createInstance(Provider.java:43)
       [...]

Spanner results in:

JUnit Vintage:InstanceAdminClientTest:testIAMPermissions
    MethodSource [className = 'com.google.cloud.spanner.InstanceAdminClientTest', methodName = 'testIAMPermissions', methodParameterTypes = '']
    => org.opentest4j.MultipleFailuresError: Multiple Failures (2 failures)
        java.util.ServiceConfigurationError: Provider io.opencensus.impl.trace.TraceComponentImpl could not be instantiated.
        java.lang.NullPointerException: <no message>
       org.junit.vintage.engine.execution.TestRun.getStoredResultOrSuccessful(TestRun.java:196)
       org.junit.vintage.engine.execution.RunListenerAdapter.fireExecutionFinished(RunListenerAdapter.java:226)
       org.junit.vintage.engine.execution.RunListenerAdapter.testFinished(RunListenerAdapter.java:192)
       org.junit.vintage.engine.execution.RunListenerAdapter.testFinished(RunListenerAdapter.java:79)
       org.junit.runner.notification.SynchronizedRunListener.testFinished(SynchronizedRunListener.java:87)
       [...]
       Suppressed: java.util.ServiceConfigurationError: Provider io.opencensus.impl.trace.TraceComponentImpl could not be instantiated.
         io.opencensus.internal.Provider.createInstance(Provider.java:46)
         io.opencensus.trace.Tracing.loadTraceComponent(Tracing.java:110)
         io.opencensus.trace.Tracing.<clinit>(Tracing.java:38)
         com.google.cloud.spanner.SpannerImpl.<clinit>(SpannerImpl.java:58)

TODO:

  • Remove Opencensus feature from java-core once this PR is merged and released.
@mpeddada1 mpeddada1 requested review from a team as code owners April 1, 2022 13:28
@mpeddada1 mpeddada1 requested review from suztomo and meltsufin April 4, 2022 18:58
@mpeddada1 mpeddada1 merged commit b34ffb1 into main Apr 6, 2022
@mpeddada1 mpeddada1 deleted the relocate-opencensus branch April 6, 2022 19:44
gcf-merge-on-green bot pushed a commit that referenced this pull request Apr 14, 2022
🤖 I have created a release *beep* *boop*
---


## [2.16.0](v2.15.0...v2.16.0) (2022-04-14)


### Features

* relocate ApiClientSubstitutions from java-core to gax ([#1651](#1651)) ([321103f](321103f))
* relocate GoogleJsonClientFeature from java-core to gax ([#1655](#1655)) ([6e75ec7](6e75ec7))
* relocate netty and gax substitutions from java-core ([#1650](#1650)) ([afd1917](afd1917))
* relocate Opencensus configurations from java-core to gax ([#1646](#1646)) ([b34ffb1](b34ffb1))
* relocate resource-config from java-core to gax ([#1656](#1656)) ([a9e5483](a9e5483))


### Dependencies

* google-common-protos 2.8.3 ([#1657](#1657)) ([24b9138](24b9138))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suztomo pushed a commit to googleapis/sdk-platform-java that referenced this pull request Dec 16, 2022
🤖 I have created a release *beep* *boop*
---


## [2.16.0](googleapis/gax-java@v2.15.0...v2.16.0) (2022-04-14)


### Features

* relocate ApiClientSubstitutions from java-core to gax ([#1651](googleapis/gax-java#1651)) ([0d28727](googleapis/gax-java@0d28727))
* relocate GoogleJsonClientFeature from java-core to gax ([#1655](googleapis/gax-java#1655)) ([6f1ebe8](googleapis/gax-java@6f1ebe8))
* relocate netty and gax substitutions from java-core ([#1650](googleapis/gax-java#1650)) ([07a89cc](googleapis/gax-java@07a89cc))
* relocate Opencensus configurations from java-core to gax ([#1646](googleapis/gax-java#1646)) ([80e8b3f](googleapis/gax-java@80e8b3f))
* relocate resource-config from java-core to gax ([#1656](googleapis/gax-java#1656)) ([ec3f030](googleapis/gax-java@ec3f030))


### Dependencies

* google-common-protos 2.8.3 ([#1657](googleapis/gax-java#1657)) ([f9277bc](googleapis/gax-java@f9277bc))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants