![]() ### Dependency updates #### Update successfully to the latest - [x] `androidx.core:core 1.10.0 -> 1.10.1` - [x] `com.google.api.grpc:proto-google-common-protos 2.17.0 -> 2.22.0` - [x] `com.google.cloud:google-cloud-logging 3.14.5 -> 3.15.5` - [x] `com.google.truth:truth 1.0.1 -> 1.1.5` - [x] `com.puppycrawl.tools:checkstyle 8.28 -> 10.12.1` - [x] `org.robolectric:robolectric 4.9.2 -> 4.10.3` - [x] Auto-value - [x] `com.google.auto.value:auto-value 1.10.1 -> 1.10.2` - [x] `com.google.auto.value:auto-value-annotations 1.10.1 -> 1.10.2` - [x] Protobuf - [x] `com.google.protobuf:protobuf-java 3.22.3 -> 3.23.4` - [x] `com.google.protobuf:protobuf-java-util 3.22.3 -> 3.23.4` - [x] `com.google.protobuf:protobuf-javalite 3.22.3 -> 3.23.4` - [x] `com.google.protobuf:protoc 3.22.3 -> 3.23.4` - [x] Errorprone - [x] `com.google.errorprone:error_prone_annotations 2.18.0 -> 2.20.0` - [x] `com.google.errorprone:error_prone_core 2.18.0 -> 2.20.0` - ~`libs.checkstylejava8 = com.puppycrawl.tools:checkstyle 9.3 -> 10.12.1`~ -- pinned to last version supporting java8, update not needed #### Updated to non-latest - [x] `com.squareup.okio:okio 1.17.5 ->` ~`3.4.0`~ `2.10.0` -- updating to 3.x failed due to them [introducing gradle multiplatform artifacts](https://github.com/square/okio/blob/master/CHANGELOG.md#version-320). Error in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632853307.). - [x] `org.checkerframework:checker-qual 3.33.0 ->` ~`3.36.0`~ -- removed, no longer needed - [x] Mockito - updated to `4.11.0`. Versions 5.x break some tests. Errors in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632834435). - `org.mockito:mockito-android 3.12.4 ->` ~`5.4.0`~ `4.11.0` - `org.mockito:mockito-core 3.12.4 ->` ~`5.4.0`~ `4.11.0` #### Not updated - Cronet -- upgrade failed, created a blocker ticket https://github.com/grpc/grpc-java/issues/10396 - ~`org.chromium.net:cronet-api 108.5359.79 -> 113.5672.61`~ - ~`org.chromium.net:cronet-embedded 108.5359.79 -> 113.5672.61`~ - Google auth -- upgrade blocked by https://github.com/grpc/grpc-java/pull/9118 - ~`com.google.auth:google-auth-library-credentials 1.4.0 -> 1.19.0`~ - ~`com.google.auth:google-auth-library-oauth2-http 1.4.0 -> 1.19.0`~ - Guava -- not upgraded: 32.1.0 [broke gradle modules](https://github.com/google/guava/releases/tag/v32.1.0) - ~`libs.guava = com.google.guava:guava 32.0.1-android -> 32.1.1-jre`~ - ~`libs.guava.jre = com.google.guava:guava 32.0.1-jre -> 32.1.1-jre`~ - ~`libs.guava.testlib = com.google.guava:guava-testlib 32.0.1-android -> 32.1.1-jre`~ ### checkForUpdates results ``` > Task :checkForUpdates androidx.core:core 1.10.0 -> 1.10.1 com.google.auto.value:auto-value 1.10.1 -> 1.10.2 com.google.auto.value:auto-value-annotations 1.10.1 -> 1.10.2 org.checkerframework:checker-qual 3.33.0 -> 3.36.0 com.puppycrawl.tools:checkstyle 8.28 -> 10.12.1 org.chromium.net:cronet-api 108.5359.79 -> 113.5672.61 org.chromium.net:cronet-embedded 108.5359.79 -> 113.5672.61 com.google.errorprone:error_prone_annotations 2.18.0 -> 2.20.0 com.google.errorprone:error_prone_core 2.18.0 -> 2.20.0 com.google.errorprone:error_prone_core 2.10.0 -> 2.20.0 com.google.api.grpc:proto-google-common-protos 2.17.0 -> 2.22.0 com.google.auth:google-auth-library-credentials 1.4.0 -> 1.19.0 com.google.auth:google-auth-library-oauth2-http 1.4.0 -> 1.19.0 com.google.cloud:google-cloud-logging 3.14.5 -> 3.15.5 com.google.guava:guava 32.0.1-android -> 32.1.1-jre com.google.guava:guava 32.0.1-jre -> 32.1.1-jre com.google.guava:guava-testlib 32.0.1-android -> 32.1.1-jre org.mockito:mockito-android 3.12.4 -> 5.4.0 org.mockito:mockito-core 3.12.4 -> 5.4.0 com.squareup.okio:okio 1.17.5 -> 3.4.0 com.google.protobuf:protobuf-java 3.22.3 -> 3.23.4 com.google.protobuf:protobuf-java-util 3.22.3 -> 3.23.4 com.google.protobuf:protobuf-javalite 3.22.3 -> 3.23.4 com.google.protobuf:protoc 3.22.3 -> 3.23.4 org.robolectric:robolectric 4.9.2 -> 4.10.3 com.google.truth:truth 1.0.1 -> 1.1.5 ``` |
||
---|---|---|
.. | ||
src/main | ||
README.md | ||
build.gradle | ||
settings.gradle |
README.md
gRPC GCP Observability Example
The GCP Observability example consists of a Hello World client and a Hello World server instrumented for logs, metrics and tracing.
Please refer to Microservices Observability user guide for setup.
Build the example
Build the Observability client & server. From the grpc-java/examples/example-gcp-observability
directory:
$ ../gradlew installDist
This creates the scripts build/install/example-gcp-observability/bin/gcp-observability-client
and
build/install/example-gcp-observability/bin/gcp-observability-server
.
Run the example with configuration
To use Observability, you should first setup and configure authorization as mentioned in the user guide.
You need to set the GRPC_GCP_OBSERVABILITY_CONFIG_FILE
environment variable to point to the gRPC GCP Observability configuration file (preferred) or if that
is not set then GRPC_GCP_OBSERVABILITY_CONFIG
environment variable to gRPC GCP Observability configuration value. This is needed by both
build/install/example-gcp-observability/bin/gcp-observability-client
and
build/install/example-gcp-observability/bin/gcp-observability-server
.
- To start the observability-enabled example server on its default port of 50051, run:
$ export GRPC_GCP_OBSERVABILITY_CONFIG_FILE=src/main/resources/io/grpc/examples/gcpobservability/gcp_observability_server_config.json
$ ./build/install/example-gcp-observability/bin/gcp-observability-server
- In a different terminal window, run the observability-enabled example client:
$ export GRPC_GCP_OBSERVABILITY_CONFIG_FILE=src/main/resources/io/grpc/examples/gcpobservability/gcp_observability_client_config.json
$ ./build/install/example-gcp-observability/bin/gcp-observability-client