Skip to content

Commit 89a20da

Browse files
committed
build(jdbc): configure protobuf plugin and add clientanalytics.proto wrapper
1 parent 40cd0a7 commit 89a20da

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

java-bigquery-jdbc/pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
</properties>
3535

3636
<build>
37+
<extensions>
38+
<extension>
39+
<groupId>kr.motd.maven</groupId>
40+
<artifactId>os-maven-plugin</artifactId>
41+
<version>1.7.1</version>
42+
</extension>
43+
</extensions>
3744
<resources>
3845
<resource>
3946
<directory>src/main/resources</directory>
@@ -196,6 +203,23 @@
196203
</execution>
197204
</executions>
198205
</plugin>
206+
<plugin>
207+
<groupId>org.xolstice.maven.plugins</groupId>
208+
<artifactId>protobuf-maven-plugin</artifactId>
209+
<version>0.6.1</version>
210+
<configuration>
211+
<protocArtifact>com.google.protobuf:protoc:3.25.5:exe:${os.detected.classifier}</protocArtifact>
212+
<checkStaleness>true</checkStaleness>
213+
</configuration>
214+
<executions>
215+
<execution>
216+
<goals>
217+
<goal>compile</goal>
218+
<goal>test-compile</goal>
219+
</goals>
220+
</execution>
221+
</executions>
222+
</plugin>
199223
</plugins>
200224
</build>
201225

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.bigquery.jdbc.telemetry.v1;
18+
19+
option java_multiple_files = true;
20+
option java_package = "com.google.cloud.bigquery.jdbc.telemetry.v1";
21+
option java_outer_classname = "ClientAnalyticsProto";
22+
23+
message LogRequest {
24+
ClientInfo client_info = 1;
25+
int32 log_source = 2;
26+
repeated LogEvent log_events = 3;
27+
int64 request_time_ms = 4;
28+
}
29+
30+
message ClientInfo {
31+
int32 client_type = 1;
32+
}
33+
34+
message LogResponse {
35+
int64 next_request_wait_millis = 1;
36+
}
37+
38+
message LogEvent {
39+
int64 event_time_ms = 1;
40+
bytes source_extension = 6;
41+
}

0 commit comments

Comments
 (0)