Skip to content

Commit beea48a

Browse files
Google APIscopybara-github
authored andcommitted
feat:Publish Eventarc logging proto for documentation
PiperOrigin-RevId: 688300267
1 parent 09f411d commit beea48a

File tree

6 files changed

+578
-0
lines changed

6 files changed

+578
-0
lines changed
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
# This file was automatically generated by BuildFileGenerator
2+
3+
# buildifier: disable=load-on-top
4+
5+
# This is an API workspace, having public visibility by default makes perfect sense.
6+
package(default_visibility = ["//visibility:public"])
7+
8+
##############################################################################
9+
# Common
10+
##############################################################################
11+
load("@rules_proto//proto:defs.bzl", "proto_library")
12+
13+
proto_library(
14+
name = "logging_proto",
15+
srcs = [
16+
"enrollment_activity.proto",
17+
"google_api_source_activity.proto",
18+
"message_bus_activity.proto",
19+
"pipeline_activity.proto",
20+
],
21+
deps = [
22+
"//google/api:field_info_proto",
23+
"//google/rpc:status_proto",
24+
"@com_google_protobuf//:timestamp_proto",
25+
],
26+
)
27+
28+
##############################################################################
29+
# Java
30+
##############################################################################
31+
# buildifier: disable=same-origin-load
32+
load(
33+
"@com_google_googleapis_imports//:imports.bzl",
34+
"java_proto_library",
35+
"java_gapic_assembly_gradle_pkg",
36+
)
37+
38+
java_proto_library(
39+
name = "logging_java_proto",
40+
deps = [":logging_proto"],
41+
)
42+
43+
# Open Source Packages
44+
java_gapic_assembly_gradle_pkg(
45+
name = "google-cloud-eventarc-logging-v1-java",
46+
deps = [
47+
":logging_proto",
48+
":logging_java_proto",
49+
],
50+
)
51+
52+
##############################################################################
53+
# Go
54+
##############################################################################
55+
# buildifier: disable=same-origin-load
56+
load(
57+
"@com_google_googleapis_imports//:imports.bzl",
58+
"go_proto_library",
59+
"go_gapic_assembly_pkg",
60+
)
61+
62+
go_proto_library(
63+
name = "logging_go_proto",
64+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
65+
importpath = "cloud.google.com/go/eventarc/logging/apiv1/loggingpb",
66+
protos = [":logging_proto"],
67+
deps = [
68+
"//google/api:annotations_go_proto",
69+
"//google/rpc:status_go_proto",
70+
],
71+
)
72+
73+
go_gapic_assembly_pkg(
74+
name = "google-cloud-eventarc-logging-v1-go",
75+
deps = [
76+
":logging_go_proto",
77+
],
78+
)
79+
80+
##############################################################################
81+
# Python
82+
##############################################################################
83+
# buildifier: disable=same-origin-load
84+
load(
85+
"@com_google_googleapis_imports//:imports.bzl",
86+
"moved_proto_library",
87+
"py_grpc_library",
88+
"py_proto_library",
89+
"py_gapic_library",
90+
"py_gapic_assembly_pkg",
91+
)
92+
93+
moved_proto_library(
94+
name = "logging_moved_proto",
95+
srcs = [":logging_proto"],
96+
deps = [
97+
"//google/api:field_info_proto",
98+
"//google/rpc:status_proto",
99+
"@com_google_protobuf//:timestamp_proto",
100+
],
101+
)
102+
103+
py_proto_library(
104+
name = "logging_py_proto",
105+
deps = [":logging_moved_proto"],
106+
)
107+
108+
py_grpc_library(
109+
name = "logging_py_grpc",
110+
srcs = [":logging_moved_proto"],
111+
deps = [":logging_py_proto"],
112+
)
113+
114+
py_gapic_library(
115+
name = "logging_py_gapic",
116+
srcs = [":logging_proto"],
117+
rest_numeric_enums = False,
118+
transport = "grpc+rest",
119+
)
120+
121+
# Open Source Packages
122+
py_gapic_assembly_pkg(
123+
name = "google-cloud-eventarc-logging-v1-py",
124+
deps = [
125+
":logging_py_gapic",
126+
],
127+
)
128+
129+
##############################################################################
130+
# PHP
131+
##############################################################################
132+
# buildifier: disable=same-origin-load
133+
load(
134+
"@com_google_googleapis_imports//:imports.bzl",
135+
"php_gapic_assembly_pkg",
136+
"php_proto_library",
137+
)
138+
139+
php_proto_library(
140+
name = "logging_php_proto",
141+
deps = [":logging_proto"],
142+
)
143+
144+
php_gapic_assembly_pkg(
145+
name = "google-cloud-eventarc-logging-v1-php",
146+
deps = [
147+
":logging_php_proto",
148+
],
149+
)
150+
151+
##############################################################################
152+
# Ruby
153+
##############################################################################
154+
# buildifier: disable=same-origin-load
155+
load(
156+
"@com_google_googleapis_imports//:imports.bzl",
157+
"ruby_grpc_library",
158+
"ruby_proto_library",
159+
)
160+
161+
ruby_proto_library(
162+
name = "logging_ruby_proto",
163+
deps = [":logging_proto"],
164+
)
165+
166+
ruby_grpc_library(
167+
name = "logging_ruby_grpc",
168+
srcs = [":logging_proto"],
169+
deps = [":logging_ruby_proto"],
170+
)
171+
172+
##############################################################################
173+
# C#
174+
##############################################################################
175+
# buildifier: disable=same-origin-load
176+
load(
177+
"@com_google_googleapis_imports//:imports.bzl",
178+
"csharp_proto_library",
179+
"csharp_gapic_assembly_pkg",
180+
)
181+
182+
csharp_proto_library(
183+
name = "logging_csharp_proto",
184+
deps = [":logging_proto"],
185+
)
186+
187+
# Open Source Packages
188+
csharp_gapic_assembly_pkg(
189+
name = "google-cloud-eventarc-logging-v1-csharp",
190+
package_name = "Google.Cloud.Eventarc.Logging.V1",
191+
generate_nongapic_package = True,
192+
deps = [
193+
":logging_csharp_proto",
194+
],
195+
)
196+
197+
##############################################################################
198+
# C++
199+
##############################################################################
200+
# buildifier: disable=same-origin-load
201+
load(
202+
"@com_google_googleapis_imports//:imports.bzl",
203+
"cc_grpc_library",
204+
"cc_proto_library",
205+
)
206+
207+
cc_proto_library(
208+
name = "logging_cc_proto",
209+
deps = [":logging_proto"],
210+
)
211+
212+
cc_grpc_library(
213+
name = "logging_cc_grpc",
214+
srcs = [":logging_proto"],
215+
grpc_only = True,
216+
deps = [":logging_cc_proto"],
217+
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Eventarc API Logging Integration
2+
3+
The proto files in this directory serve as documentation for the format of the logs for the [Eventarc API](https://cloud.google.com/eventarc/docs).
4+
These are not currently published as libraries. (Libraries may be available in some languages where appropriate, but not to the same degree of coverage as the Google Cloud Client Libraries used to make API calls.)
5+
Language-specific options may be added later, in order to facilitate library publication.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright 2024 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.eventarc.logging.v1;
18+
19+
import "google/api/field_info.proto";
20+
import "google/protobuf/timestamp.proto";
21+
import "google/rpc/status.proto";
22+
23+
option csharp_namespace = "Google.Cloud.Eventarc.Logging.V1";
24+
option go_package = "cloud.google.com/go/eventarc/logging/apiv1/loggingpb;loggingpb";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "EnrollmentActivityProto";
27+
option java_package = "com.google.cloud.eventarc.logging.v1";
28+
option php_namespace = "Google\\Cloud\\Eventarc\\Logging\\V1";
29+
option ruby_package = "Google::Cloud::Eventarc::Logging::V1";
30+
31+
// Logged during the processing of an enrollment on an event in a message bus.
32+
message EnrollmentActivity {
33+
// Structured log message that is emitted when an event matches an enrollment.
34+
message Matched {
35+
// Informational details about the matched event.
36+
string details = 1;
37+
38+
// The destination this enrollment is matched to, such as the name of the
39+
// pipeline.
40+
string event_destination = 2;
41+
42+
// Logged when the enrollment encounters an error.
43+
google.rpc.Status error = 3;
44+
}
45+
46+
// The unique system generated ID associated with the event passed from the
47+
// message bus.
48+
string message_uid = 1 [(google.api.field_info).format = UUID4];
49+
50+
// The CloudEvent ID and source from the attributes of the event.
51+
map<string, string> attributes = 2;
52+
53+
// The point in time when the activity occurred.
54+
google.protobuf.Timestamp activity_time = 3;
55+
56+
// One of the activities that can be logged during the processing of an
57+
// enrollment.
58+
oneof activity {
59+
// Logged when an event matches an enrollment.
60+
Matched matched = 4;
61+
}
62+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright 2024 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.eventarc.logging.v1;
18+
19+
import "google/api/field_info.proto";
20+
import "google/protobuf/timestamp.proto";
21+
import "google/rpc/status.proto";
22+
23+
option csharp_namespace = "Google.Cloud.Eventarc.Logging.V1";
24+
option go_package = "cloud.google.com/go/eventarc/logging/apiv1/loggingpb;loggingpb";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "GoogleApiEventPublishedActivityProto";
27+
option java_package = "com.google.cloud.eventarc.logging.v1";
28+
option php_namespace = "Google\\Cloud\\Eventarc\\Logging\\V1";
29+
option ruby_package = "Google::Cloud::Eventarc::Logging::V1";
30+
31+
// Logged during the processing of a Google API event being sent to a
32+
// message bus.
33+
message GoogleApiSourceActivity {
34+
// Structured log message that is emitted when an event is published to a
35+
// message bus.
36+
message Published {
37+
// The message bus associated with this GoogleApiEvent configuration.
38+
string message_bus = 1;
39+
40+
// The event provider that produced the event.
41+
string event_provider = 2;
42+
43+
// Any additional information about the event sent.
44+
string details = 3;
45+
46+
// Logged if the event encounters an error.
47+
google.rpc.Status error = 4;
48+
}
49+
50+
// The unique system generated ID when a message bus receives an event. This
51+
// ID is propagated throughout the request.
52+
string message_uid = 1 [(google.api.field_info).format = UUID4];
53+
54+
// The CloudEvent ID and source from the attributes of the event.
55+
map<string, string> attributes = 2;
56+
57+
// The point in time when the activity occurred.
58+
google.protobuf.Timestamp activity_time = 3;
59+
60+
// One of the activities that can be logged during the processing of a Google
61+
// API event.
62+
oneof activity {
63+
// Logged when an event is published to a message bus.
64+
Published published = 4;
65+
}
66+
}

0 commit comments

Comments
 (0)