diff --git a/CHANGELOG.md b/CHANGELOG.md index ccf9f81c10c..1b1b8fc6203 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v0.16b1...HEAD) +- Add protobuf via gRPC exporting support for Jaeger + ([#1471](https://github.com/open-telemetry/opentelemetry-python/pull/1471)) + - Add support for Python 3.9 ([#1441](https://github.com/open-telemetry/opentelemetry-python/pull/1441)) diff --git a/docs/conf.py b/docs/conf.py index b227cb51818..0d06bffec18 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -86,6 +86,7 @@ "aiohttp": ("https://aiohttp.readthedocs.io/en/stable/", None), "wrapt": ("https://wrapt.readthedocs.io/en/latest/", None), "pymongo": ("https://pymongo.readthedocs.io/en/stable/", None), + "grpc": ("https://grpc.github.io/grpc/python/", None), } # http://www.sphinx-doc.org/en/master/config.html#confval-nitpicky diff --git a/docs/exporter/jaeger/jaeger.rst b/docs/exporter/jaeger/jaeger.rst index 6988d8cea9c..efbcfbd7d72 100644 --- a/docs/exporter/jaeger/jaeger.rst +++ b/docs/exporter/jaeger/jaeger.rst @@ -14,3 +14,13 @@ Submodules :members: :undoc-members: :show-inheritance: + +.. automodule:: opentelemetry.exporter.jaeger.send.thrift + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: opentelemetry.exporter.jaeger.gen.collector_pb2_grpc + :members: + :undoc-members: + :show-inheritance: diff --git a/exporter/opentelemetry-exporter-jaeger/examples/jaeger_exporter_example.py b/exporter/opentelemetry-exporter-jaeger/examples/jaeger_exporter_example.py index 0552f75183b..0d312676b90 100644 --- a/exporter/opentelemetry-exporter-jaeger/examples/jaeger_exporter_example.py +++ b/exporter/opentelemetry-exporter-jaeger/examples/jaeger_exporter_example.py @@ -22,6 +22,19 @@ # password=xxxx, # optional ) +# Create a JaegerSpanExporter to send spans with gRPC +# If there is no encryption or authentication set `insecure` to True +# If server has authentication with SSL/TLS you can set the +# parameter credentials=ChannelCredentials(...) or the environment variable +# `EXPORTER_JAEGER_CERTIFICATE` with file containing creds. + +# jaeger_exporter = jaeger.JaegerSpanExporter( +# service_name="my-helloworld-service", +# collector_endpoint="localhost:14250", +# insecure=True, +# transport_format="protobuf", +# ) + # create a BatchExportSpanProcessor and add the exporter to it span_processor = BatchExportSpanProcessor(jaeger_exporter) diff --git a/exporter/opentelemetry-exporter-jaeger/proto/api_v2/collector.proto b/exporter/opentelemetry-exporter-jaeger/proto/api_v2/collector.proto new file mode 100644 index 00000000000..e897a043cd6 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/proto/api_v2/collector.proto @@ -0,0 +1,66 @@ +// Copyright (c) 2019 The Jaeger Authors. +// Copyright (c) 2018 Uber Technologies, Inc. +// +// 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 jaeger.api_v2; + +import "model.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "protoc-gen-swagger/options/annotations.proto"; + +option go_package = "api_v2"; +option java_package = "io.jaegertracing.api_v2"; + +// Enable gogoprotobuf extensions (https://github.com/gogo/protobuf/blob/master/extensions.md). +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; + +option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { + info: { + version: "1.0"; + }; + external_docs: { + url: "https://github.com/jaegertracing/jaeger"; + description: "Jaeger API"; + } + schemes: HTTP; + schemes: HTTPS; +}; + +message PostSpansRequest { + Batch batch = 1 [ + (gogoproto.nullable) = false + ]; +} + +message PostSpansResponse { +} + +service CollectorService { + rpc PostSpans(PostSpansRequest) returns (PostSpansResponse) { + option (google.api.http) = { + post: "/api/v2/spans" + body: "*" + }; + } +} diff --git a/exporter/opentelemetry-exporter-jaeger/proto/api_v2/model.proto b/exporter/opentelemetry-exporter-jaeger/proto/api_v2/model.proto new file mode 100644 index 00000000000..3cc15df3b88 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/proto/api_v2/model.proto @@ -0,0 +1,166 @@ +// Copyright (c) 2018 Uber Technologies, Inc. +// +// 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 jaeger.api_v2; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +// TODO: document all types and fields + +// TODO: once this moves to jaeger-idl repo, we may want to change Go pkg to api_v2 +// and rewrite it to model only in this repo. That should make it easier to generate +// classes in other languages. +option go_package = "model"; +option java_package = "io.jaegertracing.api_v2"; + +// Enable gogoprotobuf extensions (https://github.com/gogo/protobuf/blob/master/extensions.md). +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; + +enum ValueType { + STRING = 0; + BOOL = 1; + INT64 = 2; + FLOAT64 = 3; + BINARY = 4; +}; + +message KeyValue { + option (gogoproto.equal) = true; + option (gogoproto.compare) = true; + + string key = 1; + ValueType v_type = 2; + string v_str = 3; + bool v_bool = 4; + int64 v_int64 = 5; + double v_float64 = 6; + bytes v_binary = 7; +} + +message Log { + google.protobuf.Timestamp timestamp = 1 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + repeated KeyValue fields = 2 [ + (gogoproto.nullable) = false + ]; +} + +enum SpanRefType { + CHILD_OF = 0; + FOLLOWS_FROM = 1; +}; + +message SpanRef { + bytes trace_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "TraceID", + (gogoproto.customname) = "TraceID" + ]; + bytes span_id = 2 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "SpanID", + (gogoproto.customname) = "SpanID" + ]; + SpanRefType ref_type = 3; +} + +message Process { + string service_name = 1; + repeated KeyValue tags = 2 [ + (gogoproto.nullable) = false + ]; +} + +message Span { + bytes trace_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "TraceID", + (gogoproto.customname) = "TraceID" + ]; + bytes span_id = 2 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "SpanID", + (gogoproto.customname) = "SpanID" + ]; + string operation_name = 3; + repeated SpanRef references = 4 [ + (gogoproto.nullable) = false + ]; + uint32 flags = 5 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "Flags" + ]; + google.protobuf.Timestamp start_time = 6 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + google.protobuf.Duration duration = 7 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; + repeated KeyValue tags = 8 [ + (gogoproto.nullable) = false + ]; + repeated Log logs = 9 [ + (gogoproto.nullable) = false + ]; + Process process = 10; + string process_id = 11 [ + (gogoproto.customname) = "ProcessID" + ]; + repeated string warnings = 12; +} + +message Trace { + message ProcessMapping { + string process_id = 1 [ + (gogoproto.customname) = "ProcessID" + ]; + Process process = 2 [ + (gogoproto.nullable) = false + ]; + } + repeated Span spans = 1; + repeated ProcessMapping process_map = 2 [ + (gogoproto.nullable) = false + ]; + repeated string warnings = 3; +} + +message Batch { + repeated Span spans = 1; + Process process = 2 [ + (gogoproto.nullable) = true + ]; +} + +message DependencyLink { + string parent = 1; + string child = 2; + uint64 call_count = 3; + string source = 4; +} diff --git a/exporter/opentelemetry-exporter-jaeger/setup.cfg b/exporter/opentelemetry-exporter-jaeger/setup.cfg index 37d2402d5f7..7e3d6f50a51 100644 --- a/exporter/opentelemetry-exporter-jaeger/setup.cfg +++ b/exporter/opentelemetry-exporter-jaeger/setup.cfg @@ -39,6 +39,8 @@ package_dir= =src packages=find_namespace: install_requires = + grpcio >= 1.0.0, < 2.0.0 + googleapis-common-protos ~= 1.52.0 thrift >= 0.10.0 opentelemetry-api == 0.17.dev0 opentelemetry-sdk == 0.17.dev0 diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/__init__.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/__init__.py index d95095bd9cc..297c1e2b264 100644 --- a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/__init__.py +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/__init__.py @@ -15,9 +15,11 @@ """ The **OpenTelemetry Jaeger Exporter** allows to export `OpenTelemetry`_ traces to `Jaeger`_. -This exporter always send traces to the configured agent using Thrift compact protocol over UDP. -An optional collector can be configured, in this case Thrift binary protocol over HTTP is used. -gRPC is still not supported by this implementation. +This exporter always sends traces to the configured agent using the Thrift compact protocol over UDP. +When it is not feasible to deploy Jaeger Agent next to the application, for example, when the +application code is running as Lambda function, a collector can be configured to send spans +using either Thrift over HTTP or Protobuf via gRPC. If both agent and collector are configured, +the exporter sends traces only to the collector to eliminate the duplicate entries. Usage ----- @@ -42,6 +44,9 @@ # collector_endpoint='http://localhost:14268/api/traces?format=jaeger.thrift', # username=xxxx, # optional # password=xxxx, # optional + # insecure=True, # optional + # credentials=xxx # optional channel creds + # transport_format='protobuf' # optional ) # Create a BatchExportSpanProcessor and add the exporter to it @@ -58,33 +63,47 @@ .. _Jaeger: https://www.jaegertracing.io/ .. _OpenTelemetry: https://github.com/open-telemetry/opentelemetry-python/ """ +# pylint: disable=protected-access import base64 import logging import socket - +from typing import Optional, Union + +from grpc import ( + ChannelCredentials, + insecure_channel, + secure_channel, + ssl_channel_credentials, +) from thrift.protocol import TBinaryProtocol, TCompactProtocol from thrift.transport import THttpClient, TTransport from opentelemetry.configuration import Configuration +from opentelemetry.exporter.jaeger import util +from opentelemetry.exporter.jaeger.gen import model_pb2 from opentelemetry.exporter.jaeger.gen.agent import Agent as agent -from opentelemetry.exporter.jaeger.gen.jaeger import Collector as jaeger +from opentelemetry.exporter.jaeger.gen.collector_pb2 import PostSpansRequest +from opentelemetry.exporter.jaeger.gen.collector_pb2_grpc import ( + CollectorServiceStub, +) +from opentelemetry.exporter.jaeger.gen.jaeger import Collector as jaeger_thrift +from opentelemetry.exporter.jaeger.send.thrift import AgentClientUDP, Collector +from opentelemetry.exporter.jaeger.translate import Translate +from opentelemetry.exporter.jaeger.translate.protobuf import ProtobufTranslator +from opentelemetry.exporter.jaeger.translate.thrift import ThriftTranslator from opentelemetry.sdk.trace.export import Span, SpanExporter, SpanExportResult from opentelemetry.trace import SpanKind from opentelemetry.trace.status import StatusCode DEFAULT_AGENT_HOST_NAME = "localhost" DEFAULT_AGENT_PORT = 6831 +DEFAULT_GRPC_COLLECTOR_ENDPOINT = "localhost:14250" UDP_PACKET_MAX_LENGTH = 65000 -OTLP_JAEGER_SPAN_KIND = { - SpanKind.CLIENT: "client", - SpanKind.SERVER: "server", - SpanKind.CONSUMER: "consumer", - SpanKind.PRODUCER: "producer", - SpanKind.INTERNAL: "internal", -} +TRANSPORT_FORMAT_THRIFT = "thrift" +TRANSPORT_FORMAT_PROTOBUF = "protobuf" logger = logging.getLogger(__name__) @@ -97,21 +116,28 @@ class JaegerSpanExporter(SpanExporter): when query for spans. agent_host_name: The host name of the Jaeger-Agent. agent_port: The port of the Jaeger-Agent. - collector_endpoint: The endpoint of the Jaeger-Collector HTTP/HTTPS Thrift. + collector_endpoint: The endpoint of the Jaeger collector that uses + Thrift over HTTP/HTTPS or Protobuf via gRPC. username: The user name of the Basic Auth if authentication is required. password: The password of the Basic Auth if authentication is required. + insecure: True if collector has no encryption or authentication + credentials: Credentials for server authentication. + transport_format: Transport format for exporting spans to collector. """ def __init__( self, - service_name, - agent_host_name=None, - agent_port=None, - collector_endpoint=None, - username=None, - password=None, + service_name: str, + agent_host_name: Optional[str] = None, + agent_port: Optional[int] = None, + collector_endpoint: Optional[str] = None, + username: Optional[str] = None, + password: Optional[str] = None, + insecure: Optional[bool] = None, + credentials: Optional[ChannelCredentials] = None, + transport_format: Optional[str] = None, ): self.service_name = service_name self.agent_host_name = _parameter_setter( @@ -124,7 +150,9 @@ def __init__( env_variable=Configuration().EXPORTER_JAEGER_AGENT_PORT, default=DEFAULT_AGENT_PORT, ) - self._agent_client = None + self._agent_client = AgentClientUDP( + host_name=self.agent_host_name, port=self.agent_port + ) self.collector_endpoint = _parameter_setter( param=collector_endpoint, env_variable=Configuration().EXPORTER_JAEGER_ENDPOINT, @@ -141,21 +169,42 @@ def __init__( default=None, ) self._collector = None + self._grpc_client = None + self.insecure = util._get_insecure(insecure) + self.credentials = util._get_credentials(credentials) + self.transport_format = ( + transport_format.lower() + if transport_format + else TRANSPORT_FORMAT_THRIFT + ) @property - def agent_client(self): - if self._agent_client is None: - self._agent_client = AgentClientUDP( - host_name=self.agent_host_name, port=self.agent_port - ) - return self._agent_client + def _collector_grpc_client(self) -> Optional[CollectorServiceStub]: + if self.transport_format != TRANSPORT_FORMAT_PROTOBUF: + return None + + endpoint = self.collector_endpoint or DEFAULT_GRPC_COLLECTOR_ENDPOINT + + if self._grpc_client is None: + if self.insecure: + self._grpc_client = CollectorServiceStub( + insecure_channel(endpoint) + ) + else: + self._grpc_client = CollectorServiceStub( + secure_channel(endpoint, self.credentials) + ) + return self._grpc_client @property - def collector(self): + def _collector_http_client(self) -> Optional[Collector]: if self._collector is not None: return self._collector - if self.collector_endpoint is None: + if ( + self.collector_endpoint is None + or self.transport_format != TRANSPORT_FORMAT_THRIFT + ): return None auth = None @@ -167,18 +216,25 @@ def collector(self): ) return self._collector - def export(self, spans): - jaeger_spans = _translate_to_jaeger(spans) - - batch = jaeger.Batch( - spans=jaeger_spans, - process=jaeger.Process(serviceName=self.service_name), - ) - - if self.collector is not None: - self.collector.submit(batch) + def export(self, spans) -> SpanExportResult: + translator = Translate(spans) + if self.transport_format == TRANSPORT_FORMAT_PROTOBUF: + pb_translator = ProtobufTranslator(self.service_name) + jaeger_spans = translator._translate(pb_translator) + batch = model_pb2.Batch(spans=jaeger_spans) + request = PostSpansRequest(batch=batch) + self._collector_grpc_client.PostSpans(request) else: - self.agent_client.emit(batch) + thrift_translator = ThriftTranslator() + jaeger_spans = translator._translate(thrift_translator) + batch = jaeger_thrift.Batch( + spans=jaeger_spans, + process=jaeger_thrift.Process(serviceName=self.service_name), + ) + if self._collector_http_client is not None: + self._collector_http_client.submit(batch) + else: + self._agent_client.emit(batch) return SpanExportResult.SUCCESS @@ -200,269 +256,3 @@ def _parameter_setter(param, env_variable, default): res = param return res - - -def _nsec_to_usec_round(nsec): - """Round nanoseconds to microseconds""" - return (nsec + 500) // 10 ** 3 - - -def _translate_to_jaeger(spans: Span): - """Translate the spans to Jaeger format. - - Args: - spans: Tuple of spans to convert - """ - - jaeger_spans = [] - - for span in spans: - ctx = span.get_span_context() - trace_id = ctx.trace_id - span_id = ctx.span_id - - start_time_us = _nsec_to_usec_round(span.start_time) - duration_us = _nsec_to_usec_round(span.end_time - span.start_time) - - status = span.status - - parent_id = span.parent.span_id if span.parent else 0 - - tags = _extract_tags(span.attributes) - tags.extend(_extract_tags(span.resource.attributes)) - - tags.extend( - [ - _get_long_tag("status.code", status.status_code.value), - _get_string_tag("status.message", status.description), - _get_string_tag("span.kind", OTLP_JAEGER_SPAN_KIND[span.kind]), - ] - ) - - if span.instrumentation_info is not None: - tags.extend( - [ - _get_string_tag( - "otel.instrumentation_library.name", - span.instrumentation_info.name, - ), - _get_string_tag( - "otel.instrumentation_library.version", - span.instrumentation_info.version, - ), - ] - ) - - # Ensure that if Status.Code is not OK, that we set the "error" tag on the Jaeger span. - if not status.is_ok: - tags.append(_get_bool_tag("error", True)) - - refs = _extract_refs_from_span(span) - logs = _extract_logs_from_span(span) - - flags = int(ctx.trace_flags) - - jaeger_span = jaeger.Span( - traceIdHigh=_get_trace_id_high(trace_id), - traceIdLow=_get_trace_id_low(trace_id), - # generated code expects i64 - spanId=_convert_int_to_i64(span_id), - operationName=span.name, - startTime=start_time_us, - duration=duration_us, - tags=tags, - logs=logs, - references=refs, - flags=flags, - parentSpanId=_convert_int_to_i64(parent_id), - ) - - jaeger_spans.append(jaeger_span) - - return jaeger_spans - - -def _extract_refs_from_span(span): - if not span.links: - return None - - refs = [] - for link in span.links: - trace_id = link.context.trace_id - span_id = link.context.span_id - refs.append( - jaeger.SpanRef( - refType=jaeger.SpanRefType.FOLLOWS_FROM, - traceIdHigh=_get_trace_id_high(trace_id), - traceIdLow=_get_trace_id_low(trace_id), - spanId=_convert_int_to_i64(span_id), - ) - ) - return refs - - -def _convert_int_to_i64(val): - """Convert integer to signed int64 (i64)""" - if val > 0x7FFFFFFFFFFFFFFF: - val -= 0x10000000000000000 - return val - - -def _get_trace_id_low(trace_id): - return _convert_int_to_i64(trace_id & 0xFFFFFFFFFFFFFFFF) - - -def _get_trace_id_high(trace_id): - return _convert_int_to_i64((trace_id >> 64) & 0xFFFFFFFFFFFFFFFF) - - -def _extract_logs_from_span(span): - if not span.events: - return None - - logs = [] - - for event in span.events: - fields = _extract_tags(event.attributes) - - fields.append( - jaeger.Tag( - key="message", vType=jaeger.TagType.STRING, vStr=event.name - ) - ) - - event_timestamp_us = _nsec_to_usec_round(event.timestamp) - logs.append( - jaeger.Log(timestamp=int(event_timestamp_us), fields=fields) - ) - return logs - - -def _extract_tags(attr): - if not attr: - return [] - tags = [] - for attribute_key, attribute_value in attr.items(): - tag = _convert_attribute_to_tag(attribute_key, attribute_value) - if tag is None: - continue - tags.append(tag) - return tags - - -def _convert_attribute_to_tag(key, attr): - """Convert the attributes to jaeger tags.""" - if isinstance(attr, bool): - return jaeger.Tag(key=key, vBool=attr, vType=jaeger.TagType.BOOL) - if isinstance(attr, str): - return jaeger.Tag(key=key, vStr=attr, vType=jaeger.TagType.STRING) - if isinstance(attr, int): - return jaeger.Tag(key=key, vLong=attr, vType=jaeger.TagType.LONG) - if isinstance(attr, float): - return jaeger.Tag(key=key, vDouble=attr, vType=jaeger.TagType.DOUBLE) - if isinstance(attr, tuple): - return jaeger.Tag(key=key, vStr=str(attr), vType=jaeger.TagType.STRING) - logger.warning("Could not serialize attribute %s:%r to tag", key, attr) - return None - - -def _get_long_tag(key, val): - return jaeger.Tag(key=key, vLong=val, vType=jaeger.TagType.LONG) - - -def _get_string_tag(key, val): - return jaeger.Tag(key=key, vStr=val, vType=jaeger.TagType.STRING) - - -def _get_bool_tag(key, val): - return jaeger.Tag(key=key, vBool=val, vType=jaeger.TagType.BOOL) - - -class AgentClientUDP: - """Implement a UDP client to agent. - - Args: - host_name: The host name of the Jaeger server. - port: The port of the Jaeger server. - max_packet_size: Maximum size of UDP packet. - client: Class for creating new client objects for agencies. - """ - - def __init__( - self, - host_name, - port, - max_packet_size=UDP_PACKET_MAX_LENGTH, - client=agent.Client, - ): - self.address = (host_name, port) - self.max_packet_size = max_packet_size - self.buffer = TTransport.TMemoryBuffer() - self.client = client( - iprot=TCompactProtocol.TCompactProtocol(trans=self.buffer) - ) - - def emit(self, batch: jaeger.Batch): - """ - Args: - batch: Object to emit Jaeger spans. - """ - - # pylint: disable=protected-access - self.client._seqid = 0 - # truncate and reset the position of BytesIO object - self.buffer._buffer.truncate(0) - self.buffer._buffer.seek(0) - self.client.emitBatch(batch) - buff = self.buffer.getvalue() - if len(buff) > self.max_packet_size: - logger.warning( - "Data exceeds the max UDP packet size; size %r, max %r", - len(buff), - self.max_packet_size, - ) - return - - with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as udp_socket: - udp_socket.sendto(buff, self.address) - - -class Collector: - """Submits collected spans to Thrift HTTP server. - - Args: - thrift_url: URL of the Jaeger HTTP Thrift. - auth: Auth tuple that contains username and password for Basic Auth. - """ - - def __init__(self, thrift_url="", auth=None): - self.thrift_url = thrift_url - self.auth = auth - self.http_transport = THttpClient.THttpClient( - uri_or_host=self.thrift_url - ) - self.protocol = TBinaryProtocol.TBinaryProtocol(self.http_transport) - - # set basic auth header - if auth is not None: - auth_header = "{}:{}".format(*auth) - decoded = base64.b64encode(auth_header.encode()).decode("ascii") - basic_auth = dict(Authorization="Basic {}".format(decoded)) - self.http_transport.setCustomHeaders(basic_auth) - - def submit(self, batch: jaeger.Batch): - """Submits batches to Thrift HTTP Server through Binary Protocol. - - Args: - batch: Object to emit Jaeger spans. - """ - batch.write(self.protocol) - self.http_transport.flush() - code = self.http_transport.code - msg = self.http_transport.message - if code >= 300 or code < 200: - logger.error( - "Traces cannot be uploaded; HTTP status code: %s, message: %s", - code, - msg, - ) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/collector_pb2.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/collector_pb2.py new file mode 100644 index 00000000000..87dffbbc6d8 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/collector_pb2.py @@ -0,0 +1,134 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: collector.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import model_pb2 as model__pb2 +from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='collector.proto', + package='jaeger.api_v2', + syntax='proto3', + serialized_options=_b('\n\027io.jaegertracing.api_v2Z\006api_v2\310\342\036\001\320\342\036\001\340\342\036\001\300\343\036\001\222AB\022\0052\0031.0*\002\001\002r5\n\nJaeger API\022\'https://github.com/jaegertracing/jaeger'), + serialized_pb=_b('\n\x0f\x63ollector.proto\x12\rjaeger.api_v2\x1a\x0bmodel.proto\x1a\x14gogoproto/gogo.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto\"=\n\x10PostSpansRequest\x12)\n\x05\x62\x61tch\x18\x01 \x01(\x0b\x32\x14.jaeger.api_v2.BatchB\x04\xc8\xde\x1f\x00\"\x13\n\x11PostSpansResponse2|\n\x10\x43ollectorService\x12h\n\tPostSpans\x12\x1f.jaeger.api_v2.PostSpansRequest\x1a .jaeger.api_v2.PostSpansResponse\"\x18\x82\xd3\xe4\x93\x02\x12\"\r/api/v2/spans:\x01*Bv\n\x17io.jaegertracing.api_v2Z\x06\x61pi_v2\xc8\xe2\x1e\x01\xd0\xe2\x1e\x01\xe0\xe2\x1e\x01\xc0\xe3\x1e\x01\x92\x41\x42\x12\x05\x32\x03\x31.0*\x02\x01\x02r5\n\nJaeger API\x12\'https://github.com/jaegertracing/jaegerb\x06proto3') + , + dependencies=[model__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,protoc__gen__swagger_dot_options_dot_annotations__pb2.DESCRIPTOR,]) + + + + +_POSTSPANSREQUEST = _descriptor.Descriptor( + name='PostSpansRequest', + full_name='jaeger.api_v2.PostSpansRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='batch', full_name='jaeger.api_v2.PostSpansRequest.batch', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000'), file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=145, + serialized_end=206, +) + + +_POSTSPANSRESPONSE = _descriptor.Descriptor( + name='PostSpansResponse', + full_name='jaeger.api_v2.PostSpansResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=208, + serialized_end=227, +) + +_POSTSPANSREQUEST.fields_by_name['batch'].message_type = model__pb2._BATCH +DESCRIPTOR.message_types_by_name['PostSpansRequest'] = _POSTSPANSREQUEST +DESCRIPTOR.message_types_by_name['PostSpansResponse'] = _POSTSPANSRESPONSE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +PostSpansRequest = _reflection.GeneratedProtocolMessageType('PostSpansRequest', (_message.Message,), { + 'DESCRIPTOR' : _POSTSPANSREQUEST, + '__module__' : 'collector_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.PostSpansRequest) + }) +_sym_db.RegisterMessage(PostSpansRequest) + +PostSpansResponse = _reflection.GeneratedProtocolMessageType('PostSpansResponse', (_message.Message,), { + 'DESCRIPTOR' : _POSTSPANSRESPONSE, + '__module__' : 'collector_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.PostSpansResponse) + }) +_sym_db.RegisterMessage(PostSpansResponse) + + +DESCRIPTOR._options = None +_POSTSPANSREQUEST.fields_by_name['batch']._options = None + +_COLLECTORSERVICE = _descriptor.ServiceDescriptor( + name='CollectorService', + full_name='jaeger.api_v2.CollectorService', + file=DESCRIPTOR, + index=0, + serialized_options=None, + serialized_start=229, + serialized_end=353, + methods=[ + _descriptor.MethodDescriptor( + name='PostSpans', + full_name='jaeger.api_v2.CollectorService.PostSpans', + index=0, + containing_service=None, + input_type=_POSTSPANSREQUEST, + output_type=_POSTSPANSRESPONSE, + serialized_options=_b('\202\323\344\223\002\022\"\r/api/v2/spans:\001*'), + ), +]) +_sym_db.RegisterServiceDescriptor(_COLLECTORSERVICE) + +DESCRIPTOR.services_by_name['CollectorService'] = _COLLECTORSERVICE + +# @@protoc_insertion_point(module_scope) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/collector_pb2_grpc.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/collector_pb2_grpc.py new file mode 100644 index 00000000000..b6fcc3592a9 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/collector_pb2_grpc.py @@ -0,0 +1,46 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc + +import collector_pb2 as collector__pb2 + + +class CollectorServiceStub(object): + # missing associated documentation comment in .proto file + pass + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.PostSpans = channel.unary_unary( + '/jaeger.api_v2.CollectorService/PostSpans', + request_serializer=collector__pb2.PostSpansRequest.SerializeToString, + response_deserializer=collector__pb2.PostSpansResponse.FromString, + ) + + +class CollectorServiceServicer(object): + # missing associated documentation comment in .proto file + pass + + def PostSpans(self, request, context): + # missing associated documentation comment in .proto file + pass + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CollectorServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'PostSpans': grpc.unary_unary_rpc_method_handler( + servicer.PostSpans, + request_deserializer=collector__pb2.PostSpansRequest.FromString, + response_serializer=collector__pb2.PostSpansResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'jaeger.api_v2.CollectorService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/gogoproto/gogo_pb2.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/gogoproto/gogo_pb2.py new file mode 100644 index 00000000000..7268c1b693b --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/gogoproto/gogo_pb2.py @@ -0,0 +1,794 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: gogoproto/gogo.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='gogoproto/gogo.proto', + package='gogoproto', + syntax='proto2', + serialized_options=_b('\n\023com.google.protobufB\nGoGoProtosZ\"github.com/gogo/protobuf/gogoproto'), + serialized_pb=_b('\n\x14gogoproto/gogo.proto\x12\tgogoproto\x1a google/protobuf/descriptor.proto:;\n\x13goproto_enum_prefix\x12\x1c.google.protobuf.EnumOptions\x18\xb1\xe4\x03 \x01(\x08:=\n\x15goproto_enum_stringer\x12\x1c.google.protobuf.EnumOptions\x18\xc5\xe4\x03 \x01(\x08:5\n\renum_stringer\x12\x1c.google.protobuf.EnumOptions\x18\xc6\xe4\x03 \x01(\x08:7\n\x0f\x65num_customname\x12\x1c.google.protobuf.EnumOptions\x18\xc7\xe4\x03 \x01(\t:0\n\x08\x65numdecl\x12\x1c.google.protobuf.EnumOptions\x18\xc8\xe4\x03 \x01(\x08:A\n\x14\x65numvalue_customname\x12!.google.protobuf.EnumValueOptions\x18\xd1\x83\x04 \x01(\t:;\n\x13goproto_getters_all\x12\x1c.google.protobuf.FileOptions\x18\x99\xec\x03 \x01(\x08:?\n\x17goproto_enum_prefix_all\x12\x1c.google.protobuf.FileOptions\x18\x9a\xec\x03 \x01(\x08:<\n\x14goproto_stringer_all\x12\x1c.google.protobuf.FileOptions\x18\x9b\xec\x03 \x01(\x08:9\n\x11verbose_equal_all\x12\x1c.google.protobuf.FileOptions\x18\x9c\xec\x03 \x01(\x08:0\n\x08\x66\x61\x63\x65_all\x12\x1c.google.protobuf.FileOptions\x18\x9d\xec\x03 \x01(\x08:4\n\x0cgostring_all\x12\x1c.google.protobuf.FileOptions\x18\x9e\xec\x03 \x01(\x08:4\n\x0cpopulate_all\x12\x1c.google.protobuf.FileOptions\x18\x9f\xec\x03 \x01(\x08:4\n\x0cstringer_all\x12\x1c.google.protobuf.FileOptions\x18\xa0\xec\x03 \x01(\x08:3\n\x0bonlyone_all\x12\x1c.google.protobuf.FileOptions\x18\xa1\xec\x03 \x01(\x08:1\n\tequal_all\x12\x1c.google.protobuf.FileOptions\x18\xa5\xec\x03 \x01(\x08:7\n\x0f\x64\x65scription_all\x12\x1c.google.protobuf.FileOptions\x18\xa6\xec\x03 \x01(\x08:3\n\x0btestgen_all\x12\x1c.google.protobuf.FileOptions\x18\xa7\xec\x03 \x01(\x08:4\n\x0c\x62\x65nchgen_all\x12\x1c.google.protobuf.FileOptions\x18\xa8\xec\x03 \x01(\x08:5\n\rmarshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xa9\xec\x03 \x01(\x08:7\n\x0funmarshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xaa\xec\x03 \x01(\x08:<\n\x14stable_marshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xab\xec\x03 \x01(\x08:1\n\tsizer_all\x12\x1c.google.protobuf.FileOptions\x18\xac\xec\x03 \x01(\x08:A\n\x19goproto_enum_stringer_all\x12\x1c.google.protobuf.FileOptions\x18\xad\xec\x03 \x01(\x08:9\n\x11\x65num_stringer_all\x12\x1c.google.protobuf.FileOptions\x18\xae\xec\x03 \x01(\x08:<\n\x14unsafe_marshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xaf\xec\x03 \x01(\x08:>\n\x16unsafe_unmarshaler_all\x12\x1c.google.protobuf.FileOptions\x18\xb0\xec\x03 \x01(\x08:B\n\x1agoproto_extensions_map_all\x12\x1c.google.protobuf.FileOptions\x18\xb1\xec\x03 \x01(\x08:@\n\x18goproto_unrecognized_all\x12\x1c.google.protobuf.FileOptions\x18\xb2\xec\x03 \x01(\x08:8\n\x10gogoproto_import\x12\x1c.google.protobuf.FileOptions\x18\xb3\xec\x03 \x01(\x08:6\n\x0eprotosizer_all\x12\x1c.google.protobuf.FileOptions\x18\xb4\xec\x03 \x01(\x08:3\n\x0b\x63ompare_all\x12\x1c.google.protobuf.FileOptions\x18\xb5\xec\x03 \x01(\x08:4\n\x0ctypedecl_all\x12\x1c.google.protobuf.FileOptions\x18\xb6\xec\x03 \x01(\x08:4\n\x0c\x65numdecl_all\x12\x1c.google.protobuf.FileOptions\x18\xb7\xec\x03 \x01(\x08:<\n\x14goproto_registration\x12\x1c.google.protobuf.FileOptions\x18\xb8\xec\x03 \x01(\x08:7\n\x0fmessagename_all\x12\x1c.google.protobuf.FileOptions\x18\xb9\xec\x03 \x01(\x08:=\n\x15goproto_sizecache_all\x12\x1c.google.protobuf.FileOptions\x18\xba\xec\x03 \x01(\x08:;\n\x13goproto_unkeyed_all\x12\x1c.google.protobuf.FileOptions\x18\xbb\xec\x03 \x01(\x08::\n\x0fgoproto_getters\x12\x1f.google.protobuf.MessageOptions\x18\x81\xf4\x03 \x01(\x08:;\n\x10goproto_stringer\x12\x1f.google.protobuf.MessageOptions\x18\x83\xf4\x03 \x01(\x08:8\n\rverbose_equal\x12\x1f.google.protobuf.MessageOptions\x18\x84\xf4\x03 \x01(\x08:/\n\x04\x66\x61\x63\x65\x12\x1f.google.protobuf.MessageOptions\x18\x85\xf4\x03 \x01(\x08:3\n\x08gostring\x12\x1f.google.protobuf.MessageOptions\x18\x86\xf4\x03 \x01(\x08:3\n\x08populate\x12\x1f.google.protobuf.MessageOptions\x18\x87\xf4\x03 \x01(\x08:3\n\x08stringer\x12\x1f.google.protobuf.MessageOptions\x18\xc0\x8b\x04 \x01(\x08:2\n\x07onlyone\x12\x1f.google.protobuf.MessageOptions\x18\x89\xf4\x03 \x01(\x08:0\n\x05\x65qual\x12\x1f.google.protobuf.MessageOptions\x18\x8d\xf4\x03 \x01(\x08:6\n\x0b\x64\x65scription\x12\x1f.google.protobuf.MessageOptions\x18\x8e\xf4\x03 \x01(\x08:2\n\x07testgen\x12\x1f.google.protobuf.MessageOptions\x18\x8f\xf4\x03 \x01(\x08:3\n\x08\x62\x65nchgen\x12\x1f.google.protobuf.MessageOptions\x18\x90\xf4\x03 \x01(\x08:4\n\tmarshaler\x12\x1f.google.protobuf.MessageOptions\x18\x91\xf4\x03 \x01(\x08:6\n\x0bunmarshaler\x12\x1f.google.protobuf.MessageOptions\x18\x92\xf4\x03 \x01(\x08:;\n\x10stable_marshaler\x12\x1f.google.protobuf.MessageOptions\x18\x93\xf4\x03 \x01(\x08:0\n\x05sizer\x12\x1f.google.protobuf.MessageOptions\x18\x94\xf4\x03 \x01(\x08:;\n\x10unsafe_marshaler\x12\x1f.google.protobuf.MessageOptions\x18\x97\xf4\x03 \x01(\x08:=\n\x12unsafe_unmarshaler\x12\x1f.google.protobuf.MessageOptions\x18\x98\xf4\x03 \x01(\x08:A\n\x16goproto_extensions_map\x12\x1f.google.protobuf.MessageOptions\x18\x99\xf4\x03 \x01(\x08:?\n\x14goproto_unrecognized\x12\x1f.google.protobuf.MessageOptions\x18\x9a\xf4\x03 \x01(\x08:5\n\nprotosizer\x12\x1f.google.protobuf.MessageOptions\x18\x9c\xf4\x03 \x01(\x08:2\n\x07\x63ompare\x12\x1f.google.protobuf.MessageOptions\x18\x9d\xf4\x03 \x01(\x08:3\n\x08typedecl\x12\x1f.google.protobuf.MessageOptions\x18\x9e\xf4\x03 \x01(\x08:6\n\x0bmessagename\x12\x1f.google.protobuf.MessageOptions\x18\xa1\xf4\x03 \x01(\x08:<\n\x11goproto_sizecache\x12\x1f.google.protobuf.MessageOptions\x18\xa2\xf4\x03 \x01(\x08::\n\x0fgoproto_unkeyed\x12\x1f.google.protobuf.MessageOptions\x18\xa3\xf4\x03 \x01(\x08:1\n\x08nullable\x12\x1d.google.protobuf.FieldOptions\x18\xe9\xfb\x03 \x01(\x08:.\n\x05\x65mbed\x12\x1d.google.protobuf.FieldOptions\x18\xea\xfb\x03 \x01(\x08:3\n\ncustomtype\x12\x1d.google.protobuf.FieldOptions\x18\xeb\xfb\x03 \x01(\t:3\n\ncustomname\x12\x1d.google.protobuf.FieldOptions\x18\xec\xfb\x03 \x01(\t:0\n\x07jsontag\x12\x1d.google.protobuf.FieldOptions\x18\xed\xfb\x03 \x01(\t:1\n\x08moretags\x12\x1d.google.protobuf.FieldOptions\x18\xee\xfb\x03 \x01(\t:1\n\x08\x63\x61sttype\x12\x1d.google.protobuf.FieldOptions\x18\xef\xfb\x03 \x01(\t:0\n\x07\x63\x61stkey\x12\x1d.google.protobuf.FieldOptions\x18\xf0\xfb\x03 \x01(\t:2\n\tcastvalue\x12\x1d.google.protobuf.FieldOptions\x18\xf1\xfb\x03 \x01(\t:0\n\x07stdtime\x12\x1d.google.protobuf.FieldOptions\x18\xf2\xfb\x03 \x01(\x08:4\n\x0bstdduration\x12\x1d.google.protobuf.FieldOptions\x18\xf3\xfb\x03 \x01(\x08:3\n\nwktpointer\x12\x1d.google.protobuf.FieldOptions\x18\xf4\xfb\x03 \x01(\x08\x42\x45\n\x13\x63om.google.protobufB\nGoGoProtosZ\"github.com/gogo/protobuf/gogoproto') + , + dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,]) + + +GOPROTO_ENUM_PREFIX_FIELD_NUMBER = 62001 +goproto_enum_prefix = _descriptor.FieldDescriptor( + name='goproto_enum_prefix', full_name='gogoproto.goproto_enum_prefix', index=0, + number=62001, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_ENUM_STRINGER_FIELD_NUMBER = 62021 +goproto_enum_stringer = _descriptor.FieldDescriptor( + name='goproto_enum_stringer', full_name='gogoproto.goproto_enum_stringer', index=1, + number=62021, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +ENUM_STRINGER_FIELD_NUMBER = 62022 +enum_stringer = _descriptor.FieldDescriptor( + name='enum_stringer', full_name='gogoproto.enum_stringer', index=2, + number=62022, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +ENUM_CUSTOMNAME_FIELD_NUMBER = 62023 +enum_customname = _descriptor.FieldDescriptor( + name='enum_customname', full_name='gogoproto.enum_customname', index=3, + number=62023, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +ENUMDECL_FIELD_NUMBER = 62024 +enumdecl = _descriptor.FieldDescriptor( + name='enumdecl', full_name='gogoproto.enumdecl', index=4, + number=62024, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +ENUMVALUE_CUSTOMNAME_FIELD_NUMBER = 66001 +enumvalue_customname = _descriptor.FieldDescriptor( + name='enumvalue_customname', full_name='gogoproto.enumvalue_customname', index=5, + number=66001, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_GETTERS_ALL_FIELD_NUMBER = 63001 +goproto_getters_all = _descriptor.FieldDescriptor( + name='goproto_getters_all', full_name='gogoproto.goproto_getters_all', index=6, + number=63001, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_ENUM_PREFIX_ALL_FIELD_NUMBER = 63002 +goproto_enum_prefix_all = _descriptor.FieldDescriptor( + name='goproto_enum_prefix_all', full_name='gogoproto.goproto_enum_prefix_all', index=7, + number=63002, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_STRINGER_ALL_FIELD_NUMBER = 63003 +goproto_stringer_all = _descriptor.FieldDescriptor( + name='goproto_stringer_all', full_name='gogoproto.goproto_stringer_all', index=8, + number=63003, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +VERBOSE_EQUAL_ALL_FIELD_NUMBER = 63004 +verbose_equal_all = _descriptor.FieldDescriptor( + name='verbose_equal_all', full_name='gogoproto.verbose_equal_all', index=9, + number=63004, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +FACE_ALL_FIELD_NUMBER = 63005 +face_all = _descriptor.FieldDescriptor( + name='face_all', full_name='gogoproto.face_all', index=10, + number=63005, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOSTRING_ALL_FIELD_NUMBER = 63006 +gostring_all = _descriptor.FieldDescriptor( + name='gostring_all', full_name='gogoproto.gostring_all', index=11, + number=63006, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +POPULATE_ALL_FIELD_NUMBER = 63007 +populate_all = _descriptor.FieldDescriptor( + name='populate_all', full_name='gogoproto.populate_all', index=12, + number=63007, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +STRINGER_ALL_FIELD_NUMBER = 63008 +stringer_all = _descriptor.FieldDescriptor( + name='stringer_all', full_name='gogoproto.stringer_all', index=13, + number=63008, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +ONLYONE_ALL_FIELD_NUMBER = 63009 +onlyone_all = _descriptor.FieldDescriptor( + name='onlyone_all', full_name='gogoproto.onlyone_all', index=14, + number=63009, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +EQUAL_ALL_FIELD_NUMBER = 63013 +equal_all = _descriptor.FieldDescriptor( + name='equal_all', full_name='gogoproto.equal_all', index=15, + number=63013, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +DESCRIPTION_ALL_FIELD_NUMBER = 63014 +description_all = _descriptor.FieldDescriptor( + name='description_all', full_name='gogoproto.description_all', index=16, + number=63014, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +TESTGEN_ALL_FIELD_NUMBER = 63015 +testgen_all = _descriptor.FieldDescriptor( + name='testgen_all', full_name='gogoproto.testgen_all', index=17, + number=63015, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +BENCHGEN_ALL_FIELD_NUMBER = 63016 +benchgen_all = _descriptor.FieldDescriptor( + name='benchgen_all', full_name='gogoproto.benchgen_all', index=18, + number=63016, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +MARSHALER_ALL_FIELD_NUMBER = 63017 +marshaler_all = _descriptor.FieldDescriptor( + name='marshaler_all', full_name='gogoproto.marshaler_all', index=19, + number=63017, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +UNMARSHALER_ALL_FIELD_NUMBER = 63018 +unmarshaler_all = _descriptor.FieldDescriptor( + name='unmarshaler_all', full_name='gogoproto.unmarshaler_all', index=20, + number=63018, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +STABLE_MARSHALER_ALL_FIELD_NUMBER = 63019 +stable_marshaler_all = _descriptor.FieldDescriptor( + name='stable_marshaler_all', full_name='gogoproto.stable_marshaler_all', index=21, + number=63019, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +SIZER_ALL_FIELD_NUMBER = 63020 +sizer_all = _descriptor.FieldDescriptor( + name='sizer_all', full_name='gogoproto.sizer_all', index=22, + number=63020, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_ENUM_STRINGER_ALL_FIELD_NUMBER = 63021 +goproto_enum_stringer_all = _descriptor.FieldDescriptor( + name='goproto_enum_stringer_all', full_name='gogoproto.goproto_enum_stringer_all', index=23, + number=63021, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +ENUM_STRINGER_ALL_FIELD_NUMBER = 63022 +enum_stringer_all = _descriptor.FieldDescriptor( + name='enum_stringer_all', full_name='gogoproto.enum_stringer_all', index=24, + number=63022, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +UNSAFE_MARSHALER_ALL_FIELD_NUMBER = 63023 +unsafe_marshaler_all = _descriptor.FieldDescriptor( + name='unsafe_marshaler_all', full_name='gogoproto.unsafe_marshaler_all', index=25, + number=63023, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +UNSAFE_UNMARSHALER_ALL_FIELD_NUMBER = 63024 +unsafe_unmarshaler_all = _descriptor.FieldDescriptor( + name='unsafe_unmarshaler_all', full_name='gogoproto.unsafe_unmarshaler_all', index=26, + number=63024, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_EXTENSIONS_MAP_ALL_FIELD_NUMBER = 63025 +goproto_extensions_map_all = _descriptor.FieldDescriptor( + name='goproto_extensions_map_all', full_name='gogoproto.goproto_extensions_map_all', index=27, + number=63025, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_UNRECOGNIZED_ALL_FIELD_NUMBER = 63026 +goproto_unrecognized_all = _descriptor.FieldDescriptor( + name='goproto_unrecognized_all', full_name='gogoproto.goproto_unrecognized_all', index=28, + number=63026, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOGOPROTO_IMPORT_FIELD_NUMBER = 63027 +gogoproto_import = _descriptor.FieldDescriptor( + name='gogoproto_import', full_name='gogoproto.gogoproto_import', index=29, + number=63027, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +PROTOSIZER_ALL_FIELD_NUMBER = 63028 +protosizer_all = _descriptor.FieldDescriptor( + name='protosizer_all', full_name='gogoproto.protosizer_all', index=30, + number=63028, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +COMPARE_ALL_FIELD_NUMBER = 63029 +compare_all = _descriptor.FieldDescriptor( + name='compare_all', full_name='gogoproto.compare_all', index=31, + number=63029, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +TYPEDECL_ALL_FIELD_NUMBER = 63030 +typedecl_all = _descriptor.FieldDescriptor( + name='typedecl_all', full_name='gogoproto.typedecl_all', index=32, + number=63030, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +ENUMDECL_ALL_FIELD_NUMBER = 63031 +enumdecl_all = _descriptor.FieldDescriptor( + name='enumdecl_all', full_name='gogoproto.enumdecl_all', index=33, + number=63031, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_REGISTRATION_FIELD_NUMBER = 63032 +goproto_registration = _descriptor.FieldDescriptor( + name='goproto_registration', full_name='gogoproto.goproto_registration', index=34, + number=63032, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +MESSAGENAME_ALL_FIELD_NUMBER = 63033 +messagename_all = _descriptor.FieldDescriptor( + name='messagename_all', full_name='gogoproto.messagename_all', index=35, + number=63033, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_SIZECACHE_ALL_FIELD_NUMBER = 63034 +goproto_sizecache_all = _descriptor.FieldDescriptor( + name='goproto_sizecache_all', full_name='gogoproto.goproto_sizecache_all', index=36, + number=63034, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_UNKEYED_ALL_FIELD_NUMBER = 63035 +goproto_unkeyed_all = _descriptor.FieldDescriptor( + name='goproto_unkeyed_all', full_name='gogoproto.goproto_unkeyed_all', index=37, + number=63035, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_GETTERS_FIELD_NUMBER = 64001 +goproto_getters = _descriptor.FieldDescriptor( + name='goproto_getters', full_name='gogoproto.goproto_getters', index=38, + number=64001, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_STRINGER_FIELD_NUMBER = 64003 +goproto_stringer = _descriptor.FieldDescriptor( + name='goproto_stringer', full_name='gogoproto.goproto_stringer', index=39, + number=64003, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +VERBOSE_EQUAL_FIELD_NUMBER = 64004 +verbose_equal = _descriptor.FieldDescriptor( + name='verbose_equal', full_name='gogoproto.verbose_equal', index=40, + number=64004, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +FACE_FIELD_NUMBER = 64005 +face = _descriptor.FieldDescriptor( + name='face', full_name='gogoproto.face', index=41, + number=64005, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOSTRING_FIELD_NUMBER = 64006 +gostring = _descriptor.FieldDescriptor( + name='gostring', full_name='gogoproto.gostring', index=42, + number=64006, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +POPULATE_FIELD_NUMBER = 64007 +populate = _descriptor.FieldDescriptor( + name='populate', full_name='gogoproto.populate', index=43, + number=64007, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +STRINGER_FIELD_NUMBER = 67008 +stringer = _descriptor.FieldDescriptor( + name='stringer', full_name='gogoproto.stringer', index=44, + number=67008, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +ONLYONE_FIELD_NUMBER = 64009 +onlyone = _descriptor.FieldDescriptor( + name='onlyone', full_name='gogoproto.onlyone', index=45, + number=64009, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +EQUAL_FIELD_NUMBER = 64013 +equal = _descriptor.FieldDescriptor( + name='equal', full_name='gogoproto.equal', index=46, + number=64013, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +DESCRIPTION_FIELD_NUMBER = 64014 +description = _descriptor.FieldDescriptor( + name='description', full_name='gogoproto.description', index=47, + number=64014, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +TESTGEN_FIELD_NUMBER = 64015 +testgen = _descriptor.FieldDescriptor( + name='testgen', full_name='gogoproto.testgen', index=48, + number=64015, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +BENCHGEN_FIELD_NUMBER = 64016 +benchgen = _descriptor.FieldDescriptor( + name='benchgen', full_name='gogoproto.benchgen', index=49, + number=64016, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +MARSHALER_FIELD_NUMBER = 64017 +marshaler = _descriptor.FieldDescriptor( + name='marshaler', full_name='gogoproto.marshaler', index=50, + number=64017, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +UNMARSHALER_FIELD_NUMBER = 64018 +unmarshaler = _descriptor.FieldDescriptor( + name='unmarshaler', full_name='gogoproto.unmarshaler', index=51, + number=64018, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +STABLE_MARSHALER_FIELD_NUMBER = 64019 +stable_marshaler = _descriptor.FieldDescriptor( + name='stable_marshaler', full_name='gogoproto.stable_marshaler', index=52, + number=64019, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +SIZER_FIELD_NUMBER = 64020 +sizer = _descriptor.FieldDescriptor( + name='sizer', full_name='gogoproto.sizer', index=53, + number=64020, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +UNSAFE_MARSHALER_FIELD_NUMBER = 64023 +unsafe_marshaler = _descriptor.FieldDescriptor( + name='unsafe_marshaler', full_name='gogoproto.unsafe_marshaler', index=54, + number=64023, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +UNSAFE_UNMARSHALER_FIELD_NUMBER = 64024 +unsafe_unmarshaler = _descriptor.FieldDescriptor( + name='unsafe_unmarshaler', full_name='gogoproto.unsafe_unmarshaler', index=55, + number=64024, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_EXTENSIONS_MAP_FIELD_NUMBER = 64025 +goproto_extensions_map = _descriptor.FieldDescriptor( + name='goproto_extensions_map', full_name='gogoproto.goproto_extensions_map', index=56, + number=64025, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_UNRECOGNIZED_FIELD_NUMBER = 64026 +goproto_unrecognized = _descriptor.FieldDescriptor( + name='goproto_unrecognized', full_name='gogoproto.goproto_unrecognized', index=57, + number=64026, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +PROTOSIZER_FIELD_NUMBER = 64028 +protosizer = _descriptor.FieldDescriptor( + name='protosizer', full_name='gogoproto.protosizer', index=58, + number=64028, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +COMPARE_FIELD_NUMBER = 64029 +compare = _descriptor.FieldDescriptor( + name='compare', full_name='gogoproto.compare', index=59, + number=64029, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +TYPEDECL_FIELD_NUMBER = 64030 +typedecl = _descriptor.FieldDescriptor( + name='typedecl', full_name='gogoproto.typedecl', index=60, + number=64030, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +MESSAGENAME_FIELD_NUMBER = 64033 +messagename = _descriptor.FieldDescriptor( + name='messagename', full_name='gogoproto.messagename', index=61, + number=64033, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_SIZECACHE_FIELD_NUMBER = 64034 +goproto_sizecache = _descriptor.FieldDescriptor( + name='goproto_sizecache', full_name='gogoproto.goproto_sizecache', index=62, + number=64034, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +GOPROTO_UNKEYED_FIELD_NUMBER = 64035 +goproto_unkeyed = _descriptor.FieldDescriptor( + name='goproto_unkeyed', full_name='gogoproto.goproto_unkeyed', index=63, + number=64035, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +NULLABLE_FIELD_NUMBER = 65001 +nullable = _descriptor.FieldDescriptor( + name='nullable', full_name='gogoproto.nullable', index=64, + number=65001, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +EMBED_FIELD_NUMBER = 65002 +embed = _descriptor.FieldDescriptor( + name='embed', full_name='gogoproto.embed', index=65, + number=65002, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +CUSTOMTYPE_FIELD_NUMBER = 65003 +customtype = _descriptor.FieldDescriptor( + name='customtype', full_name='gogoproto.customtype', index=66, + number=65003, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +CUSTOMNAME_FIELD_NUMBER = 65004 +customname = _descriptor.FieldDescriptor( + name='customname', full_name='gogoproto.customname', index=67, + number=65004, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +JSONTAG_FIELD_NUMBER = 65005 +jsontag = _descriptor.FieldDescriptor( + name='jsontag', full_name='gogoproto.jsontag', index=68, + number=65005, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +MORETAGS_FIELD_NUMBER = 65006 +moretags = _descriptor.FieldDescriptor( + name='moretags', full_name='gogoproto.moretags', index=69, + number=65006, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +CASTTYPE_FIELD_NUMBER = 65007 +casttype = _descriptor.FieldDescriptor( + name='casttype', full_name='gogoproto.casttype', index=70, + number=65007, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +CASTKEY_FIELD_NUMBER = 65008 +castkey = _descriptor.FieldDescriptor( + name='castkey', full_name='gogoproto.castkey', index=71, + number=65008, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +CASTVALUE_FIELD_NUMBER = 65009 +castvalue = _descriptor.FieldDescriptor( + name='castvalue', full_name='gogoproto.castvalue', index=72, + number=65009, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +STDTIME_FIELD_NUMBER = 65010 +stdtime = _descriptor.FieldDescriptor( + name='stdtime', full_name='gogoproto.stdtime', index=73, + number=65010, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +STDDURATION_FIELD_NUMBER = 65011 +stdduration = _descriptor.FieldDescriptor( + name='stdduration', full_name='gogoproto.stdduration', index=74, + number=65011, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +WKTPOINTER_FIELD_NUMBER = 65012 +wktpointer = _descriptor.FieldDescriptor( + name='wktpointer', full_name='gogoproto.wktpointer', index=75, + number=65012, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) + +DESCRIPTOR.extensions_by_name['goproto_enum_prefix'] = goproto_enum_prefix +DESCRIPTOR.extensions_by_name['goproto_enum_stringer'] = goproto_enum_stringer +DESCRIPTOR.extensions_by_name['enum_stringer'] = enum_stringer +DESCRIPTOR.extensions_by_name['enum_customname'] = enum_customname +DESCRIPTOR.extensions_by_name['enumdecl'] = enumdecl +DESCRIPTOR.extensions_by_name['enumvalue_customname'] = enumvalue_customname +DESCRIPTOR.extensions_by_name['goproto_getters_all'] = goproto_getters_all +DESCRIPTOR.extensions_by_name['goproto_enum_prefix_all'] = goproto_enum_prefix_all +DESCRIPTOR.extensions_by_name['goproto_stringer_all'] = goproto_stringer_all +DESCRIPTOR.extensions_by_name['verbose_equal_all'] = verbose_equal_all +DESCRIPTOR.extensions_by_name['face_all'] = face_all +DESCRIPTOR.extensions_by_name['gostring_all'] = gostring_all +DESCRIPTOR.extensions_by_name['populate_all'] = populate_all +DESCRIPTOR.extensions_by_name['stringer_all'] = stringer_all +DESCRIPTOR.extensions_by_name['onlyone_all'] = onlyone_all +DESCRIPTOR.extensions_by_name['equal_all'] = equal_all +DESCRIPTOR.extensions_by_name['description_all'] = description_all +DESCRIPTOR.extensions_by_name['testgen_all'] = testgen_all +DESCRIPTOR.extensions_by_name['benchgen_all'] = benchgen_all +DESCRIPTOR.extensions_by_name['marshaler_all'] = marshaler_all +DESCRIPTOR.extensions_by_name['unmarshaler_all'] = unmarshaler_all +DESCRIPTOR.extensions_by_name['stable_marshaler_all'] = stable_marshaler_all +DESCRIPTOR.extensions_by_name['sizer_all'] = sizer_all +DESCRIPTOR.extensions_by_name['goproto_enum_stringer_all'] = goproto_enum_stringer_all +DESCRIPTOR.extensions_by_name['enum_stringer_all'] = enum_stringer_all +DESCRIPTOR.extensions_by_name['unsafe_marshaler_all'] = unsafe_marshaler_all +DESCRIPTOR.extensions_by_name['unsafe_unmarshaler_all'] = unsafe_unmarshaler_all +DESCRIPTOR.extensions_by_name['goproto_extensions_map_all'] = goproto_extensions_map_all +DESCRIPTOR.extensions_by_name['goproto_unrecognized_all'] = goproto_unrecognized_all +DESCRIPTOR.extensions_by_name['gogoproto_import'] = gogoproto_import +DESCRIPTOR.extensions_by_name['protosizer_all'] = protosizer_all +DESCRIPTOR.extensions_by_name['compare_all'] = compare_all +DESCRIPTOR.extensions_by_name['typedecl_all'] = typedecl_all +DESCRIPTOR.extensions_by_name['enumdecl_all'] = enumdecl_all +DESCRIPTOR.extensions_by_name['goproto_registration'] = goproto_registration +DESCRIPTOR.extensions_by_name['messagename_all'] = messagename_all +DESCRIPTOR.extensions_by_name['goproto_sizecache_all'] = goproto_sizecache_all +DESCRIPTOR.extensions_by_name['goproto_unkeyed_all'] = goproto_unkeyed_all +DESCRIPTOR.extensions_by_name['goproto_getters'] = goproto_getters +DESCRIPTOR.extensions_by_name['goproto_stringer'] = goproto_stringer +DESCRIPTOR.extensions_by_name['verbose_equal'] = verbose_equal +DESCRIPTOR.extensions_by_name['face'] = face +DESCRIPTOR.extensions_by_name['gostring'] = gostring +DESCRIPTOR.extensions_by_name['populate'] = populate +DESCRIPTOR.extensions_by_name['stringer'] = stringer +DESCRIPTOR.extensions_by_name['onlyone'] = onlyone +DESCRIPTOR.extensions_by_name['equal'] = equal +DESCRIPTOR.extensions_by_name['description'] = description +DESCRIPTOR.extensions_by_name['testgen'] = testgen +DESCRIPTOR.extensions_by_name['benchgen'] = benchgen +DESCRIPTOR.extensions_by_name['marshaler'] = marshaler +DESCRIPTOR.extensions_by_name['unmarshaler'] = unmarshaler +DESCRIPTOR.extensions_by_name['stable_marshaler'] = stable_marshaler +DESCRIPTOR.extensions_by_name['sizer'] = sizer +DESCRIPTOR.extensions_by_name['unsafe_marshaler'] = unsafe_marshaler +DESCRIPTOR.extensions_by_name['unsafe_unmarshaler'] = unsafe_unmarshaler +DESCRIPTOR.extensions_by_name['goproto_extensions_map'] = goproto_extensions_map +DESCRIPTOR.extensions_by_name['goproto_unrecognized'] = goproto_unrecognized +DESCRIPTOR.extensions_by_name['protosizer'] = protosizer +DESCRIPTOR.extensions_by_name['compare'] = compare +DESCRIPTOR.extensions_by_name['typedecl'] = typedecl +DESCRIPTOR.extensions_by_name['messagename'] = messagename +DESCRIPTOR.extensions_by_name['goproto_sizecache'] = goproto_sizecache +DESCRIPTOR.extensions_by_name['goproto_unkeyed'] = goproto_unkeyed +DESCRIPTOR.extensions_by_name['nullable'] = nullable +DESCRIPTOR.extensions_by_name['embed'] = embed +DESCRIPTOR.extensions_by_name['customtype'] = customtype +DESCRIPTOR.extensions_by_name['customname'] = customname +DESCRIPTOR.extensions_by_name['jsontag'] = jsontag +DESCRIPTOR.extensions_by_name['moretags'] = moretags +DESCRIPTOR.extensions_by_name['casttype'] = casttype +DESCRIPTOR.extensions_by_name['castkey'] = castkey +DESCRIPTOR.extensions_by_name['castvalue'] = castvalue +DESCRIPTOR.extensions_by_name['stdtime'] = stdtime +DESCRIPTOR.extensions_by_name['stdduration'] = stdduration +DESCRIPTOR.extensions_by_name['wktpointer'] = wktpointer +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(goproto_enum_prefix) +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(goproto_enum_stringer) +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(enum_stringer) +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(enum_customname) +google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(enumdecl) +google_dot_protobuf_dot_descriptor__pb2.EnumValueOptions.RegisterExtension(enumvalue_customname) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_getters_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_enum_prefix_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_stringer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(verbose_equal_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(face_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(gostring_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(populate_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(stringer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(onlyone_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(equal_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(description_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(testgen_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(benchgen_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(marshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(unmarshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(stable_marshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(sizer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_enum_stringer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(enum_stringer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(unsafe_marshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(unsafe_unmarshaler_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_extensions_map_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_unrecognized_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(gogoproto_import) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(protosizer_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(compare_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(typedecl_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(enumdecl_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_registration) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(messagename_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_sizecache_all) +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(goproto_unkeyed_all) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_getters) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_stringer) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(verbose_equal) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(face) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(gostring) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(populate) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(stringer) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(onlyone) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(equal) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(description) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(testgen) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(benchgen) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(marshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(unmarshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(stable_marshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(sizer) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(unsafe_marshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(unsafe_unmarshaler) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_extensions_map) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_unrecognized) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(protosizer) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(compare) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(typedecl) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(messagename) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_sizecache) +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(goproto_unkeyed) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(nullable) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(embed) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(customtype) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(customname) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(jsontag) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(moretags) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(casttype) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(castkey) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(castvalue) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(stdtime) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(stdduration) +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(wktpointer) + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/google/api/annotations_pb2.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/google/api/annotations_pb2.py new file mode 100644 index 00000000000..e72a7f8b743 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/google/api/annotations_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/annotations.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import http_pb2 as google_dot_api_dot_http__pb2 +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='google/api/annotations.proto', + package='google.api', + syntax='proto3', + serialized_options=_b('\n\016com.google.apiB\020AnnotationsProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI'), + serialized_pb=_b('\n\x1cgoogle/api/annotations.proto\x12\ngoogle.api\x1a\x15google/api/http.proto\x1a google/protobuf/descriptor.proto:E\n\x04http\x12\x1e.google.protobuf.MethodOptions\x18\xb0\xca\xbc\" \x01(\x0b\x32\x14.google.api.HttpRuleBn\n\x0e\x63om.google.apiB\x10\x41nnotationsProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3') + , + dependencies=[google_dot_api_dot_http__pb2.DESCRIPTOR,google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,]) + + +HTTP_FIELD_NUMBER = 72295728 +http = _descriptor.FieldDescriptor( + name='http', full_name='google.api.http', index=0, + number=72295728, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) + +DESCRIPTOR.extensions_by_name['http'] = http +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +http.message_type = google_dot_api_dot_http__pb2._HTTPRULE +google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(http) + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/google/api/http_pb2.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/google/api/http_pb2.py new file mode 100644 index 00000000000..01352aca81b --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/google/api/http_pb2.py @@ -0,0 +1,250 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/http.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='google/api/http.proto', + package='google.api', + syntax='proto3', + serialized_options=_b('\n\016com.google.apiB\tHttpProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\370\001\001\242\002\004GAPI'), + serialized_pb=_b('\n\x15google/api/http.proto\x12\ngoogle.api\"T\n\x04Http\x12#\n\x05rules\x18\x01 \x03(\x0b\x32\x14.google.api.HttpRule\x12\'\n\x1f\x66ully_decode_reserved_expansion\x18\x02 \x01(\x08\"\x81\x02\n\x08HttpRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\r\n\x03get\x18\x02 \x01(\tH\x00\x12\r\n\x03put\x18\x03 \x01(\tH\x00\x12\x0e\n\x04post\x18\x04 \x01(\tH\x00\x12\x10\n\x06\x64\x65lete\x18\x05 \x01(\tH\x00\x12\x0f\n\x05patch\x18\x06 \x01(\tH\x00\x12/\n\x06\x63ustom\x18\x08 \x01(\x0b\x32\x1d.google.api.CustomHttpPatternH\x00\x12\x0c\n\x04\x62ody\x18\x07 \x01(\t\x12\x15\n\rresponse_body\x18\x0c \x01(\t\x12\x31\n\x13\x61\x64\x64itional_bindings\x18\x0b \x03(\x0b\x32\x14.google.api.HttpRuleB\t\n\x07pattern\"/\n\x11\x43ustomHttpPattern\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\tBj\n\x0e\x63om.google.apiB\tHttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3') +) + + + + +_HTTP = _descriptor.Descriptor( + name='Http', + full_name='google.api.Http', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='rules', full_name='google.api.Http.rules', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='fully_decode_reserved_expansion', full_name='google.api.Http.fully_decode_reserved_expansion', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=37, + serialized_end=121, +) + + +_HTTPRULE = _descriptor.Descriptor( + name='HttpRule', + full_name='google.api.HttpRule', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='selector', full_name='google.api.HttpRule.selector', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='get', full_name='google.api.HttpRule.get', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='put', full_name='google.api.HttpRule.put', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='post', full_name='google.api.HttpRule.post', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='delete', full_name='google.api.HttpRule.delete', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='patch', full_name='google.api.HttpRule.patch', index=5, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='custom', full_name='google.api.HttpRule.custom', index=6, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='body', full_name='google.api.HttpRule.body', index=7, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='response_body', full_name='google.api.HttpRule.response_body', index=8, + number=12, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='additional_bindings', full_name='google.api.HttpRule.additional_bindings', index=9, + number=11, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='pattern', full_name='google.api.HttpRule.pattern', + index=0, containing_type=None, fields=[]), + ], + serialized_start=124, + serialized_end=381, +) + + +_CUSTOMHTTPPATTERN = _descriptor.Descriptor( + name='CustomHttpPattern', + full_name='google.api.CustomHttpPattern', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='kind', full_name='google.api.CustomHttpPattern.kind', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='path', full_name='google.api.CustomHttpPattern.path', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=383, + serialized_end=430, +) + +_HTTP.fields_by_name['rules'].message_type = _HTTPRULE +_HTTPRULE.fields_by_name['custom'].message_type = _CUSTOMHTTPPATTERN +_HTTPRULE.fields_by_name['additional_bindings'].message_type = _HTTPRULE +_HTTPRULE.oneofs_by_name['pattern'].fields.append( + _HTTPRULE.fields_by_name['get']) +_HTTPRULE.fields_by_name['get'].containing_oneof = _HTTPRULE.oneofs_by_name['pattern'] +_HTTPRULE.oneofs_by_name['pattern'].fields.append( + _HTTPRULE.fields_by_name['put']) +_HTTPRULE.fields_by_name['put'].containing_oneof = _HTTPRULE.oneofs_by_name['pattern'] +_HTTPRULE.oneofs_by_name['pattern'].fields.append( + _HTTPRULE.fields_by_name['post']) +_HTTPRULE.fields_by_name['post'].containing_oneof = _HTTPRULE.oneofs_by_name['pattern'] +_HTTPRULE.oneofs_by_name['pattern'].fields.append( + _HTTPRULE.fields_by_name['delete']) +_HTTPRULE.fields_by_name['delete'].containing_oneof = _HTTPRULE.oneofs_by_name['pattern'] +_HTTPRULE.oneofs_by_name['pattern'].fields.append( + _HTTPRULE.fields_by_name['patch']) +_HTTPRULE.fields_by_name['patch'].containing_oneof = _HTTPRULE.oneofs_by_name['pattern'] +_HTTPRULE.oneofs_by_name['pattern'].fields.append( + _HTTPRULE.fields_by_name['custom']) +_HTTPRULE.fields_by_name['custom'].containing_oneof = _HTTPRULE.oneofs_by_name['pattern'] +DESCRIPTOR.message_types_by_name['Http'] = _HTTP +DESCRIPTOR.message_types_by_name['HttpRule'] = _HTTPRULE +DESCRIPTOR.message_types_by_name['CustomHttpPattern'] = _CUSTOMHTTPPATTERN +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Http = _reflection.GeneratedProtocolMessageType('Http', (_message.Message,), { + 'DESCRIPTOR' : _HTTP, + '__module__' : 'google.api.http_pb2' + # @@protoc_insertion_point(class_scope:google.api.Http) + }) +_sym_db.RegisterMessage(Http) + +HttpRule = _reflection.GeneratedProtocolMessageType('HttpRule', (_message.Message,), { + 'DESCRIPTOR' : _HTTPRULE, + '__module__' : 'google.api.http_pb2' + # @@protoc_insertion_point(class_scope:google.api.HttpRule) + }) +_sym_db.RegisterMessage(HttpRule) + +CustomHttpPattern = _reflection.GeneratedProtocolMessageType('CustomHttpPattern', (_message.Message,), { + 'DESCRIPTOR' : _CUSTOMHTTPPATTERN, + '__module__' : 'google.api.http_pb2' + # @@protoc_insertion_point(class_scope:google.api.CustomHttpPattern) + }) +_sym_db.RegisterMessage(CustomHttpPattern) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/model_pb2.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/model_pb2.py new file mode 100644 index 00000000000..8abc302a626 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/model_pb2.py @@ -0,0 +1,686 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: model.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='model.proto', + package='jaeger.api_v2', + syntax='proto3', + serialized_options=_b('\n\027io.jaegertracing.api_v2Z\005model\310\342\036\001\320\342\036\001\340\342\036\001\300\343\036\001'), + serialized_pb=_b('\n\x0bmodel.proto\x12\rjaeger.api_v2\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\"\xa0\x01\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x06v_type\x18\x02 \x01(\x0e\x32\x18.jaeger.api_v2.ValueType\x12\r\n\x05v_str\x18\x03 \x01(\t\x12\x0e\n\x06v_bool\x18\x04 \x01(\x08\x12\x0f\n\x07v_int64\x18\x05 \x01(\x03\x12\x11\n\tv_float64\x18\x06 \x01(\x01\x12\x10\n\x08v_binary\x18\x07 \x01(\x0c:\x08\xe8\xa0\x1f\x01\xe8\xa1\x1f\x01\"m\n\x03Log\x12\x37\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x08\x90\xdf\x1f\x01\xc8\xde\x1f\x00\x12-\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x17.jaeger.api_v2.KeyValueB\x04\xc8\xde\x1f\x00\"\x90\x01\n\x07SpanRef\x12,\n\x08trace_id\x18\x01 \x01(\x0c\x42\x1a\xc8\xde\x1f\x00\xda\xde\x1f\x07TraceID\xe2\xde\x1f\x07TraceID\x12)\n\x07span_id\x18\x02 \x01(\x0c\x42\x18\xc8\xde\x1f\x00\xda\xde\x1f\x06SpanID\xe2\xde\x1f\x06SpanID\x12,\n\x08ref_type\x18\x03 \x01(\x0e\x32\x1a.jaeger.api_v2.SpanRefType\"L\n\x07Process\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12+\n\x04tags\x18\x02 \x03(\x0b\x32\x17.jaeger.api_v2.KeyValueB\x04\xc8\xde\x1f\x00\"\xeb\x03\n\x04Span\x12,\n\x08trace_id\x18\x01 \x01(\x0c\x42\x1a\xc8\xde\x1f\x00\xda\xde\x1f\x07TraceID\xe2\xde\x1f\x07TraceID\x12)\n\x07span_id\x18\x02 \x01(\x0c\x42\x18\xc8\xde\x1f\x00\xda\xde\x1f\x06SpanID\xe2\xde\x1f\x06SpanID\x12\x16\n\x0eoperation_name\x18\x03 \x01(\t\x12\x30\n\nreferences\x18\x04 \x03(\x0b\x32\x16.jaeger.api_v2.SpanRefB\x04\xc8\xde\x1f\x00\x12\x1c\n\x05\x66lags\x18\x05 \x01(\rB\r\xc8\xde\x1f\x00\xda\xde\x1f\x05\x46lags\x12\x38\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x08\x90\xdf\x1f\x01\xc8\xde\x1f\x00\x12\x35\n\x08\x64uration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\x98\xdf\x1f\x01\xc8\xde\x1f\x00\x12+\n\x04tags\x18\x08 \x03(\x0b\x32\x17.jaeger.api_v2.KeyValueB\x04\xc8\xde\x1f\x00\x12&\n\x04logs\x18\t \x03(\x0b\x32\x12.jaeger.api_v2.LogB\x04\xc8\xde\x1f\x00\x12\'\n\x07process\x18\n \x01(\x0b\x32\x16.jaeger.api_v2.Process\x12!\n\nprocess_id\x18\x0b \x01(\tB\r\xe2\xde\x1f\tProcessID\x12\x10\n\x08warnings\x18\x0c \x03(\t\"\xe1\x01\n\x05Trace\x12\"\n\x05spans\x18\x01 \x03(\x0b\x32\x13.jaeger.api_v2.Span\x12>\n\x0bprocess_map\x18\x02 \x03(\x0b\x32#.jaeger.api_v2.Trace.ProcessMappingB\x04\xc8\xde\x1f\x00\x12\x10\n\x08warnings\x18\x03 \x03(\t\x1a\x62\n\x0eProcessMapping\x12!\n\nprocess_id\x18\x01 \x01(\tB\r\xe2\xde\x1f\tProcessID\x12-\n\x07process\x18\x02 \x01(\x0b\x32\x16.jaeger.api_v2.ProcessB\x04\xc8\xde\x1f\x00\"Z\n\x05\x42\x61tch\x12\"\n\x05spans\x18\x01 \x03(\x0b\x32\x13.jaeger.api_v2.Span\x12-\n\x07process\x18\x02 \x01(\x0b\x32\x16.jaeger.api_v2.ProcessB\x04\xc8\xde\x1f\x01\"S\n\x0e\x44\x65pendencyLink\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\r\n\x05\x63hild\x18\x02 \x01(\t\x12\x12\n\ncall_count\x18\x03 \x01(\x04\x12\x0e\n\x06source\x18\x04 \x01(\t*E\n\tValueType\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x12\x0b\n\x07\x46LOAT64\x10\x03\x12\n\n\x06\x42INARY\x10\x04*-\n\x0bSpanRefType\x12\x0c\n\x08\x43HILD_OF\x10\x00\x12\x10\n\x0c\x46OLLOWS_FROM\x10\x01\x42\x30\n\x17io.jaegertracing.api_v2Z\x05model\xc8\xe2\x1e\x01\xd0\xe2\x1e\x01\xe0\xe2\x1e\x01\xc0\xe3\x1e\x01\x62\x06proto3') + , + dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,]) + +_VALUETYPE = _descriptor.EnumDescriptor( + name='ValueType', + full_name='jaeger.api_v2.ValueType', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='STRING', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BOOL', index=1, number=1, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='INT64', index=2, number=2, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FLOAT64', index=3, number=3, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BINARY', index=4, number=4, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=1515, + serialized_end=1584, +) +_sym_db.RegisterEnumDescriptor(_VALUETYPE) + +ValueType = enum_type_wrapper.EnumTypeWrapper(_VALUETYPE) +_SPANREFTYPE = _descriptor.EnumDescriptor( + name='SpanRefType', + full_name='jaeger.api_v2.SpanRefType', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='CHILD_OF', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FOLLOWS_FROM', index=1, number=1, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=1586, + serialized_end=1631, +) +_sym_db.RegisterEnumDescriptor(_SPANREFTYPE) + +SpanRefType = enum_type_wrapper.EnumTypeWrapper(_SPANREFTYPE) +STRING = 0 +BOOL = 1 +INT64 = 2 +FLOAT64 = 3 +BINARY = 4 +CHILD_OF = 0 +FOLLOWS_FROM = 1 + + + +_KEYVALUE = _descriptor.Descriptor( + name='KeyValue', + full_name='jaeger.api_v2.KeyValue', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='jaeger.api_v2.KeyValue.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='v_type', full_name='jaeger.api_v2.KeyValue.v_type', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='v_str', full_name='jaeger.api_v2.KeyValue.v_str', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='v_bool', full_name='jaeger.api_v2.KeyValue.v_bool', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='v_int64', full_name='jaeger.api_v2.KeyValue.v_int64', index=4, + number=5, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='v_float64', full_name='jaeger.api_v2.KeyValue.v_float64', index=5, + number=6, type=1, cpp_type=5, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='v_binary', full_name='jaeger.api_v2.KeyValue.v_binary', index=6, + number=7, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('\350\240\037\001\350\241\037\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=118, + serialized_end=278, +) + + +_LOG = _descriptor.Descriptor( + name='Log', + full_name='jaeger.api_v2.Log', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='timestamp', full_name='jaeger.api_v2.Log.timestamp', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\220\337\037\001\310\336\037\000'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='fields', full_name='jaeger.api_v2.Log.fields', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000'), file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=280, + serialized_end=389, +) + + +_SPANREF = _descriptor.Descriptor( + name='SpanRef', + full_name='jaeger.api_v2.SpanRef', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='trace_id', full_name='jaeger.api_v2.SpanRef.trace_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000\332\336\037\007TraceID\342\336\037\007TraceID'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='span_id', full_name='jaeger.api_v2.SpanRef.span_id', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000\332\336\037\006SpanID\342\336\037\006SpanID'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='ref_type', full_name='jaeger.api_v2.SpanRef.ref_type', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=392, + serialized_end=536, +) + + +_PROCESS = _descriptor.Descriptor( + name='Process', + full_name='jaeger.api_v2.Process', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='service_name', full_name='jaeger.api_v2.Process.service_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='tags', full_name='jaeger.api_v2.Process.tags', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000'), file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=538, + serialized_end=614, +) + + +_SPAN = _descriptor.Descriptor( + name='Span', + full_name='jaeger.api_v2.Span', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='trace_id', full_name='jaeger.api_v2.Span.trace_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000\332\336\037\007TraceID\342\336\037\007TraceID'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='span_id', full_name='jaeger.api_v2.Span.span_id', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000\332\336\037\006SpanID\342\336\037\006SpanID'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='operation_name', full_name='jaeger.api_v2.Span.operation_name', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='references', full_name='jaeger.api_v2.Span.references', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='flags', full_name='jaeger.api_v2.Span.flags', index=4, + number=5, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000\332\336\037\005Flags'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='start_time', full_name='jaeger.api_v2.Span.start_time', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\220\337\037\001\310\336\037\000'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='duration', full_name='jaeger.api_v2.Span.duration', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\230\337\037\001\310\336\037\000'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='tags', full_name='jaeger.api_v2.Span.tags', index=7, + number=8, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='logs', full_name='jaeger.api_v2.Span.logs', index=8, + number=9, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='process', full_name='jaeger.api_v2.Span.process', index=9, + number=10, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='process_id', full_name='jaeger.api_v2.Span.process_id', index=10, + number=11, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\342\336\037\tProcessID'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='warnings', full_name='jaeger.api_v2.Span.warnings', index=11, + number=12, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=617, + serialized_end=1108, +) + + +_TRACE_PROCESSMAPPING = _descriptor.Descriptor( + name='ProcessMapping', + full_name='jaeger.api_v2.Trace.ProcessMapping', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='process_id', full_name='jaeger.api_v2.Trace.ProcessMapping.process_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\342\336\037\tProcessID'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='process', full_name='jaeger.api_v2.Trace.ProcessMapping.process', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000'), file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1238, + serialized_end=1336, +) + +_TRACE = _descriptor.Descriptor( + name='Trace', + full_name='jaeger.api_v2.Trace', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='spans', full_name='jaeger.api_v2.Trace.spans', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='process_map', full_name='jaeger.api_v2.Trace.process_map', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\000'), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='warnings', full_name='jaeger.api_v2.Trace.warnings', index=2, + number=3, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_TRACE_PROCESSMAPPING, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1111, + serialized_end=1336, +) + + +_BATCH = _descriptor.Descriptor( + name='Batch', + full_name='jaeger.api_v2.Batch', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='spans', full_name='jaeger.api_v2.Batch.spans', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='process', full_name='jaeger.api_v2.Batch.process', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=_b('\310\336\037\001'), file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1338, + serialized_end=1428, +) + + +_DEPENDENCYLINK = _descriptor.Descriptor( + name='DependencyLink', + full_name='jaeger.api_v2.DependencyLink', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='parent', full_name='jaeger.api_v2.DependencyLink.parent', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='child', full_name='jaeger.api_v2.DependencyLink.child', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='call_count', full_name='jaeger.api_v2.DependencyLink.call_count', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='source', full_name='jaeger.api_v2.DependencyLink.source', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1430, + serialized_end=1513, +) + +_KEYVALUE.fields_by_name['v_type'].enum_type = _VALUETYPE +_LOG.fields_by_name['timestamp'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOG.fields_by_name['fields'].message_type = _KEYVALUE +_SPANREF.fields_by_name['ref_type'].enum_type = _SPANREFTYPE +_PROCESS.fields_by_name['tags'].message_type = _KEYVALUE +_SPAN.fields_by_name['references'].message_type = _SPANREF +_SPAN.fields_by_name['start_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_SPAN.fields_by_name['duration'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_SPAN.fields_by_name['tags'].message_type = _KEYVALUE +_SPAN.fields_by_name['logs'].message_type = _LOG +_SPAN.fields_by_name['process'].message_type = _PROCESS +_TRACE_PROCESSMAPPING.fields_by_name['process'].message_type = _PROCESS +_TRACE_PROCESSMAPPING.containing_type = _TRACE +_TRACE.fields_by_name['spans'].message_type = _SPAN +_TRACE.fields_by_name['process_map'].message_type = _TRACE_PROCESSMAPPING +_BATCH.fields_by_name['spans'].message_type = _SPAN +_BATCH.fields_by_name['process'].message_type = _PROCESS +DESCRIPTOR.message_types_by_name['KeyValue'] = _KEYVALUE +DESCRIPTOR.message_types_by_name['Log'] = _LOG +DESCRIPTOR.message_types_by_name['SpanRef'] = _SPANREF +DESCRIPTOR.message_types_by_name['Process'] = _PROCESS +DESCRIPTOR.message_types_by_name['Span'] = _SPAN +DESCRIPTOR.message_types_by_name['Trace'] = _TRACE +DESCRIPTOR.message_types_by_name['Batch'] = _BATCH +DESCRIPTOR.message_types_by_name['DependencyLink'] = _DEPENDENCYLINK +DESCRIPTOR.enum_types_by_name['ValueType'] = _VALUETYPE +DESCRIPTOR.enum_types_by_name['SpanRefType'] = _SPANREFTYPE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +KeyValue = _reflection.GeneratedProtocolMessageType('KeyValue', (_message.Message,), { + 'DESCRIPTOR' : _KEYVALUE, + '__module__' : 'model_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.KeyValue) + }) +_sym_db.RegisterMessage(KeyValue) + +Log = _reflection.GeneratedProtocolMessageType('Log', (_message.Message,), { + 'DESCRIPTOR' : _LOG, + '__module__' : 'model_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.Log) + }) +_sym_db.RegisterMessage(Log) + +SpanRef = _reflection.GeneratedProtocolMessageType('SpanRef', (_message.Message,), { + 'DESCRIPTOR' : _SPANREF, + '__module__' : 'model_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.SpanRef) + }) +_sym_db.RegisterMessage(SpanRef) + +Process = _reflection.GeneratedProtocolMessageType('Process', (_message.Message,), { + 'DESCRIPTOR' : _PROCESS, + '__module__' : 'model_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.Process) + }) +_sym_db.RegisterMessage(Process) + +Span = _reflection.GeneratedProtocolMessageType('Span', (_message.Message,), { + 'DESCRIPTOR' : _SPAN, + '__module__' : 'model_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.Span) + }) +_sym_db.RegisterMessage(Span) + +Trace = _reflection.GeneratedProtocolMessageType('Trace', (_message.Message,), { + + 'ProcessMapping' : _reflection.GeneratedProtocolMessageType('ProcessMapping', (_message.Message,), { + 'DESCRIPTOR' : _TRACE_PROCESSMAPPING, + '__module__' : 'model_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.Trace.ProcessMapping) + }) + , + 'DESCRIPTOR' : _TRACE, + '__module__' : 'model_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.Trace) + }) +_sym_db.RegisterMessage(Trace) +_sym_db.RegisterMessage(Trace.ProcessMapping) + +Batch = _reflection.GeneratedProtocolMessageType('Batch', (_message.Message,), { + 'DESCRIPTOR' : _BATCH, + '__module__' : 'model_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.Batch) + }) +_sym_db.RegisterMessage(Batch) + +DependencyLink = _reflection.GeneratedProtocolMessageType('DependencyLink', (_message.Message,), { + 'DESCRIPTOR' : _DEPENDENCYLINK, + '__module__' : 'model_pb2' + # @@protoc_insertion_point(class_scope:jaeger.api_v2.DependencyLink) + }) +_sym_db.RegisterMessage(DependencyLink) + + +DESCRIPTOR._options = None +_KEYVALUE._options = None +_LOG.fields_by_name['timestamp']._options = None +_LOG.fields_by_name['fields']._options = None +_SPANREF.fields_by_name['trace_id']._options = None +_SPANREF.fields_by_name['span_id']._options = None +_PROCESS.fields_by_name['tags']._options = None +_SPAN.fields_by_name['trace_id']._options = None +_SPAN.fields_by_name['span_id']._options = None +_SPAN.fields_by_name['references']._options = None +_SPAN.fields_by_name['flags']._options = None +_SPAN.fields_by_name['start_time']._options = None +_SPAN.fields_by_name['duration']._options = None +_SPAN.fields_by_name['tags']._options = None +_SPAN.fields_by_name['logs']._options = None +_SPAN.fields_by_name['process_id']._options = None +_TRACE_PROCESSMAPPING.fields_by_name['process_id']._options = None +_TRACE_PROCESSMAPPING.fields_by_name['process']._options = None +_TRACE.fields_by_name['process_map']._options = None +_BATCH.fields_by_name['process']._options = None +# @@protoc_insertion_point(module_scope) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/protoc_gen_swagger/options/annotations_pb2.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/protoc_gen_swagger/options/annotations_pb2.py new file mode 100644 index 00000000000..42bc642368f --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/protoc_gen_swagger/options/annotations_pb2.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protoc-gen-swagger/options/annotations.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 +from protoc_gen_swagger.options import openapiv2_pb2 as protoc__gen__swagger_dot_options_dot_openapiv2__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='protoc-gen-swagger/options/annotations.proto', + package='grpc.gateway.protoc_gen_swagger.options', + syntax='proto3', + serialized_options=_b('ZAgithub.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options'), + serialized_pb=_b('\n,protoc-gen-swagger/options/annotations.proto\x12\'grpc.gateway.protoc_gen_swagger.options\x1a google/protobuf/descriptor.proto\x1a*protoc-gen-swagger/options/openapiv2.proto:j\n\x11openapiv2_swagger\x12\x1c.google.protobuf.FileOptions\x18\x92\x08 \x01(\x0b\x32\x30.grpc.gateway.protoc_gen_swagger.options.Swagger:p\n\x13openapiv2_operation\x12\x1e.google.protobuf.MethodOptions\x18\x92\x08 \x01(\x0b\x32\x32.grpc.gateway.protoc_gen_swagger.options.Operation:k\n\x10openapiv2_schema\x12\x1f.google.protobuf.MessageOptions\x18\x92\x08 \x01(\x0b\x32/.grpc.gateway.protoc_gen_swagger.options.Schema:e\n\ropenapiv2_tag\x12\x1f.google.protobuf.ServiceOptions\x18\x92\x08 \x01(\x0b\x32,.grpc.gateway.protoc_gen_swagger.options.Tag:l\n\x0fopenapiv2_field\x12\x1d.google.protobuf.FieldOptions\x18\x92\x08 \x01(\x0b\x32\x33.grpc.gateway.protoc_gen_swagger.options.JSONSchemaBCZAgithub.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/optionsb\x06proto3') + , + dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,protoc__gen__swagger_dot_options_dot_openapiv2__pb2.DESCRIPTOR,]) + + +OPENAPIV2_SWAGGER_FIELD_NUMBER = 1042 +openapiv2_swagger = _descriptor.FieldDescriptor( + name='openapiv2_swagger', full_name='grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger', index=0, + number=1042, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +OPENAPIV2_OPERATION_FIELD_NUMBER = 1042 +openapiv2_operation = _descriptor.FieldDescriptor( + name='openapiv2_operation', full_name='grpc.gateway.protoc_gen_swagger.options.openapiv2_operation', index=1, + number=1042, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +OPENAPIV2_SCHEMA_FIELD_NUMBER = 1042 +openapiv2_schema = _descriptor.FieldDescriptor( + name='openapiv2_schema', full_name='grpc.gateway.protoc_gen_swagger.options.openapiv2_schema', index=2, + number=1042, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +OPENAPIV2_TAG_FIELD_NUMBER = 1042 +openapiv2_tag = _descriptor.FieldDescriptor( + name='openapiv2_tag', full_name='grpc.gateway.protoc_gen_swagger.options.openapiv2_tag', index=3, + number=1042, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) +OPENAPIV2_FIELD_FIELD_NUMBER = 1042 +openapiv2_field = _descriptor.FieldDescriptor( + name='openapiv2_field', full_name='grpc.gateway.protoc_gen_swagger.options.openapiv2_field', index=4, + number=1042, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + serialized_options=None, file=DESCRIPTOR) + +DESCRIPTOR.extensions_by_name['openapiv2_swagger'] = openapiv2_swagger +DESCRIPTOR.extensions_by_name['openapiv2_operation'] = openapiv2_operation +DESCRIPTOR.extensions_by_name['openapiv2_schema'] = openapiv2_schema +DESCRIPTOR.extensions_by_name['openapiv2_tag'] = openapiv2_tag +DESCRIPTOR.extensions_by_name['openapiv2_field'] = openapiv2_field +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +openapiv2_swagger.message_type = protoc__gen__swagger_dot_options_dot_openapiv2__pb2._SWAGGER +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(openapiv2_swagger) +openapiv2_operation.message_type = protoc__gen__swagger_dot_options_dot_openapiv2__pb2._OPERATION +google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(openapiv2_operation) +openapiv2_schema.message_type = protoc__gen__swagger_dot_options_dot_openapiv2__pb2._SCHEMA +google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(openapiv2_schema) +openapiv2_tag.message_type = protoc__gen__swagger_dot_options_dot_openapiv2__pb2._TAG +google_dot_protobuf_dot_descriptor__pb2.ServiceOptions.RegisterExtension(openapiv2_tag) +openapiv2_field.message_type = protoc__gen__swagger_dot_options_dot_openapiv2__pb2._JSONSCHEMA +google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(openapiv2_field) + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/protoc_gen_swagger/options/openapiv2_pb2.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/protoc_gen_swagger/options/openapiv2_pb2.py new file mode 100644 index 00000000000..c2e7aa0ba10 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/protoc_gen_swagger/options/openapiv2_pb2.py @@ -0,0 +1,1777 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protoc-gen-swagger/options/openapiv2.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='protoc-gen-swagger/options/openapiv2.proto', + package='grpc.gateway.protoc_gen_swagger.options', + syntax='proto3', + serialized_options=_b('ZAgithub.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options'), + serialized_pb=_b('\n*protoc-gen-swagger/options/openapiv2.proto\x12\'grpc.gateway.protoc_gen_swagger.options\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa0\x07\n\x07Swagger\x12\x0f\n\x07swagger\x18\x01 \x01(\t\x12;\n\x04info\x18\x02 \x01(\x0b\x32-.grpc.gateway.protoc_gen_swagger.options.Info\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x11\n\tbase_path\x18\x04 \x01(\t\x12O\n\x07schemes\x18\x05 \x03(\x0e\x32>.grpc.gateway.protoc_gen_swagger.options.Swagger.SwaggerScheme\x12\x10\n\x08\x63onsumes\x18\x06 \x03(\t\x12\x10\n\x08produces\x18\x07 \x03(\t\x12R\n\tresponses\x18\n \x03(\x0b\x32?.grpc.gateway.protoc_gen_swagger.options.Swagger.ResponsesEntry\x12Z\n\x14security_definitions\x18\x0b \x01(\x0b\x32<.grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions\x12N\n\x08security\x18\x0c \x03(\x0b\x32<.grpc.gateway.protoc_gen_swagger.options.SecurityRequirement\x12U\n\rexternal_docs\x18\x0e \x01(\x0b\x32>.grpc.gateway.protoc_gen_swagger.options.ExternalDocumentation\x12T\n\nextensions\x18\x0f \x03(\x0b\x32@.grpc.gateway.protoc_gen_swagger.options.Swagger.ExtensionsEntry\x1a\x63\n\x0eResponsesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_swagger.options.Response:\x02\x38\x01\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"B\n\rSwaggerScheme\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\x12\x06\n\x02WS\x10\x03\x12\x07\n\x03WSS\x10\x04J\x04\x08\x08\x10\tJ\x04\x08\t\x10\nJ\x04\x08\r\x10\x0e\"\xa9\x05\n\tOperation\x12\x0c\n\x04tags\x18\x01 \x03(\t\x12\x0f\n\x07summary\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12U\n\rexternal_docs\x18\x04 \x01(\x0b\x32>.grpc.gateway.protoc_gen_swagger.options.ExternalDocumentation\x12\x14\n\x0coperation_id\x18\x05 \x01(\t\x12\x10\n\x08\x63onsumes\x18\x06 \x03(\t\x12\x10\n\x08produces\x18\x07 \x03(\t\x12T\n\tresponses\x18\t \x03(\x0b\x32\x41.grpc.gateway.protoc_gen_swagger.options.Operation.ResponsesEntry\x12\x0f\n\x07schemes\x18\n \x03(\t\x12\x12\n\ndeprecated\x18\x0b \x01(\x08\x12N\n\x08security\x18\x0c \x03(\x0b\x32<.grpc.gateway.protoc_gen_swagger.options.SecurityRequirement\x12V\n\nextensions\x18\r \x03(\x0b\x32\x42.grpc.gateway.protoc_gen_swagger.options.Operation.ExtensionsEntry\x1a\x63\n\x0eResponsesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_swagger.options.Response:\x02\x38\x01\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01J\x04\x08\x08\x10\t\"\x8e\x02\n\x08Response\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12?\n\x06schema\x18\x02 \x01(\x0b\x32/.grpc.gateway.protoc_gen_swagger.options.Schema\x12U\n\nextensions\x18\x05 \x03(\x0b\x32\x41.grpc.gateway.protoc_gen_swagger.options.Response.ExtensionsEntry\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05\"\xf9\x02\n\x04Info\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x18\n\x10terms_of_service\x18\x03 \x01(\t\x12\x41\n\x07\x63ontact\x18\x04 \x01(\x0b\x32\x30.grpc.gateway.protoc_gen_swagger.options.Contact\x12\x41\n\x07license\x18\x05 \x01(\x0b\x32\x30.grpc.gateway.protoc_gen_swagger.options.License\x12\x0f\n\x07version\x18\x06 \x01(\t\x12Q\n\nextensions\x18\x07 \x03(\x0b\x32=.grpc.gateway.protoc_gen_swagger.options.Info.ExtensionsEntry\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"3\n\x07\x43ontact\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\r\n\x05\x65mail\x18\x03 \x01(\t\"$\n\x07License\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"9\n\x15\x45xternalDocumentation\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"\x80\x02\n\x06Schema\x12H\n\x0bjson_schema\x18\x01 \x01(\x0b\x32\x33.grpc.gateway.protoc_gen_swagger.options.JSONSchema\x12\x15\n\rdiscriminator\x18\x02 \x01(\t\x12\x11\n\tread_only\x18\x03 \x01(\x08\x12U\n\rexternal_docs\x18\x05 \x01(\x0b\x32>.grpc.gateway.protoc_gen_swagger.options.ExternalDocumentation\x12%\n\x07\x65xample\x18\x06 \x01(\x0b\x32\x14.google.protobuf.AnyJ\x04\x08\x04\x10\x05\"\xba\x05\n\nJSONSchema\x12\x0b\n\x03ref\x18\x03 \x01(\t\x12\r\n\x05title\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x07 \x01(\t\x12\x11\n\tread_only\x18\x08 \x01(\x08\x12\x13\n\x0bmultiple_of\x18\n \x01(\x01\x12\x0f\n\x07maximum\x18\x0b \x01(\x01\x12\x19\n\x11\x65xclusive_maximum\x18\x0c \x01(\x08\x12\x0f\n\x07minimum\x18\r \x01(\x01\x12\x19\n\x11\x65xclusive_minimum\x18\x0e \x01(\x08\x12\x12\n\nmax_length\x18\x0f \x01(\x04\x12\x12\n\nmin_length\x18\x10 \x01(\x04\x12\x0f\n\x07pattern\x18\x11 \x01(\t\x12\x11\n\tmax_items\x18\x14 \x01(\x04\x12\x11\n\tmin_items\x18\x15 \x01(\x04\x12\x14\n\x0cunique_items\x18\x16 \x01(\x08\x12\x16\n\x0emax_properties\x18\x18 \x01(\x04\x12\x16\n\x0emin_properties\x18\x19 \x01(\x04\x12\x10\n\x08required\x18\x1a \x03(\t\x12\r\n\x05\x61rray\x18\" \x03(\t\x12W\n\x04type\x18# \x03(\x0e\x32I.grpc.gateway.protoc_gen_swagger.options.JSONSchema.JSONSchemaSimpleTypes\"w\n\x15JSONSchemaSimpleTypes\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x41RRAY\x10\x01\x12\x0b\n\x07\x42OOLEAN\x10\x02\x12\x0b\n\x07INTEGER\x10\x03\x12\x08\n\x04NULL\x10\x04\x12\n\n\x06NUMBER\x10\x05\x12\n\n\x06OBJECT\x10\x06\x12\n\n\x06STRING\x10\x07J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x04\x10\x05J\x04\x08\t\x10\nJ\x04\x08\x12\x10\x13J\x04\x08\x13\x10\x14J\x04\x08\x17\x10\x18J\x04\x08\x1b\x10\x1cJ\x04\x08\x1c\x10\x1dJ\x04\x08\x1d\x10\x1eJ\x04\x08\x1e\x10\"J\x04\x08$\x10*J\x04\x08*\x10+J\x04\x08+\x10.\"w\n\x03Tag\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12U\n\rexternal_docs\x18\x03 \x01(\x0b\x32>.grpc.gateway.protoc_gen_swagger.options.ExternalDocumentationJ\x04\x08\x01\x10\x02\"\xdd\x01\n\x13SecurityDefinitions\x12\\\n\x08security\x18\x01 \x03(\x0b\x32J.grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions.SecurityEntry\x1ah\n\rSecurityEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.grpc.gateway.protoc_gen_swagger.options.SecurityScheme:\x02\x38\x01\"\x96\x06\n\x0eSecurityScheme\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.grpc.gateway.protoc_gen_swagger.options.SecurityScheme.Type\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x46\n\x02in\x18\x04 \x01(\x0e\x32:.grpc.gateway.protoc_gen_swagger.options.SecurityScheme.In\x12J\n\x04\x66low\x18\x05 \x01(\x0e\x32<.grpc.gateway.protoc_gen_swagger.options.SecurityScheme.Flow\x12\x19\n\x11\x61uthorization_url\x18\x06 \x01(\t\x12\x11\n\ttoken_url\x18\x07 \x01(\t\x12?\n\x06scopes\x18\x08 \x01(\x0b\x32/.grpc.gateway.protoc_gen_swagger.options.Scopes\x12[\n\nextensions\x18\t \x03(\x0b\x32G.grpc.gateway.protoc_gen_swagger.options.SecurityScheme.ExtensionsEntry\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"K\n\x04Type\x12\x10\n\x0cTYPE_INVALID\x10\x00\x12\x0e\n\nTYPE_BASIC\x10\x01\x12\x10\n\x0cTYPE_API_KEY\x10\x02\x12\x0f\n\x0bTYPE_OAUTH2\x10\x03\"1\n\x02In\x12\x0e\n\nIN_INVALID\x10\x00\x12\x0c\n\x08IN_QUERY\x10\x01\x12\r\n\tIN_HEADER\x10\x02\"j\n\x04\x46low\x12\x10\n\x0c\x46LOW_INVALID\x10\x00\x12\x11\n\rFLOW_IMPLICIT\x10\x01\x12\x11\n\rFLOW_PASSWORD\x10\x02\x12\x14\n\x10\x46LOW_APPLICATION\x10\x03\x12\x14\n\x10\x46LOW_ACCESS_CODE\x10\x04\"\xc9\x02\n\x13SecurityRequirement\x12s\n\x14security_requirement\x18\x01 \x03(\x0b\x32U.grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementEntry\x1a)\n\x18SecurityRequirementValue\x12\r\n\x05scope\x18\x01 \x03(\t\x1a\x91\x01\n\x18SecurityRequirementEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x64\n\x05value\x18\x02 \x01(\x0b\x32U.grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementValue:\x02\x38\x01\"\x81\x01\n\x06Scopes\x12I\n\x05scope\x18\x01 \x03(\x0b\x32:.grpc.gateway.protoc_gen_swagger.options.Scopes.ScopeEntry\x1a,\n\nScopeEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x43ZAgithub.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/optionsb\x06proto3') + , + dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) + + + +_SWAGGER_SWAGGERSCHEME = _descriptor.EnumDescriptor( + name='SwaggerScheme', + full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.SwaggerScheme', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='UNKNOWN', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='HTTP', index=1, number=1, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='HTTPS', index=2, number=2, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='WS', index=3, number=3, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='WSS', index=4, number=4, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=989, + serialized_end=1055, +) +_sym_db.RegisterEnumDescriptor(_SWAGGER_SWAGGERSCHEME) + +_JSONSCHEMA_JSONSCHEMASIMPLETYPES = _descriptor.EnumDescriptor( + name='JSONSchemaSimpleTypes', + full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.JSONSchemaSimpleTypes', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='UNKNOWN', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ARRAY', index=1, number=1, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BOOLEAN', index=2, number=2, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='INTEGER', index=3, number=3, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NULL', index=4, number=4, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NUMBER', index=5, number=5, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='OBJECT', index=6, number=6, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='STRING', index=7, number=7, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=3317, + serialized_end=3436, +) +_sym_db.RegisterEnumDescriptor(_JSONSCHEMA_JSONSCHEMASIMPLETYPES) + +_SECURITYSCHEME_TYPE = _descriptor.EnumDescriptor( + name='Type', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.Type', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='TYPE_INVALID', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='TYPE_BASIC', index=1, number=1, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='TYPE_API_KEY', index=2, number=2, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='TYPE_OAUTH2', index=3, number=3, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=4424, + serialized_end=4499, +) +_sym_db.RegisterEnumDescriptor(_SECURITYSCHEME_TYPE) + +_SECURITYSCHEME_IN = _descriptor.EnumDescriptor( + name='In', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.In', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='IN_INVALID', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='IN_QUERY', index=1, number=1, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='IN_HEADER', index=2, number=2, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=4501, + serialized_end=4550, +) +_sym_db.RegisterEnumDescriptor(_SECURITYSCHEME_IN) + +_SECURITYSCHEME_FLOW = _descriptor.EnumDescriptor( + name='Flow', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.Flow', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='FLOW_INVALID', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FLOW_IMPLICIT', index=1, number=1, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FLOW_PASSWORD', index=2, number=2, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FLOW_APPLICATION', index=3, number=3, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FLOW_ACCESS_CODE', index=4, number=4, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=4552, + serialized_end=4658, +) +_sym_db.RegisterEnumDescriptor(_SECURITYSCHEME_FLOW) + + +_SWAGGER_RESPONSESENTRY = _descriptor.Descriptor( + name='ResponsesEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.ResponsesEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.ResponsesEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.ResponsesEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=813, + serialized_end=912, +) + +_SWAGGER_EXTENSIONSENTRY = _descriptor.Descriptor( + name='ExtensionsEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.ExtensionsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.ExtensionsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.ExtensionsEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=914, + serialized_end=987, +) + +_SWAGGER = _descriptor.Descriptor( + name='Swagger', + full_name='grpc.gateway.protoc_gen_swagger.options.Swagger', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='swagger', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.swagger', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='info', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.info', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='host', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.host', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='base_path', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.base_path', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='schemes', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.schemes', index=4, + number=5, type=14, cpp_type=8, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='consumes', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.consumes', index=5, + number=6, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='produces', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.produces', index=6, + number=7, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='responses', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.responses', index=7, + number=10, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='security_definitions', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.security_definitions', index=8, + number=11, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='security', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.security', index=9, + number=12, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='external_docs', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.external_docs', index=10, + number=14, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='extensions', full_name='grpc.gateway.protoc_gen_swagger.options.Swagger.extensions', index=11, + number=15, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_SWAGGER_RESPONSESENTRY, _SWAGGER_EXTENSIONSENTRY, ], + enum_types=[ + _SWAGGER_SWAGGERSCHEME, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=145, + serialized_end=1073, +) + + +_OPERATION_RESPONSESENTRY = _descriptor.Descriptor( + name='ResponsesEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.Operation.ResponsesEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.ResponsesEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.ResponsesEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=813, + serialized_end=912, +) + +_OPERATION_EXTENSIONSENTRY = _descriptor.Descriptor( + name='ExtensionsEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.Operation.ExtensionsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.ExtensionsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.ExtensionsEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=914, + serialized_end=987, +) + +_OPERATION = _descriptor.Descriptor( + name='Operation', + full_name='grpc.gateway.protoc_gen_swagger.options.Operation', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='tags', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.tags', index=0, + number=1, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='summary', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.summary', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='description', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.description', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='external_docs', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.external_docs', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='operation_id', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.operation_id', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='consumes', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.consumes', index=5, + number=6, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='produces', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.produces', index=6, + number=7, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='responses', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.responses', index=7, + number=9, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='schemes', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.schemes', index=8, + number=10, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='deprecated', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.deprecated', index=9, + number=11, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='security', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.security', index=10, + number=12, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='extensions', full_name='grpc.gateway.protoc_gen_swagger.options.Operation.extensions', index=11, + number=13, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_OPERATION_RESPONSESENTRY, _OPERATION_EXTENSIONSENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1076, + serialized_end=1757, +) + + +_RESPONSE_EXTENSIONSENTRY = _descriptor.Descriptor( + name='ExtensionsEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.Response.ExtensionsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.Response.ExtensionsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.Response.ExtensionsEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=914, + serialized_end=987, +) + +_RESPONSE = _descriptor.Descriptor( + name='Response', + full_name='grpc.gateway.protoc_gen_swagger.options.Response', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='description', full_name='grpc.gateway.protoc_gen_swagger.options.Response.description', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='schema', full_name='grpc.gateway.protoc_gen_swagger.options.Response.schema', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='extensions', full_name='grpc.gateway.protoc_gen_swagger.options.Response.extensions', index=2, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_RESPONSE_EXTENSIONSENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1760, + serialized_end=2030, +) + + +_INFO_EXTENSIONSENTRY = _descriptor.Descriptor( + name='ExtensionsEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.Info.ExtensionsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.Info.ExtensionsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.Info.ExtensionsEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=914, + serialized_end=987, +) + +_INFO = _descriptor.Descriptor( + name='Info', + full_name='grpc.gateway.protoc_gen_swagger.options.Info', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='title', full_name='grpc.gateway.protoc_gen_swagger.options.Info.title', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='description', full_name='grpc.gateway.protoc_gen_swagger.options.Info.description', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='terms_of_service', full_name='grpc.gateway.protoc_gen_swagger.options.Info.terms_of_service', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='contact', full_name='grpc.gateway.protoc_gen_swagger.options.Info.contact', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='license', full_name='grpc.gateway.protoc_gen_swagger.options.Info.license', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='version', full_name='grpc.gateway.protoc_gen_swagger.options.Info.version', index=5, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='extensions', full_name='grpc.gateway.protoc_gen_swagger.options.Info.extensions', index=6, + number=7, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_INFO_EXTENSIONSENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2033, + serialized_end=2410, +) + + +_CONTACT = _descriptor.Descriptor( + name='Contact', + full_name='grpc.gateway.protoc_gen_swagger.options.Contact', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='grpc.gateway.protoc_gen_swagger.options.Contact.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='url', full_name='grpc.gateway.protoc_gen_swagger.options.Contact.url', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='email', full_name='grpc.gateway.protoc_gen_swagger.options.Contact.email', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2412, + serialized_end=2463, +) + + +_LICENSE = _descriptor.Descriptor( + name='License', + full_name='grpc.gateway.protoc_gen_swagger.options.License', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='grpc.gateway.protoc_gen_swagger.options.License.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='url', full_name='grpc.gateway.protoc_gen_swagger.options.License.url', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2465, + serialized_end=2501, +) + + +_EXTERNALDOCUMENTATION = _descriptor.Descriptor( + name='ExternalDocumentation', + full_name='grpc.gateway.protoc_gen_swagger.options.ExternalDocumentation', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='description', full_name='grpc.gateway.protoc_gen_swagger.options.ExternalDocumentation.description', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='url', full_name='grpc.gateway.protoc_gen_swagger.options.ExternalDocumentation.url', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2503, + serialized_end=2560, +) + + +_SCHEMA = _descriptor.Descriptor( + name='Schema', + full_name='grpc.gateway.protoc_gen_swagger.options.Schema', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='json_schema', full_name='grpc.gateway.protoc_gen_swagger.options.Schema.json_schema', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='discriminator', full_name='grpc.gateway.protoc_gen_swagger.options.Schema.discriminator', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='read_only', full_name='grpc.gateway.protoc_gen_swagger.options.Schema.read_only', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='external_docs', full_name='grpc.gateway.protoc_gen_swagger.options.Schema.external_docs', index=3, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='example', full_name='grpc.gateway.protoc_gen_swagger.options.Schema.example', index=4, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2563, + serialized_end=2819, +) + + +_JSONSCHEMA = _descriptor.Descriptor( + name='JSONSchema', + full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='ref', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.ref', index=0, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='title', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.title', index=1, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='description', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.description', index=2, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='default', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.default', index=3, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='read_only', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.read_only', index=4, + number=8, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='multiple_of', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.multiple_of', index=5, + number=10, type=1, cpp_type=5, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='maximum', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.maximum', index=6, + number=11, type=1, cpp_type=5, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='exclusive_maximum', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.exclusive_maximum', index=7, + number=12, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='minimum', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.minimum', index=8, + number=13, type=1, cpp_type=5, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='exclusive_minimum', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.exclusive_minimum', index=9, + number=14, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='max_length', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.max_length', index=10, + number=15, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='min_length', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.min_length', index=11, + number=16, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='pattern', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.pattern', index=12, + number=17, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='max_items', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.max_items', index=13, + number=20, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='min_items', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.min_items', index=14, + number=21, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='unique_items', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.unique_items', index=15, + number=22, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='max_properties', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.max_properties', index=16, + number=24, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='min_properties', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.min_properties', index=17, + number=25, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='required', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.required', index=18, + number=26, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='array', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.array', index=19, + number=34, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='type', full_name='grpc.gateway.protoc_gen_swagger.options.JSONSchema.type', index=20, + number=35, type=14, cpp_type=8, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _JSONSCHEMA_JSONSCHEMASIMPLETYPES, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2822, + serialized_end=3520, +) + + +_TAG = _descriptor.Descriptor( + name='Tag', + full_name='grpc.gateway.protoc_gen_swagger.options.Tag', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='description', full_name='grpc.gateway.protoc_gen_swagger.options.Tag.description', index=0, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='external_docs', full_name='grpc.gateway.protoc_gen_swagger.options.Tag.external_docs', index=1, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3522, + serialized_end=3641, +) + + +_SECURITYDEFINITIONS_SECURITYENTRY = _descriptor.Descriptor( + name='SecurityEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions.SecurityEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions.SecurityEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions.SecurityEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3761, + serialized_end=3865, +) + +_SECURITYDEFINITIONS = _descriptor.Descriptor( + name='SecurityDefinitions', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='security', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions.security', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_SECURITYDEFINITIONS_SECURITYENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3644, + serialized_end=3865, +) + + +_SECURITYSCHEME_EXTENSIONSENTRY = _descriptor.Descriptor( + name='ExtensionsEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.ExtensionsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.ExtensionsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.ExtensionsEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=914, + serialized_end=987, +) + +_SECURITYSCHEME = _descriptor.Descriptor( + name='SecurityScheme', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.type', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='description', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.description', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='name', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.name', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='in', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.in', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='flow', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.flow', index=4, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='authorization_url', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.authorization_url', index=5, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='token_url', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.token_url', index=6, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='scopes', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.scopes', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='extensions', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityScheme.extensions', index=8, + number=9, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_SECURITYSCHEME_EXTENSIONSENTRY, ], + enum_types=[ + _SECURITYSCHEME_TYPE, + _SECURITYSCHEME_IN, + _SECURITYSCHEME_FLOW, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3868, + serialized_end=4658, +) + + +_SECURITYREQUIREMENT_SECURITYREQUIREMENTVALUE = _descriptor.Descriptor( + name='SecurityRequirementValue', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementValue', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='scope', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementValue.scope', index=0, + number=1, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4801, + serialized_end=4842, +) + +_SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY = _descriptor.Descriptor( + name='SecurityRequirementEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4845, + serialized_end=4990, +) + +_SECURITYREQUIREMENT = _descriptor.Descriptor( + name='SecurityRequirement', + full_name='grpc.gateway.protoc_gen_swagger.options.SecurityRequirement', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='security_requirement', full_name='grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.security_requirement', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_SECURITYREQUIREMENT_SECURITYREQUIREMENTVALUE, _SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4661, + serialized_end=4990, +) + + +_SCOPES_SCOPEENTRY = _descriptor.Descriptor( + name='ScopeEntry', + full_name='grpc.gateway.protoc_gen_swagger.options.Scopes.ScopeEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='grpc.gateway.protoc_gen_swagger.options.Scopes.ScopeEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='grpc.gateway.protoc_gen_swagger.options.Scopes.ScopeEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=5078, + serialized_end=5122, +) + +_SCOPES = _descriptor.Descriptor( + name='Scopes', + full_name='grpc.gateway.protoc_gen_swagger.options.Scopes', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='scope', full_name='grpc.gateway.protoc_gen_swagger.options.Scopes.scope', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_SCOPES_SCOPEENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4993, + serialized_end=5122, +) + +_SWAGGER_RESPONSESENTRY.fields_by_name['value'].message_type = _RESPONSE +_SWAGGER_RESPONSESENTRY.containing_type = _SWAGGER +_SWAGGER_EXTENSIONSENTRY.fields_by_name['value'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE +_SWAGGER_EXTENSIONSENTRY.containing_type = _SWAGGER +_SWAGGER.fields_by_name['info'].message_type = _INFO +_SWAGGER.fields_by_name['schemes'].enum_type = _SWAGGER_SWAGGERSCHEME +_SWAGGER.fields_by_name['responses'].message_type = _SWAGGER_RESPONSESENTRY +_SWAGGER.fields_by_name['security_definitions'].message_type = _SECURITYDEFINITIONS +_SWAGGER.fields_by_name['security'].message_type = _SECURITYREQUIREMENT +_SWAGGER.fields_by_name['external_docs'].message_type = _EXTERNALDOCUMENTATION +_SWAGGER.fields_by_name['extensions'].message_type = _SWAGGER_EXTENSIONSENTRY +_SWAGGER_SWAGGERSCHEME.containing_type = _SWAGGER +_OPERATION_RESPONSESENTRY.fields_by_name['value'].message_type = _RESPONSE +_OPERATION_RESPONSESENTRY.containing_type = _OPERATION +_OPERATION_EXTENSIONSENTRY.fields_by_name['value'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE +_OPERATION_EXTENSIONSENTRY.containing_type = _OPERATION +_OPERATION.fields_by_name['external_docs'].message_type = _EXTERNALDOCUMENTATION +_OPERATION.fields_by_name['responses'].message_type = _OPERATION_RESPONSESENTRY +_OPERATION.fields_by_name['security'].message_type = _SECURITYREQUIREMENT +_OPERATION.fields_by_name['extensions'].message_type = _OPERATION_EXTENSIONSENTRY +_RESPONSE_EXTENSIONSENTRY.fields_by_name['value'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE +_RESPONSE_EXTENSIONSENTRY.containing_type = _RESPONSE +_RESPONSE.fields_by_name['schema'].message_type = _SCHEMA +_RESPONSE.fields_by_name['extensions'].message_type = _RESPONSE_EXTENSIONSENTRY +_INFO_EXTENSIONSENTRY.fields_by_name['value'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE +_INFO_EXTENSIONSENTRY.containing_type = _INFO +_INFO.fields_by_name['contact'].message_type = _CONTACT +_INFO.fields_by_name['license'].message_type = _LICENSE +_INFO.fields_by_name['extensions'].message_type = _INFO_EXTENSIONSENTRY +_SCHEMA.fields_by_name['json_schema'].message_type = _JSONSCHEMA +_SCHEMA.fields_by_name['external_docs'].message_type = _EXTERNALDOCUMENTATION +_SCHEMA.fields_by_name['example'].message_type = google_dot_protobuf_dot_any__pb2._ANY +_JSONSCHEMA.fields_by_name['type'].enum_type = _JSONSCHEMA_JSONSCHEMASIMPLETYPES +_JSONSCHEMA_JSONSCHEMASIMPLETYPES.containing_type = _JSONSCHEMA +_TAG.fields_by_name['external_docs'].message_type = _EXTERNALDOCUMENTATION +_SECURITYDEFINITIONS_SECURITYENTRY.fields_by_name['value'].message_type = _SECURITYSCHEME +_SECURITYDEFINITIONS_SECURITYENTRY.containing_type = _SECURITYDEFINITIONS +_SECURITYDEFINITIONS.fields_by_name['security'].message_type = _SECURITYDEFINITIONS_SECURITYENTRY +_SECURITYSCHEME_EXTENSIONSENTRY.fields_by_name['value'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE +_SECURITYSCHEME_EXTENSIONSENTRY.containing_type = _SECURITYSCHEME +_SECURITYSCHEME.fields_by_name['type'].enum_type = _SECURITYSCHEME_TYPE +_SECURITYSCHEME.fields_by_name['in'].enum_type = _SECURITYSCHEME_IN +_SECURITYSCHEME.fields_by_name['flow'].enum_type = _SECURITYSCHEME_FLOW +_SECURITYSCHEME.fields_by_name['scopes'].message_type = _SCOPES +_SECURITYSCHEME.fields_by_name['extensions'].message_type = _SECURITYSCHEME_EXTENSIONSENTRY +_SECURITYSCHEME_TYPE.containing_type = _SECURITYSCHEME +_SECURITYSCHEME_IN.containing_type = _SECURITYSCHEME +_SECURITYSCHEME_FLOW.containing_type = _SECURITYSCHEME +_SECURITYREQUIREMENT_SECURITYREQUIREMENTVALUE.containing_type = _SECURITYREQUIREMENT +_SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY.fields_by_name['value'].message_type = _SECURITYREQUIREMENT_SECURITYREQUIREMENTVALUE +_SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY.containing_type = _SECURITYREQUIREMENT +_SECURITYREQUIREMENT.fields_by_name['security_requirement'].message_type = _SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY +_SCOPES_SCOPEENTRY.containing_type = _SCOPES +_SCOPES.fields_by_name['scope'].message_type = _SCOPES_SCOPEENTRY +DESCRIPTOR.message_types_by_name['Swagger'] = _SWAGGER +DESCRIPTOR.message_types_by_name['Operation'] = _OPERATION +DESCRIPTOR.message_types_by_name['Response'] = _RESPONSE +DESCRIPTOR.message_types_by_name['Info'] = _INFO +DESCRIPTOR.message_types_by_name['Contact'] = _CONTACT +DESCRIPTOR.message_types_by_name['License'] = _LICENSE +DESCRIPTOR.message_types_by_name['ExternalDocumentation'] = _EXTERNALDOCUMENTATION +DESCRIPTOR.message_types_by_name['Schema'] = _SCHEMA +DESCRIPTOR.message_types_by_name['JSONSchema'] = _JSONSCHEMA +DESCRIPTOR.message_types_by_name['Tag'] = _TAG +DESCRIPTOR.message_types_by_name['SecurityDefinitions'] = _SECURITYDEFINITIONS +DESCRIPTOR.message_types_by_name['SecurityScheme'] = _SECURITYSCHEME +DESCRIPTOR.message_types_by_name['SecurityRequirement'] = _SECURITYREQUIREMENT +DESCRIPTOR.message_types_by_name['Scopes'] = _SCOPES +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Swagger = _reflection.GeneratedProtocolMessageType('Swagger', (_message.Message,), { + + 'ResponsesEntry' : _reflection.GeneratedProtocolMessageType('ResponsesEntry', (_message.Message,), { + 'DESCRIPTOR' : _SWAGGER_RESPONSESENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Swagger.ResponsesEntry) + }) + , + + 'ExtensionsEntry' : _reflection.GeneratedProtocolMessageType('ExtensionsEntry', (_message.Message,), { + 'DESCRIPTOR' : _SWAGGER_EXTENSIONSENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Swagger.ExtensionsEntry) + }) + , + 'DESCRIPTOR' : _SWAGGER, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Swagger) + }) +_sym_db.RegisterMessage(Swagger) +_sym_db.RegisterMessage(Swagger.ResponsesEntry) +_sym_db.RegisterMessage(Swagger.ExtensionsEntry) + +Operation = _reflection.GeneratedProtocolMessageType('Operation', (_message.Message,), { + + 'ResponsesEntry' : _reflection.GeneratedProtocolMessageType('ResponsesEntry', (_message.Message,), { + 'DESCRIPTOR' : _OPERATION_RESPONSESENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Operation.ResponsesEntry) + }) + , + + 'ExtensionsEntry' : _reflection.GeneratedProtocolMessageType('ExtensionsEntry', (_message.Message,), { + 'DESCRIPTOR' : _OPERATION_EXTENSIONSENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Operation.ExtensionsEntry) + }) + , + 'DESCRIPTOR' : _OPERATION, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Operation) + }) +_sym_db.RegisterMessage(Operation) +_sym_db.RegisterMessage(Operation.ResponsesEntry) +_sym_db.RegisterMessage(Operation.ExtensionsEntry) + +Response = _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), { + + 'ExtensionsEntry' : _reflection.GeneratedProtocolMessageType('ExtensionsEntry', (_message.Message,), { + 'DESCRIPTOR' : _RESPONSE_EXTENSIONSENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Response.ExtensionsEntry) + }) + , + 'DESCRIPTOR' : _RESPONSE, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Response) + }) +_sym_db.RegisterMessage(Response) +_sym_db.RegisterMessage(Response.ExtensionsEntry) + +Info = _reflection.GeneratedProtocolMessageType('Info', (_message.Message,), { + + 'ExtensionsEntry' : _reflection.GeneratedProtocolMessageType('ExtensionsEntry', (_message.Message,), { + 'DESCRIPTOR' : _INFO_EXTENSIONSENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Info.ExtensionsEntry) + }) + , + 'DESCRIPTOR' : _INFO, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Info) + }) +_sym_db.RegisterMessage(Info) +_sym_db.RegisterMessage(Info.ExtensionsEntry) + +Contact = _reflection.GeneratedProtocolMessageType('Contact', (_message.Message,), { + 'DESCRIPTOR' : _CONTACT, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Contact) + }) +_sym_db.RegisterMessage(Contact) + +License = _reflection.GeneratedProtocolMessageType('License', (_message.Message,), { + 'DESCRIPTOR' : _LICENSE, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.License) + }) +_sym_db.RegisterMessage(License) + +ExternalDocumentation = _reflection.GeneratedProtocolMessageType('ExternalDocumentation', (_message.Message,), { + 'DESCRIPTOR' : _EXTERNALDOCUMENTATION, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.ExternalDocumentation) + }) +_sym_db.RegisterMessage(ExternalDocumentation) + +Schema = _reflection.GeneratedProtocolMessageType('Schema', (_message.Message,), { + 'DESCRIPTOR' : _SCHEMA, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Schema) + }) +_sym_db.RegisterMessage(Schema) + +JSONSchema = _reflection.GeneratedProtocolMessageType('JSONSchema', (_message.Message,), { + 'DESCRIPTOR' : _JSONSCHEMA, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.JSONSchema) + }) +_sym_db.RegisterMessage(JSONSchema) + +Tag = _reflection.GeneratedProtocolMessageType('Tag', (_message.Message,), { + 'DESCRIPTOR' : _TAG, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Tag) + }) +_sym_db.RegisterMessage(Tag) + +SecurityDefinitions = _reflection.GeneratedProtocolMessageType('SecurityDefinitions', (_message.Message,), { + + 'SecurityEntry' : _reflection.GeneratedProtocolMessageType('SecurityEntry', (_message.Message,), { + 'DESCRIPTOR' : _SECURITYDEFINITIONS_SECURITYENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions.SecurityEntry) + }) + , + 'DESCRIPTOR' : _SECURITYDEFINITIONS, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions) + }) +_sym_db.RegisterMessage(SecurityDefinitions) +_sym_db.RegisterMessage(SecurityDefinitions.SecurityEntry) + +SecurityScheme = _reflection.GeneratedProtocolMessageType('SecurityScheme', (_message.Message,), { + + 'ExtensionsEntry' : _reflection.GeneratedProtocolMessageType('ExtensionsEntry', (_message.Message,), { + 'DESCRIPTOR' : _SECURITYSCHEME_EXTENSIONSENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.SecurityScheme.ExtensionsEntry) + }) + , + 'DESCRIPTOR' : _SECURITYSCHEME, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.SecurityScheme) + }) +_sym_db.RegisterMessage(SecurityScheme) +_sym_db.RegisterMessage(SecurityScheme.ExtensionsEntry) + +SecurityRequirement = _reflection.GeneratedProtocolMessageType('SecurityRequirement', (_message.Message,), { + + 'SecurityRequirementValue' : _reflection.GeneratedProtocolMessageType('SecurityRequirementValue', (_message.Message,), { + 'DESCRIPTOR' : _SECURITYREQUIREMENT_SECURITYREQUIREMENTVALUE, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementValue) + }) + , + + 'SecurityRequirementEntry' : _reflection.GeneratedProtocolMessageType('SecurityRequirementEntry', (_message.Message,), { + 'DESCRIPTOR' : _SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementEntry) + }) + , + 'DESCRIPTOR' : _SECURITYREQUIREMENT, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.SecurityRequirement) + }) +_sym_db.RegisterMessage(SecurityRequirement) +_sym_db.RegisterMessage(SecurityRequirement.SecurityRequirementValue) +_sym_db.RegisterMessage(SecurityRequirement.SecurityRequirementEntry) + +Scopes = _reflection.GeneratedProtocolMessageType('Scopes', (_message.Message,), { + + 'ScopeEntry' : _reflection.GeneratedProtocolMessageType('ScopeEntry', (_message.Message,), { + 'DESCRIPTOR' : _SCOPES_SCOPEENTRY, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Scopes.ScopeEntry) + }) + , + 'DESCRIPTOR' : _SCOPES, + '__module__' : 'protoc_gen_swagger.options.openapiv2_pb2' + # @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_swagger.options.Scopes) + }) +_sym_db.RegisterMessage(Scopes) +_sym_db.RegisterMessage(Scopes.ScopeEntry) + + +DESCRIPTOR._options = None +_SWAGGER_RESPONSESENTRY._options = None +_SWAGGER_EXTENSIONSENTRY._options = None +_OPERATION_RESPONSESENTRY._options = None +_OPERATION_EXTENSIONSENTRY._options = None +_RESPONSE_EXTENSIONSENTRY._options = None +_INFO_EXTENSIONSENTRY._options = None +_SECURITYDEFINITIONS_SECURITYENTRY._options = None +_SECURITYSCHEME_EXTENSIONSENTRY._options = None +_SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY._options = None +_SCOPES_SCOPEENTRY._options = None +# @@protoc_insertion_point(module_scope) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/send/__init__.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/send/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/send/thrift.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/send/thrift.py new file mode 100644 index 00000000000..151e017b457 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/send/thrift.py @@ -0,0 +1,118 @@ +# Copyright The OpenTelemetry Authors +# +# 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. + +import base64 +import logging +import socket + +from thrift.protocol import TBinaryProtocol, TCompactProtocol +from thrift.transport import THttpClient, TTransport + +from opentelemetry.exporter.jaeger.gen.agent import Agent as agent +from opentelemetry.exporter.jaeger.gen.jaeger import Collector as jaeger + +UDP_PACKET_MAX_LENGTH = 65000 + + +logger = logging.getLogger(__name__) + + +class AgentClientUDP: + """Implement a UDP client to agent. + + Args: + host_name: The host name of the Jaeger server. + port: The port of the Jaeger server. + max_packet_size: Maximum size of UDP packet. + client: Class for creating new client objects for agencies. + """ + + def __init__( + self, + host_name, + port, + max_packet_size=UDP_PACKET_MAX_LENGTH, + client=agent.Client, + ): + self.address = (host_name, port) + self.max_packet_size = max_packet_size + self.buffer = TTransport.TMemoryBuffer() + self.client = client( + iprot=TCompactProtocol.TCompactProtocol(trans=self.buffer) + ) + + def emit(self, batch: jaeger.Batch): + """ + Args: + batch: Object to emit Jaeger spans. + """ + + # pylint: disable=protected-access + self.client._seqid = 0 + # truncate and reset the position of BytesIO object + self.buffer._buffer.truncate(0) + self.buffer._buffer.seek(0) + self.client.emitBatch(batch) + buff = self.buffer.getvalue() + if len(buff) > self.max_packet_size: + logger.warning( + "Data exceeds the max UDP packet size; size %r, max %r", + len(buff), + self.max_packet_size, + ) + return + + with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as udp_socket: + udp_socket.sendto(buff, self.address) + + +class Collector: + """Submits collected spans to Thrift HTTP server. + + Args: + thrift_url: URL of the Jaeger HTTP Thrift. + auth: Auth tuple that contains username and password for Basic Auth. + """ + + def __init__(self, thrift_url="", auth=None): + self.thrift_url = thrift_url + self.auth = auth + self.http_transport = THttpClient.THttpClient( + uri_or_host=self.thrift_url + ) + self.protocol = TBinaryProtocol.TBinaryProtocol(self.http_transport) + + # set basic auth header + if auth is not None: + auth_header = "{}:{}".format(*auth) + decoded = base64.b64encode(auth_header.encode()).decode("ascii") + basic_auth = dict(Authorization="Basic {}".format(decoded)) + self.http_transport.setCustomHeaders(basic_auth) + + def submit(self, batch: jaeger.Batch): + """Submits batches to Thrift HTTP Server through Binary Protocol. + + Args: + batch: Object to emit Jaeger spans. + """ + batch.write(self.protocol) + self.http_transport.flush() + code = self.http_transport.code + msg = self.http_transport.message + if code >= 300 or code < 200: + logger.error( + "Traces cannot be uploaded; HTTP status code: %s, message: %s", + code, + msg, + ) diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/translate/__init__.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/translate/__init__.py new file mode 100644 index 00000000000..b840687fbeb --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/translate/__init__.py @@ -0,0 +1,87 @@ +# Copyright The OpenTelemetry Authors +# +# 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. + +import abc + +from opentelemetry.trace import SpanKind + +OTLP_JAEGER_SPAN_KIND = { + SpanKind.CLIENT: "client", + SpanKind.SERVER: "server", + SpanKind.CONSUMER: "consumer", + SpanKind.PRODUCER: "producer", + SpanKind.INTERNAL: "internal", +} + +NAME_KEY = "otel.instrumentation_library.name" +VERSION_KEY = "otel.instrumentation_library.version" + + +def _nsec_to_usec_round(nsec: int) -> int: + """Round nanoseconds to microseconds""" + return (nsec + 500) // 10 ** 3 + + +def _convert_int_to_i64(val): + """Convert integer to signed int64 (i64)""" + if val > 0x7FFFFFFFFFFFFFFF: + val -= 0x10000000000000000 + return val + + +class Translator(abc.ABC): + @abc.abstractmethod + def _translate_span(self, span): + """Translates span to jaeger format. + + Args: + span: span to translate + """ + + @abc.abstractmethod + def _extract_tags(self, span): + """Extracts tags from span and returns list of jaeger Tags. + + Args: + span: span to extract tags + """ + + @abc.abstractmethod + def _extract_refs(self, span): + """Extracts references from span and returns list of jaeger SpanRefs. + + Args: + span: span to extract references + """ + + @abc.abstractmethod + def _extract_logs(self, span): + """Extracts logs from span and returns list of jaeger Logs. + + Args: + span: span to extract logs + """ + + +class Translate: + def __init__(self, spans): + self.spans = spans + + def _translate(self, translator: Translator): + translated_spans = [] + for span in self.spans: + # pylint: disable=protected-access + translated_span = translator._translate_span(span) + translated_spans.append(translated_span) + return translated_spans diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/translate/protobuf.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/translate/protobuf.py new file mode 100644 index 00000000000..f43bdfb599f --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/translate/protobuf.py @@ -0,0 +1,257 @@ +# Copyright The OpenTelemetry Authors +# +# 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. + +from typing import Optional, Sequence + +from google.protobuf.duration_pb2 import Duration +from google.protobuf.timestamp_pb2 import Timestamp + +from opentelemetry.exporter.jaeger.gen import model_pb2 +from opentelemetry.exporter.jaeger.translate import ( + NAME_KEY, + OTLP_JAEGER_SPAN_KIND, + VERSION_KEY, + Translator, +) +from opentelemetry.sdk.trace import Span +from opentelemetry.util import types + +# pylint: disable=no-member,too-many-locals,no-self-use + + +def _trace_id_to_bytes(trace_id: int) -> bytes: + """Returns bytes representation of trace id.""" + return trace_id.to_bytes(16, "big") + + +def _span_id_to_bytes(span_id: int) -> bytes: + """Returns bytes representation of span id""" + return span_id.to_bytes(8, "big") + + +def _get_string_key_value(key, value: str) -> model_pb2.KeyValue: + """Returns jaeger string KeyValue.""" + return model_pb2.KeyValue( + key=key, v_str=value, v_type=model_pb2.ValueType.STRING + ) + + +def _get_bool_key_value(key: str, value: bool) -> model_pb2.KeyValue: + """Returns jaeger boolean KeyValue.""" + return model_pb2.KeyValue( + key=key, v_bool=value, v_type=model_pb2.ValueType.BOOL + ) + + +def _get_long_key_value(key: str, value: int) -> model_pb2.KeyValue: + """Returns jaeger long KeyValue.""" + return model_pb2.KeyValue( + key=key, v_int64=value, v_type=model_pb2.ValueType.INT64 + ) + + +def _get_double_key_value(key: str, value: float) -> model_pb2.KeyValue: + """Returns jaeger double KeyValue.""" + return model_pb2.KeyValue( + key=key, v_float64=value, v_type=model_pb2.ValueType.FLOAT64 + ) + + +def _get_binary_key_value(key: str, value: bytes) -> model_pb2.KeyValue: + """Returns jaeger double KeyValue.""" + return model_pb2.KeyValue( + key=key, v_binary=value, v_type=model_pb2.ValueType.BINARY + ) + + +def _translate_attribute( + key: str, value: types.AttributeValue +) -> Optional[model_pb2.KeyValue]: + """Convert the attributes to jaeger keyvalues.""" + translated = None + if isinstance(value, bool): + translated = _get_bool_key_value(key, value) + elif isinstance(value, str): + translated = _get_string_key_value(key, value) + elif isinstance(value, int): + translated = _get_long_key_value(key, value) + elif isinstance(value, float): + translated = _get_double_key_value(key, value) + elif isinstance(value, tuple): + translated = _get_string_key_value(key, str(value)) + return translated + + +def _extract_resource_tags(span: Span) -> Sequence[model_pb2.KeyValue]: + """Extracts resource attributes from span and returns + list of jaeger keyvalues. + + Args: + span: span to extract keyvalues + """ + tags = [] + for key, value in span.resource.attributes.items(): + tag = _translate_attribute(key, value) + if tag: + tags.append(tag) + return tags + + +def _duration_from_two_time_stamps( + start: Timestamp, end: Timestamp +) -> Duration: + """Compute Duration from two Timestamps. + + See https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration + """ + duration = Duration( + seconds=end.seconds - start.seconds, nanos=end.nanos - start.nanos, + ) + # pylint: disable=chained-comparison + if duration.seconds < 0 and duration.nanos > 0: + duration.seconds += 1 + duration.nanos -= 1000000000 + elif duration.seconds > 0 and duration.nanos < 0: + duration.seconds -= 1 + duration.nanos += 1000000000 + return duration + + +def _proto_timestamp_from_epoch_nanos(nsec: int) -> Timestamp: + """Create a Timestamp from the number of nanoseconds elapsed from the epoch. + + See https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#timestamp + """ + nsec_time = nsec / 1e9 + seconds = int(nsec_time) + nanos = int((nsec_time - seconds) * 1e9) + return Timestamp(seconds=seconds, nanos=nanos) + + +class ProtobufTranslator(Translator): + def __init__(self, svc_name): + self.svc_name = svc_name + + def _translate_span(self, span: Span) -> model_pb2.Span: + + ctx = span.get_span_context() + # pb2 span expects in byte format + trace_id = _trace_id_to_bytes(ctx.trace_id) + span_id = _span_id_to_bytes(ctx.span_id) + + start_time = _proto_timestamp_from_epoch_nanos(span.start_time) + end_time = _proto_timestamp_from_epoch_nanos(span.end_time) + duration = _duration_from_two_time_stamps(start_time, end_time) + + tags = self._extract_tags(span) + refs = self._extract_refs(span) + logs = self._extract_logs(span) + + flags = int(ctx.trace_flags) + + process = model_pb2.Process( + service_name=self.svc_name, tags=_extract_resource_tags(span) + ) + jaeger_span = model_pb2.Span( + trace_id=trace_id, + span_id=span_id, + operation_name=span.name, + references=refs, + flags=flags, + start_time=start_time, + duration=duration, + tags=tags, + logs=logs, + process=process, + ) + return jaeger_span + + def _extract_tags(self, span: Span) -> Sequence[model_pb2.KeyValue]: + translated = [] + if span.attributes: + for key, value in span.attributes.items(): + key_value = _translate_attribute(key, value) + if key_value is not None: + translated.append(key_value) + if span.resource.attributes: + for key, value in span.resource.attributes.items(): + key_value = _translate_attribute(key, value) + if key_value: + translated.append(key_value) + + code = _get_long_key_value( + "status.code", span.status.status_code.value + ) + message = _get_string_key_value( + "status.message", span.status.description + ) + kind = _get_string_key_value( + "span.kind", OTLP_JAEGER_SPAN_KIND[span.kind] + ) + translated.extend([code, message, kind]) + + # Instrumentation info KeyValues + if span.instrumentation_info: + name = _get_string_key_value( + NAME_KEY, span.instrumentation_info.name + ) + version = _get_string_key_value( + VERSION_KEY, span.instrumentation_info.version + ) + translated.extend([name, version]) + + # Make sure to add "error" tag if span status is not OK + if not span.status.is_ok: + translated.append(_get_bool_key_value("error", True)) + + return translated + + def _extract_refs( + self, span: Span + ) -> Optional[Sequence[model_pb2.SpanRef]]: + if not span.links: + return None + + refs = [] + for link in span.links: + trace_id = link.context.trace_id + span_id = link.context.span_id + refs.append( + model_pb2.SpanRef( + ref_type=model_pb2.SpanRefType.FOLLOWS_FROM, + trace_id=_trace_id_to_bytes(trace_id), + span_id=_span_id_to_bytes(span_id), + ) + ) + return refs + + def _extract_logs(self, span: Span) -> Optional[Sequence[model_pb2.Log]]: + if not span.events: + return None + + logs = [] + for event in span.events: + fields = [] + for key, value in event.attributes.items(): + tag = _translate_attribute(key, value) + if tag: + fields.append(tag) + + fields.append( + _get_string_key_value(key="message", value=event.name,) + ) + event_ts = _proto_timestamp_from_epoch_nanos(event.timestamp) + logs.append(model_pb2.Log(timestamp=event_ts, fields=fields)) + + return logs diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/translate/thrift.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/translate/thrift.py new file mode 100644 index 00000000000..710ba85a6ee --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/translate/thrift.py @@ -0,0 +1,194 @@ +# Copyright The OpenTelemetry Authors +# +# 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. +# pylint: disable=no-self-use +from typing import Optional, Sequence + +from opentelemetry.exporter.jaeger.gen.jaeger import Collector as TCollector +from opentelemetry.exporter.jaeger.translate import ( + NAME_KEY, + OTLP_JAEGER_SPAN_KIND, + VERSION_KEY, + Translator, + _convert_int_to_i64, + _nsec_to_usec_round, +) +from opentelemetry.sdk.trace import Span +from opentelemetry.util import types + + +def _get_string_tag(key, value: str) -> TCollector.Tag: + """Returns jaeger string tag.""" + return TCollector.Tag(key=key, vStr=value, vType=TCollector.TagType.STRING) + + +def _get_bool_tag(key: str, value: bool) -> TCollector.Tag: + """Returns jaeger boolean tag.""" + return TCollector.Tag(key=key, vBool=value, vType=TCollector.TagType.BOOL) + + +def _get_long_tag(key: str, value: int) -> TCollector.Tag: + """Returns jaeger long tag.""" + return TCollector.Tag(key=key, vLong=value, vType=TCollector.TagType.LONG) + + +def _get_double_tag(key: str, value: float) -> TCollector.Tag: + """Returns jaeger double tag.""" + return TCollector.Tag( + key=key, vDouble=value, vType=TCollector.TagType.DOUBLE + ) + + +def _get_trace_id_low(trace_id): + return _convert_int_to_i64(trace_id & 0xFFFFFFFFFFFFFFFF) + + +def _get_trace_id_high(trace_id): + return _convert_int_to_i64((trace_id >> 64) & 0xFFFFFFFFFFFFFFFF) + + +def _translate_attribute( + key: str, value: types.AttributeValue +) -> Optional[TCollector.Tag]: + """Convert the attributes to jaeger tags.""" + if isinstance(value, bool): + return _get_bool_tag(key, value) + if isinstance(value, str): + return _get_string_tag(key, value) + if isinstance(value, int): + return _get_long_tag(key, value) + if isinstance(value, float): + return _get_double_tag(key, value) + if isinstance(value, tuple): + return _get_string_tag(key, str(value)) + return None + + +class ThriftTranslator(Translator): + def _translate_span(self, span: Span) -> TCollector.Span: + ctx = span.get_span_context() + trace_id = ctx.trace_id + span_id = ctx.span_id + + start_time_us = _nsec_to_usec_round(span.start_time) + duration_us = _nsec_to_usec_round(span.end_time - span.start_time) + + parent_id = span.parent.span_id if span.parent else 0 + + tags = self._extract_tags(span) + refs = self._extract_refs(span) + logs = self._extract_logs(span) + + flags = int(ctx.trace_flags) + + jaeger_span = TCollector.Span( + traceIdHigh=_get_trace_id_high(trace_id), + traceIdLow=_get_trace_id_low(trace_id), + spanId=_convert_int_to_i64(span_id), + operationName=span.name, + startTime=start_time_us, + duration=duration_us, + tags=tags, + logs=logs, + references=refs, + flags=flags, + parentSpanId=_convert_int_to_i64(parent_id), + ) + return jaeger_span + + def _extract_tags(self, span: Span) -> Sequence[TCollector.Tag]: + + translated = [] + if span.attributes: + for key, value in span.attributes.items(): + tag = _translate_attribute(key, value) + if tag: + translated.append(tag) + if span.resource.attributes: + for key, value in span.resource.attributes.items(): + tag = _translate_attribute(key, value) + if tag: + translated.append(tag) + + code = _get_long_tag("status.code", span.status.status_code.value) + message = _get_string_tag("status.message", span.status.description) + kind = _get_string_tag("span.kind", OTLP_JAEGER_SPAN_KIND[span.kind]) + translated.extend([code, message, kind]) + + # Instrumentation info tags + if span.instrumentation_info: + name = _get_string_tag(NAME_KEY, span.instrumentation_info.name) + version = _get_string_tag( + VERSION_KEY, span.instrumentation_info.version + ) + translated.extend([name, version]) + + # Make sure to add "error" tag if span status is not OK + if not span.status.is_ok: + translated.append(_get_bool_tag("error", True)) + + return translated + + def _extract_refs( + self, span: Span + ) -> Optional[Sequence[TCollector.SpanRef]]: + if not span.links: + return None + + refs = [] + for link in span.links: + trace_id = link.context.trace_id + span_id = link.context.span_id + refs.append( + TCollector.SpanRef( + refType=TCollector.SpanRefType.FOLLOWS_FROM, + traceIdHigh=_get_trace_id_high(trace_id), + traceIdLow=_get_trace_id_low(trace_id), + spanId=_convert_int_to_i64(span_id), + ) + ) + return refs + + def _extract_logs(self, span: Span) -> Optional[Sequence[TCollector.Log]]: + """Returns jaeger logs if events exists, otherwise None. + + Args: + span: span to extract logs + """ + if not span.events: + return None + + logs = [] + for event in span.events: + fields = [] + for key, value in event.attributes.items(): + tag = _translate_attribute(key, value) + if tag: + fields.append(tag) + + fields.append( + TCollector.Tag( + key="message", + vType=TCollector.TagType.STRING, + vStr=event.name, + ) + ) + + event_timestamp_us = _nsec_to_usec_round(event.timestamp) + logs.append( + TCollector.Log( + timestamp=int(event_timestamp_us), fields=fields + ) + ) + + return logs diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/util.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/util.py new file mode 100644 index 00000000000..6be9d509ac8 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/util.py @@ -0,0 +1,51 @@ +# Copyright The OpenTelemetry Authors +# +# 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. + +import logging + +from grpc import ChannelCredentials, ssl_channel_credentials + +from opentelemetry.configuration import Configuration + +logger = logging.getLogger(__name__) + +DEFAULT_INSECURE = False + + +def _get_insecure(param): + if param is not None: + return param + insecure_env = Configuration().get("EXPORTER_JAEGER_INSECURE", None) + if insecure_env is not None: + return insecure_env.lower() == "true" + return DEFAULT_INSECURE + + +def _load_credential_from_file(path) -> ChannelCredentials: + try: + with open(path, "rb") as creds_file: + credential = creds_file.read() + return ssl_channel_credentials(credential) + except FileNotFoundError: + logger.exception("Failed to read credential file") + return None + + +def _get_credentials(param): + if param is not None: + return param + creds_env = Configuration().get("EXPORTER_JAEGER_CERTIFICATE", None) + if creds_env: + return _load_credential_from_file(creds_env) + return ssl_channel_credentials() diff --git a/exporter/opentelemetry-exporter-jaeger/tests/certs/cred.cert b/exporter/opentelemetry-exporter-jaeger/tests/certs/cred.cert new file mode 100644 index 00000000000..e69de29bb2d diff --git a/exporter/opentelemetry-exporter-jaeger/tests/test_jaeger_exporter.py b/exporter/opentelemetry-exporter-jaeger/tests/test_jaeger_exporter_thrift.py similarity index 90% rename from exporter/opentelemetry-exporter-jaeger/tests/test_jaeger_exporter.py rename to exporter/opentelemetry-exporter-jaeger/tests/test_jaeger_exporter_thrift.py index 75ab622c954..853542c7bb7 100644 --- a/exporter/opentelemetry-exporter-jaeger/tests/test_jaeger_exporter.py +++ b/exporter/opentelemetry-exporter-jaeger/tests/test_jaeger_exporter_thrift.py @@ -22,6 +22,8 @@ from opentelemetry import trace as trace_api from opentelemetry.configuration import Configuration from opentelemetry.exporter.jaeger.gen.jaeger import ttypes as jaeger +from opentelemetry.exporter.jaeger.translate import Translate +from opentelemetry.exporter.jaeger.translate.thrift import ThriftTranslator from opentelemetry.sdk import trace from opentelemetry.sdk.trace import Resource from opentelemetry.sdk.util.instrumentation import InstrumentationInfo @@ -49,6 +51,7 @@ def tearDown(self): Configuration._reset() def test_constructor_default(self): + # pylint: disable=protected-access """Test the default values assigned by constructor.""" service_name = "my-service-name" agent_host_name = "localhost" @@ -61,10 +64,11 @@ def test_constructor_default(self): self.assertEqual(exporter.collector_endpoint, None) self.assertEqual(exporter.username, None) self.assertEqual(exporter.password, None) - self.assertTrue(exporter.collector is None) - self.assertTrue(exporter.agent_client is not None) + self.assertTrue(exporter._collector_http_client is None) + self.assertTrue(exporter._agent_client is not None) def test_constructor_explicit(self): + # pylint: disable=protected-access """Test the constructor passing all the options.""" service = "my-opentelemetry-jaeger" collector_endpoint = "https://opentelemetry.io:15875" @@ -88,20 +92,20 @@ def test_constructor_explicit(self): self.assertEqual(exporter.service_name, service) self.assertEqual(exporter.agent_host_name, agent_host_name) self.assertEqual(exporter.agent_port, agent_port) - self.assertTrue(exporter.collector is not None) - self.assertEqual(exporter.collector.auth, auth) + self.assertTrue(exporter._collector_http_client is not None) + self.assertEqual(exporter._collector_http_client.auth, auth) # property should not construct new object - collector = exporter.collector - self.assertEqual(exporter.collector, collector) + collector = exporter._collector_http_client + self.assertEqual(exporter._collector_http_client, collector) # property should construct new object - # pylint: disable=protected-access exporter._collector = None exporter.username = None exporter.password = None - self.assertNotEqual(exporter.collector, collector) - self.assertTrue(exporter.collector.auth is None) + self.assertNotEqual(exporter._collector_http_client, collector) + self.assertTrue(exporter._collector_http_client.auth is None) def test_constructor_by_environment_variables(self): + # pylint: disable=protected-access """Test the constructor using Environment Variables.""" service = "my-opentelemetry-jaeger" @@ -132,25 +136,24 @@ def test_constructor_by_environment_variables(self): self.assertEqual(exporter.service_name, service) self.assertEqual(exporter.agent_host_name, agent_host_name) self.assertEqual(exporter.agent_port, int(agent_port)) - self.assertTrue(exporter.collector is not None) + self.assertTrue(exporter._collector_http_client is not None) self.assertEqual(exporter.collector_endpoint, collector_endpoint) - self.assertEqual(exporter.collector.auth, auth) + self.assertEqual(exporter._collector_http_client.auth, auth) # property should not construct new object - collector = exporter.collector - self.assertEqual(exporter.collector, collector) + collector = exporter._collector_http_client + self.assertEqual(exporter._collector_http_client, collector) # property should construct new object - # pylint: disable=protected-access exporter._collector = None exporter.username = None exporter.password = None - self.assertNotEqual(exporter.collector, collector) - self.assertTrue(exporter.collector.auth is None) + self.assertNotEqual(exporter._collector_http_client, collector) + self.assertTrue(exporter._collector_http_client.auth is None) environ_patcher.stop() def test_nsec_to_usec_round(self): # pylint: disable=protected-access - nsec_to_usec_round = jaeger_exporter._nsec_to_usec_round + nsec_to_usec_round = jaeger_exporter.translate._nsec_to_usec_round self.assertEqual(nsec_to_usec_round(5000), 5) self.assertEqual(nsec_to_usec_round(5499), 5) @@ -158,7 +161,9 @@ def test_nsec_to_usec_round(self): def test_all_otlp_span_kinds_are_mapped(self): for kind in SpanKind: - self.assertIn(kind, jaeger_exporter.OTLP_JAEGER_SPAN_KIND) + self.assertIn( + kind, jaeger_exporter.translate.OTLP_JAEGER_SPAN_KIND + ) # pylint: disable=too-many-locals def test_translate_to_jaeger(self): @@ -272,8 +277,9 @@ def test_translate_to_jaeger(self): name="name", version="version" ) + translate = Translate(otel_spans) # pylint: disable=protected-access - spans = jaeger_exporter._translate_to_jaeger(otel_spans) + spans = translate._translate(ThriftTranslator()) expected_spans = [ jaeger.Span( @@ -453,10 +459,12 @@ def test_agent_client(self): host_name="localhost", port=6354 ) + translate = Translate([self._test_span]) + # pylint: disable=protected-access + spans = translate._translate(ThriftTranslator()) + batch = jaeger.Batch( - # pylint: disable=protected-access - spans=jaeger_exporter._translate_to_jaeger((self._test_span,)), - process=jaeger.Process(serviceName="xxx"), + spans=spans, process=jaeger.Process(serviceName="xxx"), ) agent_client.emit(batch) diff --git a/exporter/opentelemetry-exporter-jaeger/tests/test_jarget_exporter_protobuf.py b/exporter/opentelemetry-exporter-jaeger/tests/test_jarget_exporter_protobuf.py new file mode 100644 index 00000000000..cf19428ded4 --- /dev/null +++ b/exporter/opentelemetry-exporter-jaeger/tests/test_jarget_exporter_protobuf.py @@ -0,0 +1,392 @@ +# Copyright The OpenTelemetry Authors +# +# 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. + +import os +import unittest +from collections import OrderedDict +from unittest.mock import patch + +# pylint:disable=no-name-in-module +# pylint:disable=import-error +import opentelemetry.exporter.jaeger.gen.model_pb2 as model_pb2 +import opentelemetry.exporter.jaeger.translate.protobuf as pb_translator +from opentelemetry import trace as trace_api +from opentelemetry.configuration import Configuration +from opentelemetry.exporter.jaeger import JaegerSpanExporter +from opentelemetry.exporter.jaeger.translate import Translate +from opentelemetry.sdk import trace +from opentelemetry.sdk.trace import Resource +from opentelemetry.sdk.util.instrumentation import InstrumentationInfo +from opentelemetry.trace.status import Status, StatusCode + + +# pylint:disable=no-member +class TestJaegerSpanExporter(unittest.TestCase): + def setUp(self): + # create and save span to be used in tests + context = trace_api.SpanContext( + trace_id=0x000000000000000000000000DEADBEEF, + span_id=0x00000000DEADBEF0, + is_remote=False, + ) + + self._test_span = trace._Span("test_span", context=context) + self._test_span.start() + self._test_span.end() + # pylint: disable=protected-access + Configuration._reset() + + def tearDown(self): + # pylint: disable=protected-access + Configuration._reset() + + def test_constructor_by_environment_variables(self): + """Test using Environment Variables.""" + # pylint: disable=protected-access + Configuration._reset() + service = "my-opentelemetry-jaeger" + + collector_endpoint = "localhost:14250" + + env_patch = patch.dict( + "os.environ", + { + "OTEL_EXPORTER_JAEGER_ENDPOINT": collector_endpoint, + "OTEL_EXPORTER_JAEGER_CERTIFICATE": os.path.dirname(__file__) + + "/certs/cred.cert", + }, + ) + + env_patch.start() + + exporter = JaegerSpanExporter( + service_name=service, transport_format="protobuf" + ) + + self.assertEqual(exporter.service_name, service) + self.assertIsNotNone(exporter._collector_grpc_client) + self.assertEqual(exporter.collector_endpoint, collector_endpoint) + self.assertIsNotNone(exporter.credentials) + + env_patch.stop() + + # pylint: disable=too-many-locals,too-many-statements + def test_translate_to_jaeger(self): + + span_names = ("test1", "test2", "test3") + trace_id = 0x6E0C63257DE34C926F9EFCD03927272E + span_id = 0x34BF92DEEFC58C92 + parent_id = 0x1111111111111111 + other_id = 0x2222222222222222 + + base_time = 683647322 * 10 ** 9 # in ns + start_times = ( + base_time, + base_time + 150 * 10 ** 6, + base_time + 300 * 10 ** 6, + ) + durations = (50 * 10 ** 6, 100 * 10 ** 6, 200 * 10 ** 6) + end_times = ( + start_times[0] + durations[0], + start_times[1] + durations[1], + start_times[2] + durations[2], + ) + + span_context = trace_api.SpanContext( + trace_id, span_id, is_remote=False + ) + parent_span_context = trace_api.SpanContext( + trace_id, parent_id, is_remote=False + ) + other_context = trace_api.SpanContext( + trace_id, other_id, is_remote=False + ) + + event_attributes = OrderedDict( + [ + ("annotation_bool", True), + ("annotation_string", "annotation_test"), + ("key_float", 0.3), + ] + ) + + event_timestamp = base_time + 50 * 10 ** 6 + # pylint:disable=protected-access + event_timestamp_proto = pb_translator._proto_timestamp_from_epoch_nanos( + event_timestamp + ) + + event = trace.Event( + name="event0", + timestamp=event_timestamp, + attributes=event_attributes, + ) + + link_attributes = {"key_bool": True} + + link = trace_api.Link( + context=other_context, attributes=link_attributes + ) + + default_tags = [ + model_pb2.KeyValue( + key="status.code", + v_type=model_pb2.ValueType.INT64, + v_int64=StatusCode.UNSET.value, + ), + model_pb2.KeyValue( + key="status.message", + v_type=model_pb2.ValueType.STRING, + v_str=None, + ), + model_pb2.KeyValue( + key="span.kind", + v_type=model_pb2.ValueType.STRING, + v_str="internal", + ), + ] + + otel_spans = [ + trace._Span( + name=span_names[0], + context=span_context, + parent=parent_span_context, + events=(event,), + links=(link,), + kind=trace_api.SpanKind.CLIENT, + ), + trace._Span( + name=span_names[1], context=parent_span_context, parent=None + ), + trace._Span( + name=span_names[2], context=other_context, parent=None + ), + ] + + otel_spans[0].start(start_time=start_times[0]) + # added here to preserve order + otel_spans[0].set_attribute("key_bool", False) + otel_spans[0].set_attribute("key_string", "hello_world") + otel_spans[0].set_attribute("key_float", 111.22) + otel_spans[0].set_attribute("key_tuple", ("tuple_element",)) + otel_spans[0].resource = Resource( + attributes={"key_resource": "some_resource"} + ) + otel_spans[0].set_status( + Status(StatusCode.ERROR, "Example description") + ) + otel_spans[0].end(end_time=end_times[0]) + + otel_spans[1].start(start_time=start_times[1]) + otel_spans[1].resource = Resource({}) + otel_spans[1].end(end_time=end_times[1]) + + otel_spans[2].start(start_time=start_times[2]) + otel_spans[2].resource = Resource({}) + otel_spans[2].set_status(Status(StatusCode.OK, "Example description")) + otel_spans[2].end(end_time=end_times[2]) + otel_spans[2].instrumentation_info = InstrumentationInfo( + name="name", version="version" + ) + + translate = Translate(otel_spans) + # pylint: disable=protected-access + spans = translate._translate(pb_translator.ProtobufTranslator("svc")) + + span1_start_time = pb_translator._proto_timestamp_from_epoch_nanos( + start_times[0] + ) + span2_start_time = pb_translator._proto_timestamp_from_epoch_nanos( + start_times[1] + ) + span3_start_time = pb_translator._proto_timestamp_from_epoch_nanos( + start_times[2] + ) + + span1_end_time = pb_translator._proto_timestamp_from_epoch_nanos( + end_times[0] + ) + span2_end_time = pb_translator._proto_timestamp_from_epoch_nanos( + end_times[1] + ) + span3_end_time = pb_translator._proto_timestamp_from_epoch_nanos( + end_times[2] + ) + + span1_duration = pb_translator._duration_from_two_time_stamps( + span1_start_time, span1_end_time + ) + span2_duration = pb_translator._duration_from_two_time_stamps( + span2_start_time, span2_end_time + ) + span3_duration = pb_translator._duration_from_two_time_stamps( + span3_start_time, span3_end_time + ) + + expected_spans = [ + model_pb2.Span( + operation_name=span_names[0], + trace_id=pb_translator._trace_id_to_bytes(trace_id), + span_id=pb_translator._span_id_to_bytes(span_id), + start_time=span1_start_time, + duration=span1_duration, + flags=0, + tags=[ + model_pb2.KeyValue( + key="key_bool", + v_type=model_pb2.ValueType.BOOL, + v_bool=False, + ), + model_pb2.KeyValue( + key="key_string", + v_type=model_pb2.ValueType.STRING, + v_str="hello_world", + ), + model_pb2.KeyValue( + key="key_float", + v_type=model_pb2.ValueType.FLOAT64, + v_float64=111.22, + ), + model_pb2.KeyValue( + key="key_tuple", + v_type=model_pb2.ValueType.STRING, + v_str="('tuple_element',)", + ), + model_pb2.KeyValue( + key="key_resource", + v_type=model_pb2.ValueType.STRING, + v_str="some_resource", + ), + model_pb2.KeyValue( + key="status.code", + v_type=model_pb2.ValueType.INT64, + v_int64=StatusCode.ERROR.value, + ), + model_pb2.KeyValue( + key="status.message", + v_type=model_pb2.ValueType.STRING, + v_str="Example description", + ), + model_pb2.KeyValue( + key="span.kind", + v_type=model_pb2.ValueType.STRING, + v_str="client", + ), + model_pb2.KeyValue( + key="error", + v_type=model_pb2.ValueType.BOOL, + v_bool=True, + ), + ], + references=[ + model_pb2.SpanRef( + ref_type=model_pb2.SpanRefType.FOLLOWS_FROM, + trace_id=pb_translator._trace_id_to_bytes(trace_id), + span_id=pb_translator._span_id_to_bytes(other_id), + ) + ], + logs=[ + model_pb2.Log( + timestamp=event_timestamp_proto, + fields=[ + model_pb2.KeyValue( + key="annotation_bool", + v_type=model_pb2.ValueType.BOOL, + v_bool=True, + ), + model_pb2.KeyValue( + key="annotation_string", + v_type=model_pb2.ValueType.STRING, + v_str="annotation_test", + ), + model_pb2.KeyValue( + key="key_float", + v_type=model_pb2.ValueType.FLOAT64, + v_float64=0.3, + ), + model_pb2.KeyValue( + key="message", + v_type=model_pb2.ValueType.STRING, + v_str="event0", + ), + ], + ) + ], + process=model_pb2.Process( + service_name="svc", + tags=[ + model_pb2.KeyValue( + key="key_resource", + v_str="some_resource", + v_type=model_pb2.ValueType.STRING, + ) + ], + ), + ), + model_pb2.Span( + operation_name=span_names[1], + trace_id=pb_translator._trace_id_to_bytes(trace_id), + span_id=pb_translator._span_id_to_bytes(parent_id), + start_time=span2_start_time, + duration=span2_duration, + flags=0, + tags=default_tags, + process=model_pb2.Process(service_name="svc",), + ), + model_pb2.Span( + operation_name=span_names[2], + trace_id=pb_translator._trace_id_to_bytes(trace_id), + span_id=pb_translator._span_id_to_bytes(other_id), + start_time=span3_start_time, + duration=span3_duration, + flags=0, + tags=[ + model_pb2.KeyValue( + key="status.code", + v_type=model_pb2.ValueType.INT64, + v_int64=StatusCode.OK.value, + ), + model_pb2.KeyValue( + key="status.message", + v_type=model_pb2.ValueType.STRING, + v_str="Example description", + ), + model_pb2.KeyValue( + key="span.kind", + v_type=model_pb2.ValueType.STRING, + v_str="internal", + ), + model_pb2.KeyValue( + key="otel.instrumentation_library.name", + v_type=model_pb2.ValueType.STRING, + v_str="name", + ), + model_pb2.KeyValue( + key="otel.instrumentation_library.version", + v_type=model_pb2.ValueType.STRING, + v_str="version", + ), + ], + process=model_pb2.Process(service_name="svc",), + ), + ] + + # events are complicated to compare because order of fields + # (attributes) in otel is not important but in jeager it is + # pylint: disable=no-member + self.assertCountEqual( + spans[0].logs[0].fields, expected_spans[0].logs[0].fields, + ) + + self.assertEqual(spans, expected_spans) diff --git a/tox.ini b/tox.ini index 9a7c8ce3f85..fb5ebee5ab7 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,6 @@ envlist = ; opentelemetry-exporter-jaeger py3{5,6,7,8,9}-test-exporter-jaeger - pypy3-test-exporter-jaeger ; opentelemetry-exporter-opencensus py3{5,6,7,8,9}-test-exporter-opencensus