From 89a20daa22fd12216c6fbf70a334376bc249a36a Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Thu, 18 Jun 2026 16:23:27 -0400 Subject: [PATCH] build(jdbc): configure protobuf plugin and add clientanalytics.proto wrapper --- java-bigquery-jdbc/pom.xml | 24 +++++++++++ .../jdbc/telemetry/v1/clientanalytics.proto | 41 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 java-bigquery-jdbc/src/main/proto/google/cloud/bigquery/jdbc/telemetry/v1/clientanalytics.proto diff --git a/java-bigquery-jdbc/pom.xml b/java-bigquery-jdbc/pom.xml index ed141e41ef35..eefc52bdd0ed 100644 --- a/java-bigquery-jdbc/pom.xml +++ b/java-bigquery-jdbc/pom.xml @@ -34,6 +34,13 @@ + + + kr.motd.maven + os-maven-plugin + 1.7.1 + + src/main/resources @@ -196,6 +203,23 @@ + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 + + com.google.protobuf:protoc:3.25.5:exe:${os.detected.classifier} + true + + + + + compile + test-compile + + + + diff --git a/java-bigquery-jdbc/src/main/proto/google/cloud/bigquery/jdbc/telemetry/v1/clientanalytics.proto b/java-bigquery-jdbc/src/main/proto/google/cloud/bigquery/jdbc/telemetry/v1/clientanalytics.proto new file mode 100644 index 000000000000..9db601f014b7 --- /dev/null +++ b/java-bigquery-jdbc/src/main/proto/google/cloud/bigquery/jdbc/telemetry/v1/clientanalytics.proto @@ -0,0 +1,41 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.jdbc.telemetry.v1; + +option java_multiple_files = true; +option java_package = "com.google.cloud.bigquery.jdbc.telemetry.v1"; +option java_outer_classname = "ClientAnalyticsProto"; + +message LogRequest { + ClientInfo client_info = 1; + int32 log_source = 2; + repeated LogEvent log_events = 3; + int64 request_time_ms = 4; +} + +message ClientInfo { + int32 client_type = 1; +} + +message LogResponse { + int64 next_request_wait_millis = 1; +} + +message LogEvent { + int64 event_time_ms = 1; + bytes source_extension = 6; +}