A collection of utilities and experiments for integrating into Google Cloud Platform:
Core
- Core classes common to multiple projects,JDBC Commenter
- SQL Commenter implementation for JDBC,Log
- A slightly more advanced Cloud Logging integration implementation,Microprofile Config
- Integration for Google Secrets Manager within config,Microprofile Metrics
- Extracts and sends Microprofile Metrics to Cloud Monitoring,OpenTelemetry
- OpenTelemetry implementation that sends trace and metrics information to Cloud Tracing.
ℹ️ OpenTracing implementation has been replaced by a combination of the OpenTelemetry tracer exporter and OpenTracing shim.
⚠️ These utilities are not suitable for production environments. They are simply experiments.
Ensure gcloud auth application-default login
is run to set the default credentials.
By default auto-detection will be attempted via uk.dansiviter.gcp.MonitoredResourceProvider#monitoredResource()
. However, if you wish to override this you can use the java.util.ServiceLoader
mechanism via MonitoredResourceProvider
.
gRPC has some issues when it comes to JPMS as both context, api and core share packages. Fortunately, Helidon have helped workaround this with io.helidon.grpc:io.grpc
which means excluding the others:
<dependency>
<groupId>uk.dansiviter.gcp</groupId>
<artifactId>log</artifactId>
<version>x.x.x</version>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-api</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-context</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.helidon.grpc</groupId>
<artifactId>io.grpc</artifactId>
</dependency>
If you see issues such as java.io.IOException: Received fatal alert: handshake_failure
this is due to a lack of elliptical curve functionality which requires the jdk.crypto.ec
module.