Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 28ad26d

Browse files
authored
Regenerate ocagent proto files. (#524)
1 parent 8dc1ac5 commit 28ad26d

File tree

8 files changed

+870
-656
lines changed

8 files changed

+870
-656
lines changed

opencensus/trace/exporters/gen/opencensus/agent/common/v1/common_pb2.py

Lines changed: 275 additions & 278 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

opencensus/trace/exporters/gen/opencensus/agent/trace/v1/trace_service_pb2.py

Lines changed: 185 additions & 168 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

opencensus/trace/exporters/gen/opencensus/agent/trace/v1/trace_service_pb2_grpc.py

Lines changed: 53 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,68 @@
55

66

77
class TraceServiceStub(object):
8-
# missing associated documentation comment in .proto file
9-
pass
8+
"""Service that can be used to push spans and configs between one Application
9+
instrumented with OpenCensus and an agent, or between an agent and a
10+
central collector or config service (in this case spans and configs are
11+
sent/received to/from multiple Applications).
12+
"""
1013

11-
def __init__(self, channel):
12-
"""Constructor.
14+
def __init__(self, channel):
15+
"""Constructor.
1316
14-
Args:
15-
channel: A grpc.Channel.
16-
"""
17-
self.Config = channel.stream_stream(
18-
'/opencensus.proto.agent.trace.v1.TraceService/Config',
19-
request_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.CurrentLibraryConfig.SerializeToString,
20-
response_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.UpdatedLibraryConfig.FromString,
17+
Args:
18+
channel: A grpc.Channel.
19+
"""
20+
self.Config = channel.stream_stream(
21+
'/opencensus.proto.agent.trace.v1.TraceService/Config',
22+
request_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.CurrentLibraryConfig.SerializeToString,
23+
response_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.UpdatedLibraryConfig.FromString,
2124
)
22-
self.Export = channel.stream_stream(
23-
'/opencensus.proto.agent.trace.v1.TraceService/Export',
24-
request_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceRequest.SerializeToString,
25-
response_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceResponse.FromString,
25+
self.Export = channel.stream_stream(
26+
'/opencensus.proto.agent.trace.v1.TraceService/Export',
27+
request_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceRequest.SerializeToString,
28+
response_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceResponse.FromString,
2629
)
2730

2831

2932
class TraceServiceServicer(object):
30-
# missing associated documentation comment in .proto file
31-
pass
33+
"""Service that can be used to push spans and configs between one Application
34+
instrumented with OpenCensus and an agent, or between an agent and a
35+
central collector or config service (in this case spans and configs are
36+
sent/received to/from multiple Applications).
37+
"""
3238

33-
def Config(self, request_iterator, context):
34-
"""After initialization, this RPC must be kept alive for the
35-
entire life of the application. The agent pushes configs
36-
down to applications via a stream.
37-
"""
38-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
39-
context.set_details('Method not implemented!')
40-
raise NotImplementedError('Method not implemented!')
39+
def Config(self, request_iterator, context):
40+
"""After initialization, this RPC must be kept alive for the entire life of
41+
the application. The agent pushes configs down to applications via a
42+
stream.
43+
"""
44+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
45+
context.set_details('Method not implemented!')
46+
raise NotImplementedError('Method not implemented!')
4147

42-
def Export(self, request_iterator, context):
43-
"""Allows applications to send spans to the agent.
44-
For performance reasons, it is recommended to keep this RPC
45-
alive for the entire life of the application.
46-
"""
47-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
48-
context.set_details('Method not implemented!')
49-
raise NotImplementedError('Method not implemented!')
48+
def Export(self, request_iterator, context):
49+
"""For performance reasons, it is recommended to keep this RPC
50+
alive for the entire life of the application.
51+
"""
52+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
53+
context.set_details('Method not implemented!')
54+
raise NotImplementedError('Method not implemented!')
5055

5156

5257
def add_TraceServiceServicer_to_server(servicer, server):
53-
rpc_method_handlers = {
54-
'Config': grpc.stream_stream_rpc_method_handler(
55-
servicer.Config,
56-
request_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.CurrentLibraryConfig.FromString,
57-
response_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.UpdatedLibraryConfig.SerializeToString,
58-
),
59-
'Export': grpc.stream_stream_rpc_method_handler(
60-
servicer.Export,
61-
request_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceRequest.FromString,
62-
response_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceResponse.SerializeToString,
63-
),
64-
}
65-
generic_handler = grpc.method_handlers_generic_handler(
66-
'opencensus.proto.agent.trace.v1.TraceService', rpc_method_handlers)
67-
server.add_generic_rpc_handlers((generic_handler,))
58+
rpc_method_handlers = {
59+
'Config': grpc.stream_stream_rpc_method_handler(
60+
servicer.Config,
61+
request_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.CurrentLibraryConfig.FromString,
62+
response_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.UpdatedLibraryConfig.SerializeToString,
63+
),
64+
'Export': grpc.stream_stream_rpc_method_handler(
65+
servicer.Export,
66+
request_deserializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceRequest.FromString,
67+
response_serializer=opencensus_dot_proto_dot_agent_dot_trace_dot_v1_dot_trace__service__pb2.ExportTraceServiceResponse.SerializeToString,
68+
),
69+
}
70+
generic_handler = grpc.method_handlers_generic_handler(
71+
'opencensus.proto.agent.trace.v1.TraceService', rpc_method_handlers)
72+
server.add_generic_rpc_handlers((generic_handler,))
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2019, OpenCensus Authors
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.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2019, OpenCensus Authors
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.

opencensus/trace/exporters/gen/opencensus/resource/v1/resource_pb2.py

Lines changed: 125 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)