diff --git a/.flake8 b/.flake8 index 39288e9b1ba..8555d626c6f 100644 --- a/.flake8 +++ b/.flake8 @@ -20,4 +20,5 @@ exclude = ext/opentelemetry-ext-jaeger/build/* docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/grpc/gen/ docs/examples/opentelemetry-example-app/build/* + opentelemetry-proto/build/* opentelemetry-proto/src/opentelemetry/proto/ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..6279d7a9cb3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# tells github that proto code is generated +opentelemetry-proto/src/**/*_pb2*.py* linguist-generated=true diff --git a/dev-requirements.txt b/dev-requirements.txt index 3808b02143a..dd4d2e37c97 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -9,3 +9,6 @@ sphinx-autodoc-typehints~=1.10.2 pytest!=5.2.3 pytest-cov>=2.8 readme-renderer~=24.0 +grpcio-tools==1.29.0 +mypy-protobuf==1.21 +protobuf==3.12.2 diff --git a/opentelemetry-proto/CHANGELOG.md b/opentelemetry-proto/CHANGELOG.md index 896a782491d..aac3fa1d9f0 100644 --- a/opentelemetry-proto/CHANGELOG.md +++ b/opentelemetry-proto/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +- Regenerate proto code and add pyi stubs + ([#823](https://github.com/open-telemetry/opentelemetry-python/pull/823)) + ## 0.9b0 Released 2020-06-10 diff --git a/opentelemetry-proto/MANIFEST.in b/opentelemetry-proto/MANIFEST.in index 5da7b7fa51e..aed3e33273b 100644 --- a/opentelemetry-proto/MANIFEST.in +++ b/opentelemetry-proto/MANIFEST.in @@ -1,4 +1,4 @@ -graft gen +graft src graft tests global-exclude *.pyc global-exclude *.pyo diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.pyi b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.pyi new file mode 100644 index 00000000000..7c42c410f43 --- /dev/null +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.pyi @@ -0,0 +1,72 @@ +# @generated by generate_proto_mypy_stubs.py. Do not edit! +import sys +from google.protobuf.descriptor import ( + Descriptor as google___protobuf___descriptor___Descriptor, + FileDescriptor as google___protobuf___descriptor___FileDescriptor, +) + +from google.protobuf.internal.containers import ( + RepeatedCompositeFieldContainer as google___protobuf___internal___containers___RepeatedCompositeFieldContainer, +) + +from google.protobuf.message import ( + Message as google___protobuf___message___Message, +) + +from opentelemetry.proto.metrics.v1.metrics_pb2 import ( + ResourceMetrics as opentelemetry___proto___metrics___v1___metrics_pb2___ResourceMetrics, +) + +from typing import ( + Iterable as typing___Iterable, + Optional as typing___Optional, + Union as typing___Union, +) + +from typing_extensions import ( + Literal as typing_extensions___Literal, +) + + +builtin___bool = bool +builtin___bytes = bytes +builtin___float = float +builtin___int = int +if sys.version_info < (3,): + builtin___buffer = buffer + builtin___unicode = unicode + + +DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ... + +class ExportMetricsServiceRequest(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + + @property + def resource_metrics(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___metrics___v1___metrics_pb2___ResourceMetrics]: ... + + def __init__(self, + *, + resource_metrics : typing___Optional[typing___Iterable[opentelemetry___proto___metrics___v1___metrics_pb2___ResourceMetrics]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> ExportMetricsServiceRequest: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> ExportMetricsServiceRequest: ... + def ClearField(self, field_name: typing_extensions___Literal[u"resource_metrics",b"resource_metrics"]) -> None: ... +type___ExportMetricsServiceRequest = ExportMetricsServiceRequest + +class ExportMetricsServiceResponse(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + + def __init__(self, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> ExportMetricsServiceResponse: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> ExportMetricsServiceResponse: ... +type___ExportMetricsServiceResponse = ExportMetricsServiceResponse diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.pyi b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.pyi new file mode 100644 index 00000000000..540a82ebc5d --- /dev/null +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.pyi @@ -0,0 +1,72 @@ +# @generated by generate_proto_mypy_stubs.py. Do not edit! +import sys +from google.protobuf.descriptor import ( + Descriptor as google___protobuf___descriptor___Descriptor, + FileDescriptor as google___protobuf___descriptor___FileDescriptor, +) + +from google.protobuf.internal.containers import ( + RepeatedCompositeFieldContainer as google___protobuf___internal___containers___RepeatedCompositeFieldContainer, +) + +from google.protobuf.message import ( + Message as google___protobuf___message___Message, +) + +from opentelemetry.proto.trace.v1.trace_pb2 import ( + ResourceSpans as opentelemetry___proto___trace___v1___trace_pb2___ResourceSpans, +) + +from typing import ( + Iterable as typing___Iterable, + Optional as typing___Optional, + Union as typing___Union, +) + +from typing_extensions import ( + Literal as typing_extensions___Literal, +) + + +builtin___bool = bool +builtin___bytes = bytes +builtin___float = float +builtin___int = int +if sys.version_info < (3,): + builtin___buffer = buffer + builtin___unicode = unicode + + +DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ... + +class ExportTraceServiceRequest(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + + @property + def resource_spans(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___trace___v1___trace_pb2___ResourceSpans]: ... + + def __init__(self, + *, + resource_spans : typing___Optional[typing___Iterable[opentelemetry___proto___trace___v1___trace_pb2___ResourceSpans]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> ExportTraceServiceRequest: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> ExportTraceServiceRequest: ... + def ClearField(self, field_name: typing_extensions___Literal[u"resource_spans",b"resource_spans"]) -> None: ... +type___ExportTraceServiceRequest = ExportTraceServiceRequest + +class ExportTraceServiceResponse(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + + def __init__(self, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> ExportTraceServiceResponse: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> ExportTraceServiceResponse: ... +type___ExportTraceServiceResponse = ExportTraceServiceResponse diff --git a/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py index 62e951269c8..dd08ccf6ad8 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py @@ -18,7 +18,6 @@ package='opentelemetry.proto.common.v1', syntax='proto3', serialized_options=b'\n io.opentelemetry.proto.common.v1B\013CommonProtoP\001Z>github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1', - create_key=_descriptor._internal_create_key, serialized_pb=b'\n*opentelemetry/proto/common/v1/common.proto\x12\x1dopentelemetry.proto.common.v1\"\xf5\x01\n\x11\x41ttributeKeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x04type\x18\x02 \x01(\x0e\x32:.opentelemetry.proto.common.v1.AttributeKeyValue.ValueType\x12\x14\n\x0cstring_value\x18\x03 \x01(\t\x12\x11\n\tint_value\x18\x04 \x01(\x03\x12\x14\n\x0c\x64ouble_value\x18\x05 \x01(\x01\x12\x12\n\nbool_value\x18\x06 \x01(\x08\"6\n\tValueType\x12\n\n\x06STRING\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\",\n\x0eStringKeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"7\n\x16InstrumentationLibrary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\tBq\n io.opentelemetry.proto.common.v1B\x0b\x43ommonProtoP\x01Z>github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1b\x06proto3' ) @@ -29,28 +28,23 @@ full_name='opentelemetry.proto.common.v1.AttributeKeyValue.ValueType', filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='STRING', index=0, number=0, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='INT', index=1, number=1, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='DOUBLE', index=2, number=2, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='BOOL', index=3, number=3, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), ], containing_type=None, serialized_options=None, @@ -66,7 +60,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='key', full_name='opentelemetry.proto.common.v1.AttributeKeyValue.key', index=0, @@ -74,42 +67,42 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='type', full_name='opentelemetry.proto.common.v1.AttributeKeyValue.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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='string_value', full_name='opentelemetry.proto.common.v1.AttributeKeyValue.string_value', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='int_value', full_name='opentelemetry.proto.common.v1.AttributeKeyValue.int_value', index=3, number=4, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='double_value', full_name='opentelemetry.proto.common.v1.AttributeKeyValue.double_value', index=4, number=5, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='bool_value', full_name='opentelemetry.proto.common.v1.AttributeKeyValue.bool_value', index=5, number=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -134,7 +127,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='key', full_name='opentelemetry.proto.common.v1.StringKeyValue.key', index=0, @@ -142,14 +134,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='opentelemetry.proto.common.v1.StringKeyValue.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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -173,7 +165,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='name', full_name='opentelemetry.proto.common.v1.InstrumentationLibrary.name', index=0, @@ -181,14 +172,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='version', full_name='opentelemetry.proto.common.v1.InstrumentationLibrary.version', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], diff --git a/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.pyi b/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.pyi new file mode 100644 index 00000000000..1061616570b --- /dev/null +++ b/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.pyi @@ -0,0 +1,127 @@ +# @generated by generate_proto_mypy_stubs.py. Do not edit! +import sys +from google.protobuf.descriptor import ( + Descriptor as google___protobuf___descriptor___Descriptor, + EnumDescriptor as google___protobuf___descriptor___EnumDescriptor, + FileDescriptor as google___protobuf___descriptor___FileDescriptor, +) + +from google.protobuf.message import ( + Message as google___protobuf___message___Message, +) + +from typing import ( + List as typing___List, + NewType as typing___NewType, + Optional as typing___Optional, + Text as typing___Text, + Tuple as typing___Tuple, + Union as typing___Union, + cast as typing___cast, +) + +from typing_extensions import ( + Literal as typing_extensions___Literal, +) + + +builtin___bool = bool +builtin___bytes = bytes +builtin___float = float +builtin___int = int +builtin___str = str +if sys.version_info < (3,): + builtin___buffer = buffer + builtin___unicode = unicode + + +DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ... + +class AttributeKeyValue(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + ValueTypeValue = typing___NewType('ValueTypeValue', builtin___int) + type___ValueTypeValue = ValueTypeValue + class ValueType(object): + DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ... + @classmethod + def Name(cls, number: builtin___int) -> builtin___str: ... + @classmethod + def Value(cls, name: builtin___str) -> AttributeKeyValue.ValueTypeValue: ... + @classmethod + def keys(cls) -> typing___List[builtin___str]: ... + @classmethod + def values(cls) -> typing___List[AttributeKeyValue.ValueTypeValue]: ... + @classmethod + def items(cls) -> typing___List[typing___Tuple[builtin___str, AttributeKeyValue.ValueTypeValue]]: ... + STRING = typing___cast(AttributeKeyValue.ValueTypeValue, 0) + INT = typing___cast(AttributeKeyValue.ValueTypeValue, 1) + DOUBLE = typing___cast(AttributeKeyValue.ValueTypeValue, 2) + BOOL = typing___cast(AttributeKeyValue.ValueTypeValue, 3) + STRING = typing___cast(AttributeKeyValue.ValueTypeValue, 0) + INT = typing___cast(AttributeKeyValue.ValueTypeValue, 1) + DOUBLE = typing___cast(AttributeKeyValue.ValueTypeValue, 2) + BOOL = typing___cast(AttributeKeyValue.ValueTypeValue, 3) + type___ValueType = ValueType + + key: typing___Text = ... + type: type___AttributeKeyValue.ValueTypeValue = ... + string_value: typing___Text = ... + int_value: builtin___int = ... + double_value: builtin___float = ... + bool_value: builtin___bool = ... + + def __init__(self, + *, + key : typing___Optional[typing___Text] = None, + type : typing___Optional[type___AttributeKeyValue.ValueTypeValue] = None, + string_value : typing___Optional[typing___Text] = None, + int_value : typing___Optional[builtin___int] = None, + double_value : typing___Optional[builtin___float] = None, + bool_value : typing___Optional[builtin___bool] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> AttributeKeyValue: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> AttributeKeyValue: ... + def ClearField(self, field_name: typing_extensions___Literal[u"bool_value",b"bool_value",u"double_value",b"double_value",u"int_value",b"int_value",u"key",b"key",u"string_value",b"string_value",u"type",b"type"]) -> None: ... +type___AttributeKeyValue = AttributeKeyValue + +class StringKeyValue(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + key: typing___Text = ... + value: typing___Text = ... + + def __init__(self, + *, + key : typing___Optional[typing___Text] = None, + value : typing___Optional[typing___Text] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> StringKeyValue: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> StringKeyValue: ... + def ClearField(self, field_name: typing_extensions___Literal[u"key",b"key",u"value",b"value"]) -> None: ... +type___StringKeyValue = StringKeyValue + +class InstrumentationLibrary(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + name: typing___Text = ... + version: typing___Text = ... + + def __init__(self, + *, + name : typing___Optional[typing___Text] = None, + version : typing___Optional[typing___Text] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> InstrumentationLibrary: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> InstrumentationLibrary: ... + def ClearField(self, field_name: typing_extensions___Literal[u"name",b"name",u"version",b"version"]) -> None: ... +type___InstrumentationLibrary = InstrumentationLibrary diff --git a/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py index 4edaa3609d9..e4b62369a05 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py @@ -20,8 +20,7 @@ package='opentelemetry.proto.metrics.v1', syntax='proto3', serialized_options=b'\n!io.opentelemetry.proto.metrics.v1B\014MetricsProtoP\001Z?github.com/open-telemetry/opentelemetry-proto/gen/go/metrics/v1', - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n,opentelemetry/proto/metrics/v1/metrics.proto\x12\x1eopentelemetry.proto.metrics.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"\xb6\x01\n\x0fResourceMetrics\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12\x66\n\x1finstrumentation_library_metrics\x18\x02 \x03(\x0b\x32=.opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics\"\xb0\x01\n\x1dInstrumentationLibraryMetrics\x12V\n\x17instrumentation_library\x18\x01 \x01(\x0b\x32\x35.opentelemetry.proto.common.v1.InstrumentationLibrary\x12\x37\n\x07metrics\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.metrics.v1.Metric\"\x8f\x03\n\x06Metric\x12K\n\x11metric_descriptor\x18\x01 \x01(\x0b\x32\x30.opentelemetry.proto.metrics.v1.MetricDescriptor\x12I\n\x11int64_data_points\x18\x02 \x03(\x0b\x32..opentelemetry.proto.metrics.v1.Int64DataPoint\x12K\n\x12\x64ouble_data_points\x18\x03 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.DoubleDataPoint\x12Q\n\x15histogram_data_points\x18\x04 \x03(\x0b\x32\x32.opentelemetry.proto.metrics.v1.HistogramDataPoint\x12M\n\x13summary_data_points\x18\x05 \x03(\x0b\x32\x30.opentelemetry.proto.metrics.v1.SummaryDataPoint\"\xfe\x02\n\x10MetricDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04unit\x18\x03 \x01(\t\x12\x43\n\x04type\x18\x04 \x01(\x0e\x32\x35.opentelemetry.proto.metrics.v1.MetricDescriptor.Type\x12Q\n\x0btemporality\x18\x05 \x01(\x0e\x32<.opentelemetry.proto.metrics.v1.MetricDescriptor.Temporality\"K\n\x04Type\x12\x10\n\x0cINVALID_TYPE\x10\x00\x12\t\n\x05INT64\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\r\n\tHISTOGRAM\x10\x03\x12\x0b\n\x07SUMMARY\x10\x04\"T\n\x0bTemporality\x12\x17\n\x13INVALID_TEMPORALITY\x10\x00\x12\x11\n\rINSTANTANEOUS\x10\x01\x12\t\n\x05\x44\x45LTA\x10\x02\x12\x0e\n\nCUMULATIVE\x10\x03\"\x94\x01\n\x0eInt64DataPoint\x12=\n\x06labels\x18\x01 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05value\x18\x04 \x01(\x03\"\x95\x01\n\x0f\x44oubleDataPoint\x12=\n\x06labels\x18\x01 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05value\x18\x04 \x01(\x01\"\xf1\x03\n\x12HistogramDataPoint\x12=\n\x06labels\x18\x01 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x04\x12\x0b\n\x03sum\x18\x05 \x01(\x01\x12J\n\x07\x62uckets\x18\x06 \x03(\x0b\x32\x39.opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket\x12\x17\n\x0f\x65xplicit_bounds\x18\x07 \x03(\x01\x1a\xe4\x01\n\x06\x42ucket\x12\r\n\x05\x63ount\x18\x01 \x01(\x04\x12T\n\x08\x65xemplar\x18\x02 \x01(\x0b\x32\x42.opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket.Exemplar\x1au\n\x08\x45xemplar\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x16\n\x0etime_unix_nano\x18\x02 \x01(\x06\x12\x42\n\x0b\x61ttachments\x18\x03 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\"\xba\x02\n\x10SummaryDataPoint\x12=\n\x06labels\x18\x01 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x04\x12\x0b\n\x03sum\x18\x05 \x01(\x01\x12]\n\x11percentile_values\x18\x06 \x03(\x0b\x32\x42.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtPercentile\x1a\x36\n\x11ValueAtPercentile\x12\x12\n\npercentile\x18\x01 \x01(\x01\x12\r\n\x05value\x18\x02 \x01(\x01\x42t\n!io.opentelemetry.proto.metrics.v1B\x0cMetricsProtoP\x01Z?github.com/open-telemetry/opentelemetry-proto/gen/go/metrics/v1b\x06proto3' + serialized_pb=b'\n,opentelemetry/proto/metrics/v1/metrics.proto\x12\x1eopentelemetry.proto.metrics.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"\xb6\x01\n\x0fResourceMetrics\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12\x66\n\x1finstrumentation_library_metrics\x18\x02 \x03(\x0b\x32=.opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics\"\xb0\x01\n\x1dInstrumentationLibraryMetrics\x12V\n\x17instrumentation_library\x18\x01 \x01(\x0b\x32\x35.opentelemetry.proto.common.v1.InstrumentationLibrary\x12\x37\n\x07metrics\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.metrics.v1.Metric\"\x8f\x03\n\x06Metric\x12K\n\x11metric_descriptor\x18\x01 \x01(\x0b\x32\x30.opentelemetry.proto.metrics.v1.MetricDescriptor\x12I\n\x11int64_data_points\x18\x02 \x03(\x0b\x32..opentelemetry.proto.metrics.v1.Int64DataPoint\x12K\n\x12\x64ouble_data_points\x18\x03 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.DoubleDataPoint\x12Q\n\x15histogram_data_points\x18\x04 \x03(\x0b\x32\x32.opentelemetry.proto.metrics.v1.HistogramDataPoint\x12M\n\x13summary_data_points\x18\x05 \x03(\x0b\x32\x30.opentelemetry.proto.metrics.v1.SummaryDataPoint\"\xa9\x03\n\x10MetricDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04unit\x18\x03 \x01(\t\x12\x43\n\x04type\x18\x04 \x01(\x0e\x32\x35.opentelemetry.proto.metrics.v1.MetricDescriptor.Type\x12Q\n\x0btemporality\x18\x05 \x01(\x0e\x32<.opentelemetry.proto.metrics.v1.MetricDescriptor.Temporality\"v\n\x04Type\x12\x10\n\x0cINVALID_TYPE\x10\x00\x12\t\n\x05INT64\x10\x01\x12\x13\n\x0fMONOTONIC_INT64\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\x14\n\x10MONOTONIC_DOUBLE\x10\x04\x12\r\n\tHISTOGRAM\x10\x05\x12\x0b\n\x07SUMMARY\x10\x06\"T\n\x0bTemporality\x12\x17\n\x13INVALID_TEMPORALITY\x10\x00\x12\x11\n\rINSTANTANEOUS\x10\x01\x12\t\n\x05\x44\x45LTA\x10\x02\x12\x0e\n\nCUMULATIVE\x10\x03\"\x94\x01\n\x0eInt64DataPoint\x12=\n\x06labels\x18\x01 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05value\x18\x04 \x01(\x03\"\x95\x01\n\x0f\x44oubleDataPoint\x12=\n\x06labels\x18\x01 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05value\x18\x04 \x01(\x01\"\xf1\x03\n\x12HistogramDataPoint\x12=\n\x06labels\x18\x01 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x04\x12\x0b\n\x03sum\x18\x05 \x01(\x01\x12J\n\x07\x62uckets\x18\x06 \x03(\x0b\x32\x39.opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket\x12\x17\n\x0f\x65xplicit_bounds\x18\x07 \x03(\x01\x1a\xe4\x01\n\x06\x42ucket\x12\r\n\x05\x63ount\x18\x01 \x01(\x04\x12T\n\x08\x65xemplar\x18\x02 \x01(\x0b\x32\x42.opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket.Exemplar\x1au\n\x08\x45xemplar\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x16\n\x0etime_unix_nano\x18\x02 \x01(\x06\x12\x42\n\x0b\x61ttachments\x18\x03 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\"\xba\x02\n\x10SummaryDataPoint\x12=\n\x06labels\x18\x01 \x03(\x0b\x32-.opentelemetry.proto.common.v1.StringKeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x04\x12\x0b\n\x03sum\x18\x05 \x01(\x01\x12]\n\x11percentile_values\x18\x06 \x03(\x0b\x32\x42.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtPercentile\x1a\x36\n\x11ValueAtPercentile\x12\x12\n\npercentile\x18\x01 \x01(\x01\x12\r\n\x05value\x18\x02 \x01(\x01\x42t\n!io.opentelemetry.proto.metrics.v1B\x0cMetricsProtoP\x01Z?github.com/open-telemetry/opentelemetry-proto/gen/go/metrics/v1b\x06proto3' , dependencies=[opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2.DESCRIPTOR,opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2.DESCRIPTOR,]) @@ -32,38 +31,40 @@ full_name='opentelemetry.proto.metrics.v1.MetricDescriptor.Type', filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='INVALID_TYPE', index=0, number=0, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='INT64', index=1, number=1, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( - name='DOUBLE', index=2, number=2, + name='MONOTONIC_INT64', index=2, number=2, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( - name='HISTOGRAM', index=3, number=3, + name='DOUBLE', index=3, number=3, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( - name='SUMMARY', index=4, number=4, + name='MONOTONIC_DOUBLE', index=4, number=4, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), + _descriptor.EnumValueDescriptor( + name='HISTOGRAM', index=5, number=5, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='SUMMARY', index=6, number=6, + serialized_options=None, + type=None), ], containing_type=None, serialized_options=None, serialized_start=1160, - serialized_end=1235, + serialized_end=1278, ) _sym_db.RegisterEnumDescriptor(_METRICDESCRIPTOR_TYPE) @@ -72,33 +73,28 @@ full_name='opentelemetry.proto.metrics.v1.MetricDescriptor.Temporality', filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='INVALID_TEMPORALITY', index=0, number=0, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='INSTANTANEOUS', index=1, number=1, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='DELTA', index=2, number=2, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='CUMULATIVE', index=3, number=3, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), ], containing_type=None, serialized_options=None, - serialized_start=1237, - serialized_end=1321, + serialized_start=1280, + serialized_end=1364, ) _sym_db.RegisterEnumDescriptor(_METRICDESCRIPTOR_TEMPORALITY) @@ -109,7 +105,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='resource', full_name='opentelemetry.proto.metrics.v1.ResourceMetrics.resource', index=0, @@ -117,14 +112,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='instrumentation_library_metrics', full_name='opentelemetry.proto.metrics.v1.ResourceMetrics.instrumentation_library_metrics', 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -148,7 +143,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='instrumentation_library', full_name='opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics.instrumentation_library', index=0, @@ -156,14 +150,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='metrics', full_name='opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics.metrics', 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -187,7 +181,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='metric_descriptor', full_name='opentelemetry.proto.metrics.v1.Metric.metric_descriptor', index=0, @@ -195,35 +188,35 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='int64_data_points', full_name='opentelemetry.proto.metrics.v1.Metric.int64_data_points', 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='double_data_points', full_name='opentelemetry.proto.metrics.v1.Metric.double_data_points', index=2, number=3, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='histogram_data_points', full_name='opentelemetry.proto.metrics.v1.Metric.histogram_data_points', 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='summary_data_points', full_name='opentelemetry.proto.metrics.v1.Metric.summary_data_points', index=4, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -247,7 +240,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='name', full_name='opentelemetry.proto.metrics.v1.MetricDescriptor.name', index=0, @@ -255,35 +247,35 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='opentelemetry.proto.metrics.v1.MetricDescriptor.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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='unit', full_name='opentelemetry.proto.metrics.v1.MetricDescriptor.unit', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='type', full_name='opentelemetry.proto.metrics.v1.MetricDescriptor.type', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='temporality', full_name='opentelemetry.proto.metrics.v1.MetricDescriptor.temporality', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -299,7 +291,7 @@ oneofs=[ ], serialized_start=939, - serialized_end=1321, + serialized_end=1364, ) @@ -309,7 +301,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='labels', full_name='opentelemetry.proto.metrics.v1.Int64DataPoint.labels', index=0, @@ -317,28 +308,28 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_time_unix_nano', full_name='opentelemetry.proto.metrics.v1.Int64DataPoint.start_time_unix_nano', index=1, number=2, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_unix_nano', full_name='opentelemetry.proto.metrics.v1.Int64DataPoint.time_unix_nano', index=2, number=3, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='opentelemetry.proto.metrics.v1.Int64DataPoint.value', index=3, number=4, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -351,8 +342,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1324, - serialized_end=1472, + serialized_start=1367, + serialized_end=1515, ) @@ -362,7 +353,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='labels', full_name='opentelemetry.proto.metrics.v1.DoubleDataPoint.labels', index=0, @@ -370,28 +360,28 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_time_unix_nano', full_name='opentelemetry.proto.metrics.v1.DoubleDataPoint.start_time_unix_nano', index=1, number=2, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_unix_nano', full_name='opentelemetry.proto.metrics.v1.DoubleDataPoint.time_unix_nano', index=2, number=3, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='opentelemetry.proto.metrics.v1.DoubleDataPoint.value', index=3, number=4, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -404,8 +394,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1475, - serialized_end=1624, + serialized_start=1518, + serialized_end=1667, ) @@ -415,7 +405,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='value', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket.Exemplar.value', index=0, @@ -423,21 +412,21 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_unix_nano', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket.Exemplar.time_unix_nano', index=1, number=2, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='attachments', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket.Exemplar.attachments', index=2, number=3, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -450,8 +439,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2007, - serialized_end=2124, + serialized_start=2050, + serialized_end=2167, ) _HISTOGRAMDATAPOINT_BUCKET = _descriptor.Descriptor( @@ -460,7 +449,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='count', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket.count', index=0, @@ -468,14 +456,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='exemplar', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.Bucket.exemplar', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -488,8 +476,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1896, - serialized_end=2124, + serialized_start=1939, + serialized_end=2167, ) _HISTOGRAMDATAPOINT = _descriptor.Descriptor( @@ -498,7 +486,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='labels', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.labels', index=0, @@ -506,49 +493,49 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_time_unix_nano', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.start_time_unix_nano', index=1, number=2, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_unix_nano', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.time_unix_nano', index=2, number=3, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='count', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.count', index=3, number=4, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sum', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.sum', index=4, number=5, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='buckets', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.buckets', index=5, number=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='explicit_bounds', full_name='opentelemetry.proto.metrics.v1.HistogramDataPoint.explicit_bounds', index=6, number=7, type=1, cpp_type=5, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -561,8 +548,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1627, - serialized_end=2124, + serialized_start=1670, + serialized_end=2167, ) @@ -572,7 +559,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='percentile', full_name='opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtPercentile.percentile', index=0, @@ -580,14 +566,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtPercentile.value', index=1, number=2, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -600,8 +586,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2387, - serialized_end=2441, + serialized_start=2430, + serialized_end=2484, ) _SUMMARYDATAPOINT = _descriptor.Descriptor( @@ -610,7 +596,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='labels', full_name='opentelemetry.proto.metrics.v1.SummaryDataPoint.labels', index=0, @@ -618,42 +603,42 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_time_unix_nano', full_name='opentelemetry.proto.metrics.v1.SummaryDataPoint.start_time_unix_nano', index=1, number=2, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_unix_nano', full_name='opentelemetry.proto.metrics.v1.SummaryDataPoint.time_unix_nano', index=2, number=3, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='count', full_name='opentelemetry.proto.metrics.v1.SummaryDataPoint.count', index=3, number=4, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sum', full_name='opentelemetry.proto.metrics.v1.SummaryDataPoint.sum', index=4, number=5, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='percentile_values', full_name='opentelemetry.proto.metrics.v1.SummaryDataPoint.percentile_values', index=5, number=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -666,8 +651,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2127, - serialized_end=2441, + serialized_start=2170, + serialized_end=2484, ) _RESOURCEMETRICS.fields_by_name['resource'].message_type = opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2._RESOURCE diff --git a/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.pyi b/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.pyi new file mode 100644 index 00000000000..964e23e3a86 --- /dev/null +++ b/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.pyi @@ -0,0 +1,394 @@ +# @generated by generate_proto_mypy_stubs.py. Do not edit! +import sys +from google.protobuf.descriptor import ( + Descriptor as google___protobuf___descriptor___Descriptor, + EnumDescriptor as google___protobuf___descriptor___EnumDescriptor, + FileDescriptor as google___protobuf___descriptor___FileDescriptor, +) + +from google.protobuf.internal.containers import ( + RepeatedCompositeFieldContainer as google___protobuf___internal___containers___RepeatedCompositeFieldContainer, + RepeatedScalarFieldContainer as google___protobuf___internal___containers___RepeatedScalarFieldContainer, +) + +from google.protobuf.message import ( + Message as google___protobuf___message___Message, +) + +from opentelemetry.proto.common.v1.common_pb2 import ( + InstrumentationLibrary as opentelemetry___proto___common___v1___common_pb2___InstrumentationLibrary, + StringKeyValue as opentelemetry___proto___common___v1___common_pb2___StringKeyValue, +) + +from opentelemetry.proto.resource.v1.resource_pb2 import ( + Resource as opentelemetry___proto___resource___v1___resource_pb2___Resource, +) + +from typing import ( + Iterable as typing___Iterable, + List as typing___List, + NewType as typing___NewType, + Optional as typing___Optional, + Text as typing___Text, + Tuple as typing___Tuple, + Union as typing___Union, + cast as typing___cast, +) + +from typing_extensions import ( + Literal as typing_extensions___Literal, +) + + +builtin___bool = bool +builtin___bytes = bytes +builtin___float = float +builtin___int = int +builtin___str = str +if sys.version_info < (3,): + builtin___buffer = buffer + builtin___unicode = unicode + + +DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ... + +class ResourceMetrics(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + + @property + def resource(self) -> opentelemetry___proto___resource___v1___resource_pb2___Resource: ... + + @property + def instrumentation_library_metrics(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___InstrumentationLibraryMetrics]: ... + + def __init__(self, + *, + resource : typing___Optional[opentelemetry___proto___resource___v1___resource_pb2___Resource] = None, + instrumentation_library_metrics : typing___Optional[typing___Iterable[type___InstrumentationLibraryMetrics]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> ResourceMetrics: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> ResourceMetrics: ... + def HasField(self, field_name: typing_extensions___Literal[u"resource",b"resource"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"instrumentation_library_metrics",b"instrumentation_library_metrics",u"resource",b"resource"]) -> None: ... +type___ResourceMetrics = ResourceMetrics + +class InstrumentationLibraryMetrics(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + + @property + def instrumentation_library(self) -> opentelemetry___proto___common___v1___common_pb2___InstrumentationLibrary: ... + + @property + def metrics(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___Metric]: ... + + def __init__(self, + *, + instrumentation_library : typing___Optional[opentelemetry___proto___common___v1___common_pb2___InstrumentationLibrary] = None, + metrics : typing___Optional[typing___Iterable[type___Metric]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> InstrumentationLibraryMetrics: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> InstrumentationLibraryMetrics: ... + def HasField(self, field_name: typing_extensions___Literal[u"instrumentation_library",b"instrumentation_library"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"instrumentation_library",b"instrumentation_library",u"metrics",b"metrics"]) -> None: ... +type___InstrumentationLibraryMetrics = InstrumentationLibraryMetrics + +class Metric(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + + @property + def metric_descriptor(self) -> type___MetricDescriptor: ... + + @property + def int64_data_points(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___Int64DataPoint]: ... + + @property + def double_data_points(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___DoubleDataPoint]: ... + + @property + def histogram_data_points(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___HistogramDataPoint]: ... + + @property + def summary_data_points(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___SummaryDataPoint]: ... + + def __init__(self, + *, + metric_descriptor : typing___Optional[type___MetricDescriptor] = None, + int64_data_points : typing___Optional[typing___Iterable[type___Int64DataPoint]] = None, + double_data_points : typing___Optional[typing___Iterable[type___DoubleDataPoint]] = None, + histogram_data_points : typing___Optional[typing___Iterable[type___HistogramDataPoint]] = None, + summary_data_points : typing___Optional[typing___Iterable[type___SummaryDataPoint]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> Metric: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Metric: ... + def HasField(self, field_name: typing_extensions___Literal[u"metric_descriptor",b"metric_descriptor"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"double_data_points",b"double_data_points",u"histogram_data_points",b"histogram_data_points",u"int64_data_points",b"int64_data_points",u"metric_descriptor",b"metric_descriptor",u"summary_data_points",b"summary_data_points"]) -> None: ... +type___Metric = Metric + +class MetricDescriptor(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + TypeValue = typing___NewType('TypeValue', builtin___int) + type___TypeValue = TypeValue + class Type(object): + DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ... + @classmethod + def Name(cls, number: builtin___int) -> builtin___str: ... + @classmethod + def Value(cls, name: builtin___str) -> MetricDescriptor.TypeValue: ... + @classmethod + def keys(cls) -> typing___List[builtin___str]: ... + @classmethod + def values(cls) -> typing___List[MetricDescriptor.TypeValue]: ... + @classmethod + def items(cls) -> typing___List[typing___Tuple[builtin___str, MetricDescriptor.TypeValue]]: ... + INVALID_TYPE = typing___cast(MetricDescriptor.TypeValue, 0) + INT64 = typing___cast(MetricDescriptor.TypeValue, 1) + MONOTONIC_INT64 = typing___cast(MetricDescriptor.TypeValue, 2) + DOUBLE = typing___cast(MetricDescriptor.TypeValue, 3) + MONOTONIC_DOUBLE = typing___cast(MetricDescriptor.TypeValue, 4) + HISTOGRAM = typing___cast(MetricDescriptor.TypeValue, 5) + SUMMARY = typing___cast(MetricDescriptor.TypeValue, 6) + INVALID_TYPE = typing___cast(MetricDescriptor.TypeValue, 0) + INT64 = typing___cast(MetricDescriptor.TypeValue, 1) + MONOTONIC_INT64 = typing___cast(MetricDescriptor.TypeValue, 2) + DOUBLE = typing___cast(MetricDescriptor.TypeValue, 3) + MONOTONIC_DOUBLE = typing___cast(MetricDescriptor.TypeValue, 4) + HISTOGRAM = typing___cast(MetricDescriptor.TypeValue, 5) + SUMMARY = typing___cast(MetricDescriptor.TypeValue, 6) + type___Type = Type + + TemporalityValue = typing___NewType('TemporalityValue', builtin___int) + type___TemporalityValue = TemporalityValue + class Temporality(object): + DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ... + @classmethod + def Name(cls, number: builtin___int) -> builtin___str: ... + @classmethod + def Value(cls, name: builtin___str) -> MetricDescriptor.TemporalityValue: ... + @classmethod + def keys(cls) -> typing___List[builtin___str]: ... + @classmethod + def values(cls) -> typing___List[MetricDescriptor.TemporalityValue]: ... + @classmethod + def items(cls) -> typing___List[typing___Tuple[builtin___str, MetricDescriptor.TemporalityValue]]: ... + INVALID_TEMPORALITY = typing___cast(MetricDescriptor.TemporalityValue, 0) + INSTANTANEOUS = typing___cast(MetricDescriptor.TemporalityValue, 1) + DELTA = typing___cast(MetricDescriptor.TemporalityValue, 2) + CUMULATIVE = typing___cast(MetricDescriptor.TemporalityValue, 3) + INVALID_TEMPORALITY = typing___cast(MetricDescriptor.TemporalityValue, 0) + INSTANTANEOUS = typing___cast(MetricDescriptor.TemporalityValue, 1) + DELTA = typing___cast(MetricDescriptor.TemporalityValue, 2) + CUMULATIVE = typing___cast(MetricDescriptor.TemporalityValue, 3) + type___Temporality = Temporality + + name: typing___Text = ... + description: typing___Text = ... + unit: typing___Text = ... + type: type___MetricDescriptor.TypeValue = ... + temporality: type___MetricDescriptor.TemporalityValue = ... + + def __init__(self, + *, + name : typing___Optional[typing___Text] = None, + description : typing___Optional[typing___Text] = None, + unit : typing___Optional[typing___Text] = None, + type : typing___Optional[type___MetricDescriptor.TypeValue] = None, + temporality : typing___Optional[type___MetricDescriptor.TemporalityValue] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> MetricDescriptor: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> MetricDescriptor: ... + def ClearField(self, field_name: typing_extensions___Literal[u"description",b"description",u"name",b"name",u"temporality",b"temporality",u"type",b"type",u"unit",b"unit"]) -> None: ... +type___MetricDescriptor = MetricDescriptor + +class Int64DataPoint(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + start_time_unix_nano: builtin___int = ... + time_unix_nano: builtin___int = ... + value: builtin___int = ... + + @property + def labels(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]: ... + + def __init__(self, + *, + labels : typing___Optional[typing___Iterable[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]] = None, + start_time_unix_nano : typing___Optional[builtin___int] = None, + time_unix_nano : typing___Optional[builtin___int] = None, + value : typing___Optional[builtin___int] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> Int64DataPoint: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Int64DataPoint: ... + def ClearField(self, field_name: typing_extensions___Literal[u"labels",b"labels",u"start_time_unix_nano",b"start_time_unix_nano",u"time_unix_nano",b"time_unix_nano",u"value",b"value"]) -> None: ... +type___Int64DataPoint = Int64DataPoint + +class DoubleDataPoint(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + start_time_unix_nano: builtin___int = ... + time_unix_nano: builtin___int = ... + value: builtin___float = ... + + @property + def labels(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]: ... + + def __init__(self, + *, + labels : typing___Optional[typing___Iterable[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]] = None, + start_time_unix_nano : typing___Optional[builtin___int] = None, + time_unix_nano : typing___Optional[builtin___int] = None, + value : typing___Optional[builtin___float] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> DoubleDataPoint: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> DoubleDataPoint: ... + def ClearField(self, field_name: typing_extensions___Literal[u"labels",b"labels",u"start_time_unix_nano",b"start_time_unix_nano",u"time_unix_nano",b"time_unix_nano",u"value",b"value"]) -> None: ... +type___DoubleDataPoint = DoubleDataPoint + +class HistogramDataPoint(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + class Bucket(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + class Exemplar(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + value: builtin___float = ... + time_unix_nano: builtin___int = ... + + @property + def attachments(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]: ... + + def __init__(self, + *, + value : typing___Optional[builtin___float] = None, + time_unix_nano : typing___Optional[builtin___int] = None, + attachments : typing___Optional[typing___Iterable[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> HistogramDataPoint.Bucket.Exemplar: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> HistogramDataPoint.Bucket.Exemplar: ... + def ClearField(self, field_name: typing_extensions___Literal[u"attachments",b"attachments",u"time_unix_nano",b"time_unix_nano",u"value",b"value"]) -> None: ... + type___Exemplar = Exemplar + + count: builtin___int = ... + + @property + def exemplar(self) -> type___HistogramDataPoint.Bucket.Exemplar: ... + + def __init__(self, + *, + count : typing___Optional[builtin___int] = None, + exemplar : typing___Optional[type___HistogramDataPoint.Bucket.Exemplar] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> HistogramDataPoint.Bucket: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> HistogramDataPoint.Bucket: ... + def HasField(self, field_name: typing_extensions___Literal[u"exemplar",b"exemplar"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"count",b"count",u"exemplar",b"exemplar"]) -> None: ... + type___Bucket = Bucket + + start_time_unix_nano: builtin___int = ... + time_unix_nano: builtin___int = ... + count: builtin___int = ... + sum: builtin___float = ... + explicit_bounds: google___protobuf___internal___containers___RepeatedScalarFieldContainer[builtin___float] = ... + + @property + def labels(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]: ... + + @property + def buckets(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___HistogramDataPoint.Bucket]: ... + + def __init__(self, + *, + labels : typing___Optional[typing___Iterable[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]] = None, + start_time_unix_nano : typing___Optional[builtin___int] = None, + time_unix_nano : typing___Optional[builtin___int] = None, + count : typing___Optional[builtin___int] = None, + sum : typing___Optional[builtin___float] = None, + buckets : typing___Optional[typing___Iterable[type___HistogramDataPoint.Bucket]] = None, + explicit_bounds : typing___Optional[typing___Iterable[builtin___float]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> HistogramDataPoint: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> HistogramDataPoint: ... + def ClearField(self, field_name: typing_extensions___Literal[u"buckets",b"buckets",u"count",b"count",u"explicit_bounds",b"explicit_bounds",u"labels",b"labels",u"start_time_unix_nano",b"start_time_unix_nano",u"sum",b"sum",u"time_unix_nano",b"time_unix_nano"]) -> None: ... +type___HistogramDataPoint = HistogramDataPoint + +class SummaryDataPoint(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + class ValueAtPercentile(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + percentile: builtin___float = ... + value: builtin___float = ... + + def __init__(self, + *, + percentile : typing___Optional[builtin___float] = None, + value : typing___Optional[builtin___float] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> SummaryDataPoint.ValueAtPercentile: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> SummaryDataPoint.ValueAtPercentile: ... + def ClearField(self, field_name: typing_extensions___Literal[u"percentile",b"percentile",u"value",b"value"]) -> None: ... + type___ValueAtPercentile = ValueAtPercentile + + start_time_unix_nano: builtin___int = ... + time_unix_nano: builtin___int = ... + count: builtin___int = ... + sum: builtin___float = ... + + @property + def labels(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]: ... + + @property + def percentile_values(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___SummaryDataPoint.ValueAtPercentile]: ... + + def __init__(self, + *, + labels : typing___Optional[typing___Iterable[opentelemetry___proto___common___v1___common_pb2___StringKeyValue]] = None, + start_time_unix_nano : typing___Optional[builtin___int] = None, + time_unix_nano : typing___Optional[builtin___int] = None, + count : typing___Optional[builtin___int] = None, + sum : typing___Optional[builtin___float] = None, + percentile_values : typing___Optional[typing___Iterable[type___SummaryDataPoint.ValueAtPercentile]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> SummaryDataPoint: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> SummaryDataPoint: ... + def ClearField(self, field_name: typing_extensions___Literal[u"count",b"count",u"labels",b"labels",u"percentile_values",b"percentile_values",u"start_time_unix_nano",b"start_time_unix_nano",u"sum",b"sum",u"time_unix_nano",b"time_unix_nano"]) -> None: ... +type___SummaryDataPoint = SummaryDataPoint diff --git a/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py index 5126a1b76e6..95dcf479ff6 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py @@ -19,7 +19,6 @@ package='opentelemetry.proto.resource.v1', syntax='proto3', serialized_options=b'\n\"io.opentelemetry.proto.resource.v1B\rResourceProtoP\001Z@github.com/open-telemetry/opentelemetry-proto/gen/go/resource/v1', - create_key=_descriptor._internal_create_key, serialized_pb=b'\n.opentelemetry/proto/resource/v1/resource.proto\x12\x1fopentelemetry.proto.resource.v1\x1a*opentelemetry/proto/common/v1/common.proto\"r\n\x08Resource\x12\x44\n\nattributes\x18\x01 \x03(\x0b\x32\x30.opentelemetry.proto.common.v1.AttributeKeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x02 \x01(\rBw\n\"io.opentelemetry.proto.resource.v1B\rResourceProtoP\x01Z@github.com/open-telemetry/opentelemetry-proto/gen/go/resource/v1b\x06proto3' , dependencies=[opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2.DESCRIPTOR,]) @@ -33,7 +32,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='attributes', full_name='opentelemetry.proto.resource.v1.Resource.attributes', index=0, @@ -41,14 +39,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dropped_attributes_count', full_name='opentelemetry.proto.resource.v1.Resource.dropped_attributes_count', index=1, number=2, 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], diff --git a/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.pyi b/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.pyi new file mode 100644 index 00000000000..2f9f5afca22 --- /dev/null +++ b/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.pyi @@ -0,0 +1,61 @@ +# @generated by generate_proto_mypy_stubs.py. Do not edit! +import sys +from google.protobuf.descriptor import ( + Descriptor as google___protobuf___descriptor___Descriptor, + FileDescriptor as google___protobuf___descriptor___FileDescriptor, +) + +from google.protobuf.internal.containers import ( + RepeatedCompositeFieldContainer as google___protobuf___internal___containers___RepeatedCompositeFieldContainer, +) + +from google.protobuf.message import ( + Message as google___protobuf___message___Message, +) + +from opentelemetry.proto.common.v1.common_pb2 import ( + AttributeKeyValue as opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue, +) + +from typing import ( + Iterable as typing___Iterable, + Optional as typing___Optional, + Union as typing___Union, +) + +from typing_extensions import ( + Literal as typing_extensions___Literal, +) + + +builtin___bool = bool +builtin___bytes = bytes +builtin___float = float +builtin___int = int +if sys.version_info < (3,): + builtin___buffer = buffer + builtin___unicode = unicode + + +DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ... + +class Resource(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + dropped_attributes_count: builtin___int = ... + + @property + def attributes(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue]: ... + + def __init__(self, + *, + attributes : typing___Optional[typing___Iterable[opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue]] = None, + dropped_attributes_count : typing___Optional[builtin___int] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> Resource: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Resource: ... + def ClearField(self, field_name: typing_extensions___Literal[u"attributes",b"attributes",u"dropped_attributes_count",b"dropped_attributes_count"]) -> None: ... +type___Resource = Resource diff --git a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_config_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_config_pb2.py index ad1857d37b5..de6ca90f5f1 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_config_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_config_pb2.py @@ -18,7 +18,6 @@ package='opentelemetry.proto.trace.v1', syntax='proto3', serialized_options=b'\n\037io.opentelemetry.proto.trace.v1B\020TraceConfigProtoP\001ZGgithub.com/open-telemetry/opentelemetry-proto/gen/go/collector/trace/v1', - create_key=_descriptor._internal_create_key, serialized_pb=b'\n/opentelemetry/proto/trace/v1/trace_config.proto\x12\x1copentelemetry.proto.trace.v1\"\xc8\x03\n\x0bTraceConfig\x12I\n\x10\x63onstant_sampler\x18\x01 \x01(\x0b\x32-.opentelemetry.proto.trace.v1.ConstantSamplerH\x00\x12O\n\x13probability_sampler\x18\x02 \x01(\x0b\x32\x30.opentelemetry.proto.trace.v1.ProbabilitySamplerH\x00\x12R\n\x15rate_limiting_sampler\x18\x03 \x01(\x0b\x32\x31.opentelemetry.proto.trace.v1.RateLimitingSamplerH\x00\x12 \n\x18max_number_of_attributes\x18\x04 \x01(\x03\x12\"\n\x1amax_number_of_timed_events\x18\x05 \x01(\x03\x12\x30\n(max_number_of_attributes_per_timed_event\x18\x06 \x01(\x03\x12\x1b\n\x13max_number_of_links\x18\x07 \x01(\x03\x12)\n!max_number_of_attributes_per_link\x18\x08 \x01(\x03\x42\t\n\x07sampler\"\xa9\x01\n\x0f\x43onstantSampler\x12P\n\x08\x64\x65\x63ision\x18\x01 \x01(\x0e\x32>.opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision\"D\n\x10\x43onstantDecision\x12\x0e\n\nALWAYS_OFF\x10\x00\x12\r\n\tALWAYS_ON\x10\x01\x12\x11\n\rALWAYS_PARENT\x10\x02\"1\n\x12ProbabilitySampler\x12\x1b\n\x13samplingProbability\x18\x01 \x01(\x01\"\"\n\x13RateLimitingSampler\x12\x0b\n\x03qps\x18\x01 \x01(\x03\x42~\n\x1fio.opentelemetry.proto.trace.v1B\x10TraceConfigProtoP\x01ZGgithub.com/open-telemetry/opentelemetry-proto/gen/go/collector/trace/v1b\x06proto3' ) @@ -29,23 +28,19 @@ full_name='opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision', filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='ALWAYS_OFF', index=0, number=0, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='ALWAYS_ON', index=1, number=1, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='ALWAYS_PARENT', index=2, number=2, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), ], containing_type=None, serialized_options=None, @@ -61,7 +56,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='constant_sampler', full_name='opentelemetry.proto.trace.v1.TraceConfig.constant_sampler', index=0, @@ -69,56 +63,56 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='probability_sampler', full_name='opentelemetry.proto.trace.v1.TraceConfig.probability_sampler', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rate_limiting_sampler', full_name='opentelemetry.proto.trace.v1.TraceConfig.rate_limiting_sampler', index=2, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_number_of_attributes', full_name='opentelemetry.proto.trace.v1.TraceConfig.max_number_of_attributes', index=3, number=4, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_number_of_timed_events', full_name='opentelemetry.proto.trace.v1.TraceConfig.max_number_of_timed_events', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_number_of_attributes_per_timed_event', full_name='opentelemetry.proto.trace.v1.TraceConfig.max_number_of_attributes_per_timed_event', index=5, number=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_number_of_links', full_name='opentelemetry.proto.trace.v1.TraceConfig.max_number_of_links', index=6, number=7, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_number_of_attributes_per_link', full_name='opentelemetry.proto.trace.v1.TraceConfig.max_number_of_attributes_per_link', index=7, number=8, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -132,9 +126,7 @@ oneofs=[ _descriptor.OneofDescriptor( name='sampler', full_name='opentelemetry.proto.trace.v1.TraceConfig.sampler', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), + index=0, containing_type=None, fields=[]), ], serialized_start=82, serialized_end=538, @@ -147,7 +139,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='decision', full_name='opentelemetry.proto.trace.v1.ConstantSampler.decision', index=0, @@ -155,7 +146,7 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -180,7 +171,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='samplingProbability', full_name='opentelemetry.proto.trace.v1.ProbabilitySampler.samplingProbability', index=0, @@ -188,7 +178,7 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -212,7 +202,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='qps', full_name='opentelemetry.proto.trace.v1.RateLimitingSampler.qps', index=0, @@ -220,7 +209,7 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], diff --git a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_config_pb2.pyi b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_config_pb2.pyi new file mode 100644 index 00000000000..9cee74883c7 --- /dev/null +++ b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_config_pb2.pyi @@ -0,0 +1,149 @@ +# @generated by generate_proto_mypy_stubs.py. Do not edit! +import sys +from google.protobuf.descriptor import ( + Descriptor as google___protobuf___descriptor___Descriptor, + EnumDescriptor as google___protobuf___descriptor___EnumDescriptor, + FileDescriptor as google___protobuf___descriptor___FileDescriptor, +) + +from google.protobuf.message import ( + Message as google___protobuf___message___Message, +) + +from typing import ( + List as typing___List, + NewType as typing___NewType, + Optional as typing___Optional, + Tuple as typing___Tuple, + Union as typing___Union, + cast as typing___cast, +) + +from typing_extensions import ( + Literal as typing_extensions___Literal, +) + + +builtin___bool = bool +builtin___bytes = bytes +builtin___float = float +builtin___int = int +builtin___str = str +if sys.version_info < (3,): + builtin___buffer = buffer + builtin___unicode = unicode + + +DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ... + +class TraceConfig(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + max_number_of_attributes: builtin___int = ... + max_number_of_timed_events: builtin___int = ... + max_number_of_attributes_per_timed_event: builtin___int = ... + max_number_of_links: builtin___int = ... + max_number_of_attributes_per_link: builtin___int = ... + + @property + def constant_sampler(self) -> type___ConstantSampler: ... + + @property + def probability_sampler(self) -> type___ProbabilitySampler: ... + + @property + def rate_limiting_sampler(self) -> type___RateLimitingSampler: ... + + def __init__(self, + *, + constant_sampler : typing___Optional[type___ConstantSampler] = None, + probability_sampler : typing___Optional[type___ProbabilitySampler] = None, + rate_limiting_sampler : typing___Optional[type___RateLimitingSampler] = None, + max_number_of_attributes : typing___Optional[builtin___int] = None, + max_number_of_timed_events : typing___Optional[builtin___int] = None, + max_number_of_attributes_per_timed_event : typing___Optional[builtin___int] = None, + max_number_of_links : typing___Optional[builtin___int] = None, + max_number_of_attributes_per_link : typing___Optional[builtin___int] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> TraceConfig: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> TraceConfig: ... + def HasField(self, field_name: typing_extensions___Literal[u"constant_sampler",b"constant_sampler",u"probability_sampler",b"probability_sampler",u"rate_limiting_sampler",b"rate_limiting_sampler",u"sampler",b"sampler"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"constant_sampler",b"constant_sampler",u"max_number_of_attributes",b"max_number_of_attributes",u"max_number_of_attributes_per_link",b"max_number_of_attributes_per_link",u"max_number_of_attributes_per_timed_event",b"max_number_of_attributes_per_timed_event",u"max_number_of_links",b"max_number_of_links",u"max_number_of_timed_events",b"max_number_of_timed_events",u"probability_sampler",b"probability_sampler",u"rate_limiting_sampler",b"rate_limiting_sampler",u"sampler",b"sampler"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions___Literal[u"sampler",b"sampler"]) -> typing_extensions___Literal["constant_sampler","probability_sampler","rate_limiting_sampler"]: ... +type___TraceConfig = TraceConfig + +class ConstantSampler(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + ConstantDecisionValue = typing___NewType('ConstantDecisionValue', builtin___int) + type___ConstantDecisionValue = ConstantDecisionValue + class ConstantDecision(object): + DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ... + @classmethod + def Name(cls, number: builtin___int) -> builtin___str: ... + @classmethod + def Value(cls, name: builtin___str) -> ConstantSampler.ConstantDecisionValue: ... + @classmethod + def keys(cls) -> typing___List[builtin___str]: ... + @classmethod + def values(cls) -> typing___List[ConstantSampler.ConstantDecisionValue]: ... + @classmethod + def items(cls) -> typing___List[typing___Tuple[builtin___str, ConstantSampler.ConstantDecisionValue]]: ... + ALWAYS_OFF = typing___cast(ConstantSampler.ConstantDecisionValue, 0) + ALWAYS_ON = typing___cast(ConstantSampler.ConstantDecisionValue, 1) + ALWAYS_PARENT = typing___cast(ConstantSampler.ConstantDecisionValue, 2) + ALWAYS_OFF = typing___cast(ConstantSampler.ConstantDecisionValue, 0) + ALWAYS_ON = typing___cast(ConstantSampler.ConstantDecisionValue, 1) + ALWAYS_PARENT = typing___cast(ConstantSampler.ConstantDecisionValue, 2) + type___ConstantDecision = ConstantDecision + + decision: type___ConstantSampler.ConstantDecisionValue = ... + + def __init__(self, + *, + decision : typing___Optional[type___ConstantSampler.ConstantDecisionValue] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> ConstantSampler: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> ConstantSampler: ... + def ClearField(self, field_name: typing_extensions___Literal[u"decision",b"decision"]) -> None: ... +type___ConstantSampler = ConstantSampler + +class ProbabilitySampler(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + samplingProbability: builtin___float = ... + + def __init__(self, + *, + samplingProbability : typing___Optional[builtin___float] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> ProbabilitySampler: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> ProbabilitySampler: ... + def ClearField(self, field_name: typing_extensions___Literal[u"samplingProbability",b"samplingProbability"]) -> None: ... +type___ProbabilitySampler = ProbabilitySampler + +class RateLimitingSampler(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + qps: builtin___int = ... + + def __init__(self, + *, + qps : typing___Optional[builtin___int] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> RateLimitingSampler: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> RateLimitingSampler: ... + def ClearField(self, field_name: typing_extensions___Literal[u"qps",b"qps"]) -> None: ... +type___RateLimitingSampler = RateLimitingSampler diff --git a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py index cea946eebe2..0b8bc152486 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py @@ -20,7 +20,6 @@ package='opentelemetry.proto.trace.v1', syntax='proto3', serialized_options=b'\n\037io.opentelemetry.proto.trace.v1B\nTraceProtoP\001Z=github.com/open-telemetry/opentelemetry-proto/gen/go/trace/v1', - create_key=_descriptor._internal_create_key, serialized_pb=b'\n(opentelemetry/proto/trace/v1/trace.proto\x12\x1copentelemetry.proto.trace.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"\xae\x01\n\rResourceSpans\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12`\n\x1dinstrumentation_library_spans\x18\x02 \x03(\x0b\x32\x39.opentelemetry.proto.trace.v1.InstrumentationLibrarySpans\"\xa8\x01\n\x1bInstrumentationLibrarySpans\x12V\n\x17instrumentation_library\x18\x01 \x01(\x0b\x32\x35.opentelemetry.proto.common.v1.InstrumentationLibrary\x12\x31\n\x05spans\x18\x02 \x03(\x0b\x32\".opentelemetry.proto.trace.v1.Span\"\xce\x07\n\x04Span\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\x12\x13\n\x0btrace_state\x18\x03 \x01(\t\x12\x16\n\x0eparent_span_id\x18\x04 \x01(\x0c\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x39\n\x04kind\x18\x06 \x01(\x0e\x32+.opentelemetry.proto.trace.v1.Span.SpanKind\x12\x1c\n\x14start_time_unix_nano\x18\x07 \x01(\x06\x12\x1a\n\x12\x65nd_time_unix_nano\x18\x08 \x01(\x06\x12\x44\n\nattributes\x18\t \x03(\x0b\x32\x30.opentelemetry.proto.common.v1.AttributeKeyValue\x12 \n\x18\x64ropped_attributes_count\x18\n \x01(\r\x12\x38\n\x06\x65vents\x18\x0b \x03(\x0b\x32(.opentelemetry.proto.trace.v1.Span.Event\x12\x1c\n\x14\x64ropped_events_count\x18\x0c \x01(\r\x12\x36\n\x05links\x18\r \x03(\x0b\x32\'.opentelemetry.proto.trace.v1.Span.Link\x12\x1b\n\x13\x64ropped_links_count\x18\x0e \x01(\r\x12\x34\n\x06status\x18\x0f \x01(\x0b\x32$.opentelemetry.proto.trace.v1.Status\x1a\x95\x01\n\x05\x45vent\x12\x16\n\x0etime_unix_nano\x18\x01 \x01(\x06\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x44\n\nattributes\x18\x03 \x03(\x0b\x32\x30.opentelemetry.proto.common.v1.AttributeKeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x04 \x01(\r\x1a\xa6\x01\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\x12\x13\n\x0btrace_state\x18\x03 \x01(\t\x12\x44\n\nattributes\x18\x04 \x03(\x0b\x32\x30.opentelemetry.proto.common.v1.AttributeKeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x05 \x01(\r\"g\n\x08SpanKind\x12\x19\n\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08INTERNAL\x10\x01\x12\n\n\x06SERVER\x10\x02\x12\n\n\x06\x43LIENT\x10\x03\x12\x0c\n\x08PRODUCER\x10\x04\x12\x0c\n\x08\x43ONSUMER\x10\x05\"\x98\x03\n\x06Status\x12=\n\x04\x63ode\x18\x01 \x01(\x0e\x32/.opentelemetry.proto.trace.v1.Status.StatusCode\x12\x0f\n\x07message\x18\x02 \x01(\t\"\xbd\x02\n\nStatusCode\x12\x06\n\x02Ok\x10\x00\x12\r\n\tCancelled\x10\x01\x12\x10\n\x0cUnknownError\x10\x02\x12\x13\n\x0fInvalidArgument\x10\x03\x12\x14\n\x10\x44\x65\x61\x64lineExceeded\x10\x04\x12\x0c\n\x08NotFound\x10\x05\x12\x11\n\rAlreadyExists\x10\x06\x12\x14\n\x10PermissionDenied\x10\x07\x12\x15\n\x11ResourceExhausted\x10\x08\x12\x16\n\x12\x46\x61iledPrecondition\x10\t\x12\x0b\n\x07\x41\x62orted\x10\n\x12\x0e\n\nOutOfRange\x10\x0b\x12\x11\n\rUnimplemented\x10\x0c\x12\x11\n\rInternalError\x10\r\x12\x0f\n\x0bUnavailable\x10\x0e\x12\x0c\n\x08\x44\x61taLoss\x10\x0f\x12\x13\n\x0fUnauthenticated\x10\x10\x42n\n\x1fio.opentelemetry.proto.trace.v1B\nTraceProtoP\x01Z=github.com/open-telemetry/opentelemetry-proto/gen/go/trace/v1b\x06proto3' , dependencies=[opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2.DESCRIPTOR,opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2.DESCRIPTOR,]) @@ -32,38 +31,31 @@ full_name='opentelemetry.proto.trace.v1.Span.SpanKind', filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='SPAN_KIND_UNSPECIFIED', index=0, number=0, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='INTERNAL', index=1, number=1, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='SERVER', index=2, number=2, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='CLIENT', index=3, number=3, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='PRODUCER', index=4, number=4, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='CONSUMER', index=5, number=5, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), ], containing_type=None, serialized_options=None, @@ -77,93 +69,75 @@ full_name='opentelemetry.proto.trace.v1.Status.StatusCode', filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='Ok', index=0, number=0, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='Cancelled', index=1, number=1, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='UnknownError', index=2, number=2, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='InvalidArgument', index=3, number=3, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='DeadlineExceeded', index=4, number=4, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='NotFound', index=5, number=5, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='AlreadyExists', index=6, number=6, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='PermissionDenied', index=7, number=7, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='ResourceExhausted', index=8, number=8, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='FailedPrecondition', index=9, number=9, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='Aborted', index=10, number=10, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='OutOfRange', index=11, number=11, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='Unimplemented', index=12, number=12, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='InternalError', index=13, number=13, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='Unavailable', index=14, number=14, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='DataLoss', index=15, number=15, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), _descriptor.EnumValueDescriptor( name='Unauthenticated', index=16, number=16, serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), + type=None), ], containing_type=None, serialized_options=None, @@ -179,7 +153,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='resource', full_name='opentelemetry.proto.trace.v1.ResourceSpans.resource', index=0, @@ -187,14 +160,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='instrumentation_library_spans', full_name='opentelemetry.proto.trace.v1.ResourceSpans.instrumentation_library_spans', 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -218,7 +191,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='instrumentation_library', full_name='opentelemetry.proto.trace.v1.InstrumentationLibrarySpans.instrumentation_library', index=0, @@ -226,14 +198,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='spans', full_name='opentelemetry.proto.trace.v1.InstrumentationLibrarySpans.spans', 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -257,7 +229,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='time_unix_nano', full_name='opentelemetry.proto.trace.v1.Span.Event.time_unix_nano', index=0, @@ -265,28 +236,28 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='name', full_name='opentelemetry.proto.trace.v1.Span.Event.name', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='attributes', full_name='opentelemetry.proto.trace.v1.Span.Event.attributes', index=2, number=3, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dropped_attributes_count', full_name='opentelemetry.proto.trace.v1.Span.Event.dropped_attributes_count', index=3, number=4, 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -309,7 +280,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='trace_id', full_name='opentelemetry.proto.trace.v1.Span.Link.trace_id', index=0, @@ -317,35 +287,35 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='span_id', full_name='opentelemetry.proto.trace.v1.Span.Link.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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='trace_state', full_name='opentelemetry.proto.trace.v1.Span.Link.trace_state', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='attributes', full_name='opentelemetry.proto.trace.v1.Span.Link.attributes', 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dropped_attributes_count', full_name='opentelemetry.proto.trace.v1.Span.Link.dropped_attributes_count', 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -368,7 +338,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='trace_id', full_name='opentelemetry.proto.trace.v1.Span.trace_id', index=0, @@ -376,105 +345,105 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='span_id', full_name='opentelemetry.proto.trace.v1.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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='trace_state', full_name='opentelemetry.proto.trace.v1.Span.trace_state', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='parent_span_id', full_name='opentelemetry.proto.trace.v1.Span.parent_span_id', index=3, number=4, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='name', full_name='opentelemetry.proto.trace.v1.Span.name', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='kind', full_name='opentelemetry.proto.trace.v1.Span.kind', index=5, number=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_time_unix_nano', full_name='opentelemetry.proto.trace.v1.Span.start_time_unix_nano', index=6, number=7, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='end_time_unix_nano', full_name='opentelemetry.proto.trace.v1.Span.end_time_unix_nano', index=7, number=8, type=6, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='attributes', full_name='opentelemetry.proto.trace.v1.Span.attributes', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dropped_attributes_count', full_name='opentelemetry.proto.trace.v1.Span.dropped_attributes_count', index=9, number=10, 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='events', full_name='opentelemetry.proto.trace.v1.Span.events', index=10, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dropped_events_count', full_name='opentelemetry.proto.trace.v1.Span.dropped_events_count', index=11, number=12, 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='links', full_name='opentelemetry.proto.trace.v1.Span.links', index=12, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dropped_links_count', full_name='opentelemetry.proto.trace.v1.Span.dropped_links_count', index=13, number=14, 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=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='status', full_name='opentelemetry.proto.trace.v1.Span.status', index=14, number=15, 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -499,7 +468,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='code', full_name='opentelemetry.proto.trace.v1.Status.code', index=0, @@ -507,14 +475,14 @@ 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='message', full_name='opentelemetry.proto.trace.v1.Status.message', 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, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], diff --git a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.pyi b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.pyi new file mode 100644 index 00000000000..adcc1dade36 --- /dev/null +++ b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.pyi @@ -0,0 +1,303 @@ +# @generated by generate_proto_mypy_stubs.py. Do not edit! +import sys +from google.protobuf.descriptor import ( + Descriptor as google___protobuf___descriptor___Descriptor, + EnumDescriptor as google___protobuf___descriptor___EnumDescriptor, + FileDescriptor as google___protobuf___descriptor___FileDescriptor, +) + +from google.protobuf.internal.containers import ( + RepeatedCompositeFieldContainer as google___protobuf___internal___containers___RepeatedCompositeFieldContainer, +) + +from google.protobuf.message import ( + Message as google___protobuf___message___Message, +) + +from opentelemetry.proto.common.v1.common_pb2 import ( + AttributeKeyValue as opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue, + InstrumentationLibrary as opentelemetry___proto___common___v1___common_pb2___InstrumentationLibrary, +) + +from opentelemetry.proto.resource.v1.resource_pb2 import ( + Resource as opentelemetry___proto___resource___v1___resource_pb2___Resource, +) + +from typing import ( + Iterable as typing___Iterable, + List as typing___List, + NewType as typing___NewType, + Optional as typing___Optional, + Text as typing___Text, + Tuple as typing___Tuple, + Union as typing___Union, + cast as typing___cast, +) + +from typing_extensions import ( + Literal as typing_extensions___Literal, +) + + +builtin___bool = bool +builtin___bytes = bytes +builtin___float = float +builtin___int = int +builtin___str = str +if sys.version_info < (3,): + builtin___buffer = buffer + builtin___unicode = unicode + + +DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ... + +class ResourceSpans(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + + @property + def resource(self) -> opentelemetry___proto___resource___v1___resource_pb2___Resource: ... + + @property + def instrumentation_library_spans(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___InstrumentationLibrarySpans]: ... + + def __init__(self, + *, + resource : typing___Optional[opentelemetry___proto___resource___v1___resource_pb2___Resource] = None, + instrumentation_library_spans : typing___Optional[typing___Iterable[type___InstrumentationLibrarySpans]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> ResourceSpans: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> ResourceSpans: ... + def HasField(self, field_name: typing_extensions___Literal[u"resource",b"resource"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"instrumentation_library_spans",b"instrumentation_library_spans",u"resource",b"resource"]) -> None: ... +type___ResourceSpans = ResourceSpans + +class InstrumentationLibrarySpans(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + + @property + def instrumentation_library(self) -> opentelemetry___proto___common___v1___common_pb2___InstrumentationLibrary: ... + + @property + def spans(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___Span]: ... + + def __init__(self, + *, + instrumentation_library : typing___Optional[opentelemetry___proto___common___v1___common_pb2___InstrumentationLibrary] = None, + spans : typing___Optional[typing___Iterable[type___Span]] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> InstrumentationLibrarySpans: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> InstrumentationLibrarySpans: ... + def HasField(self, field_name: typing_extensions___Literal[u"instrumentation_library",b"instrumentation_library"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"instrumentation_library",b"instrumentation_library",u"spans",b"spans"]) -> None: ... +type___InstrumentationLibrarySpans = InstrumentationLibrarySpans + +class Span(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + SpanKindValue = typing___NewType('SpanKindValue', builtin___int) + type___SpanKindValue = SpanKindValue + class SpanKind(object): + DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ... + @classmethod + def Name(cls, number: builtin___int) -> builtin___str: ... + @classmethod + def Value(cls, name: builtin___str) -> Span.SpanKindValue: ... + @classmethod + def keys(cls) -> typing___List[builtin___str]: ... + @classmethod + def values(cls) -> typing___List[Span.SpanKindValue]: ... + @classmethod + def items(cls) -> typing___List[typing___Tuple[builtin___str, Span.SpanKindValue]]: ... + SPAN_KIND_UNSPECIFIED = typing___cast(Span.SpanKindValue, 0) + INTERNAL = typing___cast(Span.SpanKindValue, 1) + SERVER = typing___cast(Span.SpanKindValue, 2) + CLIENT = typing___cast(Span.SpanKindValue, 3) + PRODUCER = typing___cast(Span.SpanKindValue, 4) + CONSUMER = typing___cast(Span.SpanKindValue, 5) + SPAN_KIND_UNSPECIFIED = typing___cast(Span.SpanKindValue, 0) + INTERNAL = typing___cast(Span.SpanKindValue, 1) + SERVER = typing___cast(Span.SpanKindValue, 2) + CLIENT = typing___cast(Span.SpanKindValue, 3) + PRODUCER = typing___cast(Span.SpanKindValue, 4) + CONSUMER = typing___cast(Span.SpanKindValue, 5) + type___SpanKind = SpanKind + + class Event(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + time_unix_nano: builtin___int = ... + name: typing___Text = ... + dropped_attributes_count: builtin___int = ... + + @property + def attributes(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue]: ... + + def __init__(self, + *, + time_unix_nano : typing___Optional[builtin___int] = None, + name : typing___Optional[typing___Text] = None, + attributes : typing___Optional[typing___Iterable[opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue]] = None, + dropped_attributes_count : typing___Optional[builtin___int] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> Span.Event: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Span.Event: ... + def ClearField(self, field_name: typing_extensions___Literal[u"attributes",b"attributes",u"dropped_attributes_count",b"dropped_attributes_count",u"name",b"name",u"time_unix_nano",b"time_unix_nano"]) -> None: ... + type___Event = Event + + class Link(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + trace_id: builtin___bytes = ... + span_id: builtin___bytes = ... + trace_state: typing___Text = ... + dropped_attributes_count: builtin___int = ... + + @property + def attributes(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue]: ... + + def __init__(self, + *, + trace_id : typing___Optional[builtin___bytes] = None, + span_id : typing___Optional[builtin___bytes] = None, + trace_state : typing___Optional[typing___Text] = None, + attributes : typing___Optional[typing___Iterable[opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue]] = None, + dropped_attributes_count : typing___Optional[builtin___int] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> Span.Link: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Span.Link: ... + def ClearField(self, field_name: typing_extensions___Literal[u"attributes",b"attributes",u"dropped_attributes_count",b"dropped_attributes_count",u"span_id",b"span_id",u"trace_id",b"trace_id",u"trace_state",b"trace_state"]) -> None: ... + type___Link = Link + + trace_id: builtin___bytes = ... + span_id: builtin___bytes = ... + trace_state: typing___Text = ... + parent_span_id: builtin___bytes = ... + name: typing___Text = ... + kind: type___Span.SpanKindValue = ... + start_time_unix_nano: builtin___int = ... + end_time_unix_nano: builtin___int = ... + dropped_attributes_count: builtin___int = ... + dropped_events_count: builtin___int = ... + dropped_links_count: builtin___int = ... + + @property + def attributes(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue]: ... + + @property + def events(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___Span.Event]: ... + + @property + def links(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[type___Span.Link]: ... + + @property + def status(self) -> type___Status: ... + + def __init__(self, + *, + trace_id : typing___Optional[builtin___bytes] = None, + span_id : typing___Optional[builtin___bytes] = None, + trace_state : typing___Optional[typing___Text] = None, + parent_span_id : typing___Optional[builtin___bytes] = None, + name : typing___Optional[typing___Text] = None, + kind : typing___Optional[type___Span.SpanKindValue] = None, + start_time_unix_nano : typing___Optional[builtin___int] = None, + end_time_unix_nano : typing___Optional[builtin___int] = None, + attributes : typing___Optional[typing___Iterable[opentelemetry___proto___common___v1___common_pb2___AttributeKeyValue]] = None, + dropped_attributes_count : typing___Optional[builtin___int] = None, + events : typing___Optional[typing___Iterable[type___Span.Event]] = None, + dropped_events_count : typing___Optional[builtin___int] = None, + links : typing___Optional[typing___Iterable[type___Span.Link]] = None, + dropped_links_count : typing___Optional[builtin___int] = None, + status : typing___Optional[type___Status] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> Span: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Span: ... + def HasField(self, field_name: typing_extensions___Literal[u"status",b"status"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"attributes",b"attributes",u"dropped_attributes_count",b"dropped_attributes_count",u"dropped_events_count",b"dropped_events_count",u"dropped_links_count",b"dropped_links_count",u"end_time_unix_nano",b"end_time_unix_nano",u"events",b"events",u"kind",b"kind",u"links",b"links",u"name",b"name",u"parent_span_id",b"parent_span_id",u"span_id",b"span_id",u"start_time_unix_nano",b"start_time_unix_nano",u"status",b"status",u"trace_id",b"trace_id",u"trace_state",b"trace_state"]) -> None: ... +type___Span = Span + +class Status(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + StatusCodeValue = typing___NewType('StatusCodeValue', builtin___int) + type___StatusCodeValue = StatusCodeValue + class StatusCode(object): + DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ... + @classmethod + def Name(cls, number: builtin___int) -> builtin___str: ... + @classmethod + def Value(cls, name: builtin___str) -> Status.StatusCodeValue: ... + @classmethod + def keys(cls) -> typing___List[builtin___str]: ... + @classmethod + def values(cls) -> typing___List[Status.StatusCodeValue]: ... + @classmethod + def items(cls) -> typing___List[typing___Tuple[builtin___str, Status.StatusCodeValue]]: ... + Ok = typing___cast(Status.StatusCodeValue, 0) + Cancelled = typing___cast(Status.StatusCodeValue, 1) + UnknownError = typing___cast(Status.StatusCodeValue, 2) + InvalidArgument = typing___cast(Status.StatusCodeValue, 3) + DeadlineExceeded = typing___cast(Status.StatusCodeValue, 4) + NotFound = typing___cast(Status.StatusCodeValue, 5) + AlreadyExists = typing___cast(Status.StatusCodeValue, 6) + PermissionDenied = typing___cast(Status.StatusCodeValue, 7) + ResourceExhausted = typing___cast(Status.StatusCodeValue, 8) + FailedPrecondition = typing___cast(Status.StatusCodeValue, 9) + Aborted = typing___cast(Status.StatusCodeValue, 10) + OutOfRange = typing___cast(Status.StatusCodeValue, 11) + Unimplemented = typing___cast(Status.StatusCodeValue, 12) + InternalError = typing___cast(Status.StatusCodeValue, 13) + Unavailable = typing___cast(Status.StatusCodeValue, 14) + DataLoss = typing___cast(Status.StatusCodeValue, 15) + Unauthenticated = typing___cast(Status.StatusCodeValue, 16) + Ok = typing___cast(Status.StatusCodeValue, 0) + Cancelled = typing___cast(Status.StatusCodeValue, 1) + UnknownError = typing___cast(Status.StatusCodeValue, 2) + InvalidArgument = typing___cast(Status.StatusCodeValue, 3) + DeadlineExceeded = typing___cast(Status.StatusCodeValue, 4) + NotFound = typing___cast(Status.StatusCodeValue, 5) + AlreadyExists = typing___cast(Status.StatusCodeValue, 6) + PermissionDenied = typing___cast(Status.StatusCodeValue, 7) + ResourceExhausted = typing___cast(Status.StatusCodeValue, 8) + FailedPrecondition = typing___cast(Status.StatusCodeValue, 9) + Aborted = typing___cast(Status.StatusCodeValue, 10) + OutOfRange = typing___cast(Status.StatusCodeValue, 11) + Unimplemented = typing___cast(Status.StatusCodeValue, 12) + InternalError = typing___cast(Status.StatusCodeValue, 13) + Unavailable = typing___cast(Status.StatusCodeValue, 14) + DataLoss = typing___cast(Status.StatusCodeValue, 15) + Unauthenticated = typing___cast(Status.StatusCodeValue, 16) + type___StatusCode = StatusCode + + code: type___Status.StatusCodeValue = ... + message: typing___Text = ... + + def __init__(self, + *, + code : typing___Optional[type___Status.StatusCodeValue] = None, + message : typing___Optional[typing___Text] = None, + ) -> None: ... + if sys.version_info >= (3,): + @classmethod + def FromString(cls, s: builtin___bytes) -> Status: ... + else: + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Status: ... + def ClearField(self, field_name: typing_extensions___Literal[u"code",b"code",u"message",b"message"]) -> None: ... +type___Status = Status diff --git a/scripts/proto_codegen.sh b/scripts/proto_codegen.sh new file mode 100755 index 00000000000..c66371f42e3 --- /dev/null +++ b/scripts/proto_codegen.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# +# Regenerate python code from OTLP protos in +# https://github.com/open-telemetry/opentelemetry-proto +# +# To use, update PROTO_REPO_BRANCH_OR_COMMIT variable below to a commit hash or +# tag in opentelemtry-proto repo that you want to build off of. Then, just run +# this script to update the proto files. Commit the changes as well as any +# fixes needed in the OTLP exporter. +# +# Optional envars: +# PROTO_REPO_DIR - the path to an existing checkout of the opentelemetry-proto repo + +# Pinned commit/branch/tag for the current version used in opentelemetry-proto python package. +PROTO_REPO_BRANCH_OR_COMMIT="b54688569186e0b862bf7462a983ccf2c50c0547" + +set -e + +if [ -z "$VIRTUAL_ENV" ]; then + echo '$VIRTUAL_ENV is not set, you probably forgot to source it. Exiting...' + exit 1 +fi + +PROTO_REPO_DIR=${PROTO_REPO_DIR:-"/tmp/opentelemetry-proto"} +# root of opentelemetry-python repo +repo_root="$(git rev-parse --show-toplevel)" + +python -m pip install -r $repo_root/dev-requirements.txt + +# Clone the proto repo if it doesn't exist +if [ ! -d "$PROTO_REPO_DIR" ]; then + git clone https://github.com/open-telemetry/opentelemetry-proto.git $PROTO_REPO_DIR +fi + +# Pull in changes and switch to requested branch +( + cd $PROTO_REPO_DIR + git fetch --all + git checkout $PROTO_REPO_BRANCH_OR_COMMIT + # pull if PROTO_REPO_BRANCH_OR_COMMIT is not a detached head + git symbolic-ref -q HEAD && git pull --ff-only || true +) + +cd $repo_root/opentelemetry-proto/src + +# clean up old generated code +find opentelemetry/ -regex ".*_pb2.*\.pyi?" -exec rm {} + + +# generate proto code for all protos +all_protos=$(find $PROTO_REPO_DIR/ -iname "*.proto") +python -m grpc_tools.protoc \ + -I $PROTO_REPO_DIR \ + --python_out=. \ + --mypy_out=. \ + $all_protos + +# generate grpc output only for protos with service definitions +service_protos=$(grep -REl "service \w+ {" $PROTO_REPO_DIR/opentelemetry/) +python -m grpc_tools.protoc \ + -I $PROTO_REPO_DIR \ + --python_out=. \ + --mypy_out=. \ + --grpc_python_out=. \ + $service_protos