diff --git a/duetector/analyzer/jaeger/analyzer.py b/duetector/analyzer/jaeger/analyzer.py index 6a8daa3..4920ee9 100644 --- a/duetector/analyzer/jaeger/analyzer.py +++ b/duetector/analyzer/jaeger/analyzer.py @@ -94,12 +94,12 @@ def get_find_tracers_request( service_name=self.generate_service_name(collector_id), operation_name=self.generate_span_name(tracer_name), tags=tags, - start_time_min=self._datetime_to_protobuf_timestamp(start_time_min) - if start_time_min - else None, - start_time_max=self._datetime_to_protobuf_timestamp(start_time_max) - if start_time_max - else None, + start_time_min=( + self._datetime_to_protobuf_timestamp(start_time_min) if start_time_min else None + ), + start_time_max=( + self._datetime_to_protobuf_timestamp(start_time_max) if start_time_max else None + ), duration_min=Duration(seconds=duration_min) if duration_min else None, duration_max=Duration(seconds=duration_max) if duration_max else None, search_depth=search_depth, @@ -190,9 +190,11 @@ async def brief( collector_id=collector_id, start=self._protobuf_timestamp_to_datetime(start_span.start_time), end=self._protobuf_timestamp_to_datetime(last_span.start_time), - fields={msg.key: None for msg in start_span.tags} - if not inspect_type - else self.inspect_span(start_span), + fields=( + {msg.key: None for msg in start_span.tags} + if not inspect_type + else self.inspect_span(start_span) + ), count=count, ) diff --git a/duetector/analyzer/jaeger/proto/model_pb2.pyi b/duetector/analyzer/jaeger/proto/model_pb2.pyi index c9af90f..cddf3e9 100644 --- a/duetector/analyzer/jaeger/proto/model_pb2.pyi +++ b/duetector/analyzer/jaeger/proto/model_pb2.pyi @@ -186,6 +186,7 @@ class Trace(_message.Message): process_id: _Optional[str] = ..., process: _Optional[_Union[Process, _Mapping]] = ..., ) -> None: ... + PROCESS_MAP_FIELD_NUMBER: _ClassVar[int] SPANS_FIELD_NUMBER: _ClassVar[int] WARNINGS_FIELD_NUMBER: _ClassVar[int] diff --git a/duetector/analyzer/jaeger/proto/query_pb2.py b/duetector/analyzer/jaeger/proto/query_pb2.py index d4cd52b..275dc49 100644 --- a/duetector/analyzer/jaeger/proto/query_pb2.py +++ b/duetector/analyzer/jaeger/proto/query_pb2.py @@ -873,41 +873,41 @@ serialized_end=1675, ) -_GETTRACEREQUEST.fields_by_name[ - "start_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_GETTRACEREQUEST.fields_by_name[ - "end_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_GETTRACEREQUEST.fields_by_name["start_time"].message_type = ( + google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +) +_GETTRACEREQUEST.fields_by_name["end_time"].message_type = ( + google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +) _SPANSRESPONSECHUNK.fields_by_name["spans"].message_type = model__pb2._SPAN -_ARCHIVETRACEREQUEST.fields_by_name[ - "start_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_ARCHIVETRACEREQUEST.fields_by_name[ - "end_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_ARCHIVETRACEREQUEST.fields_by_name["start_time"].message_type = ( + google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +) +_ARCHIVETRACEREQUEST.fields_by_name["end_time"].message_type = ( + google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +) _TRACEQUERYPARAMETERS_TAGSENTRY.containing_type = _TRACEQUERYPARAMETERS _TRACEQUERYPARAMETERS.fields_by_name["tags"].message_type = _TRACEQUERYPARAMETERS_TAGSENTRY -_TRACEQUERYPARAMETERS.fields_by_name[ - "start_time_min" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_TRACEQUERYPARAMETERS.fields_by_name[ - "start_time_max" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_TRACEQUERYPARAMETERS.fields_by_name[ - "duration_min" -].message_type = google_dot_protobuf_dot_duration__pb2._DURATION -_TRACEQUERYPARAMETERS.fields_by_name[ - "duration_max" -].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_TRACEQUERYPARAMETERS.fields_by_name["start_time_min"].message_type = ( + google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +) +_TRACEQUERYPARAMETERS.fields_by_name["start_time_max"].message_type = ( + google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +) +_TRACEQUERYPARAMETERS.fields_by_name["duration_min"].message_type = ( + google_dot_protobuf_dot_duration__pb2._DURATION +) +_TRACEQUERYPARAMETERS.fields_by_name["duration_max"].message_type = ( + google_dot_protobuf_dot_duration__pb2._DURATION +) _FINDTRACESREQUEST.fields_by_name["query"].message_type = _TRACEQUERYPARAMETERS _GETOPERATIONSRESPONSE.fields_by_name["operations"].message_type = _OPERATION -_GETDEPENDENCIESREQUEST.fields_by_name[ - "start_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_GETDEPENDENCIESREQUEST.fields_by_name[ - "end_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_GETDEPENDENCIESREQUEST.fields_by_name["start_time"].message_type = ( + google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +) +_GETDEPENDENCIESREQUEST.fields_by_name["end_time"].message_type = ( + google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +) _GETDEPENDENCIESRESPONSE.fields_by_name["dependencies"].message_type = model__pb2._DEPENDENCYLINK DESCRIPTOR.message_types_by_name["GetTraceRequest"] = _GETTRACEREQUEST DESCRIPTOR.message_types_by_name["SpansResponseChunk"] = _SPANSRESPONSECHUNK @@ -929,7 +929,7 @@ (_message.Message,), { "DESCRIPTOR": _GETTRACEREQUEST, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.GetTraceRequest) }, ) @@ -940,7 +940,7 @@ (_message.Message,), { "DESCRIPTOR": _SPANSRESPONSECHUNK, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.SpansResponseChunk) }, ) @@ -951,7 +951,7 @@ (_message.Message,), { "DESCRIPTOR": _ARCHIVETRACEREQUEST, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.ArchiveTraceRequest) }, ) @@ -962,7 +962,7 @@ (_message.Message,), { "DESCRIPTOR": _ARCHIVETRACERESPONSE, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.ArchiveTraceResponse) }, ) @@ -977,12 +977,12 @@ (_message.Message,), { "DESCRIPTOR": _TRACEQUERYPARAMETERS_TAGSENTRY, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.TraceQueryParameters.TagsEntry) }, ), "DESCRIPTOR": _TRACEQUERYPARAMETERS, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.TraceQueryParameters) }, ) @@ -994,7 +994,7 @@ (_message.Message,), { "DESCRIPTOR": _FINDTRACESREQUEST, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.FindTracesRequest) }, ) @@ -1005,7 +1005,7 @@ (_message.Message,), { "DESCRIPTOR": _GETSERVICESREQUEST, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.GetServicesRequest) }, ) @@ -1016,7 +1016,7 @@ (_message.Message,), { "DESCRIPTOR": _GETSERVICESRESPONSE, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.GetServicesResponse) }, ) @@ -1027,7 +1027,7 @@ (_message.Message,), { "DESCRIPTOR": _GETOPERATIONSREQUEST, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.GetOperationsRequest) }, ) @@ -1038,7 +1038,7 @@ (_message.Message,), { "DESCRIPTOR": _OPERATION, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.Operation) }, ) @@ -1049,7 +1049,7 @@ (_message.Message,), { "DESCRIPTOR": _GETOPERATIONSRESPONSE, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.GetOperationsResponse) }, ) @@ -1060,7 +1060,7 @@ (_message.Message,), { "DESCRIPTOR": _GETDEPENDENCIESREQUEST, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.GetDependenciesRequest) }, ) @@ -1071,7 +1071,7 @@ (_message.Message,), { "DESCRIPTOR": _GETDEPENDENCIESRESPONSE, - "__module__": "query_pb2" + "__module__": "query_pb2", # @@protoc_insertion_point(class_scope:jaeger.api_v2.GetDependenciesResponse) }, ) diff --git a/duetector/analyzer/jaeger/proto/query_pb2.pyi b/duetector/analyzer/jaeger/proto/query_pb2.pyi index dbe57be..e75f094 100644 --- a/duetector/analyzer/jaeger/proto/query_pb2.pyi +++ b/duetector/analyzer/jaeger/proto/query_pb2.pyi @@ -141,6 +141,7 @@ class TraceQueryParameters(_message.Message): key: str value: str def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + DURATION_MAX_FIELD_NUMBER: _ClassVar[int] DURATION_MIN_FIELD_NUMBER: _ClassVar[int] OPERATION_NAME_FIELD_NUMBER: _ClassVar[int]