Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add trace object as part of result #83

Merged
merged 4 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

# Dependency directories (remove the comment below to include it)
# vendor/
swagger
swagger/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ proto:
jaeger-idl/proto/api_v3/query_service.proto

$(PROTOC_INTERNAL) \
--swagger_out=disable_default_errors=true,logtostderr=true:./swagger \
--swagger_out=disable_default_errors=true,json_names_for_fields=true,logtostderr=true:./swagger \
jaeger-idl/proto/api_v3/query_service.proto

$(PROTOC_INTERNAL) \
Expand Down
3 changes: 0 additions & 3 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ info:
title: TraceTest
description: OpenAPI definition for TraceTest endpoint and resources
servers:
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/ken21/Tracetest/0.0.1
- url: /api
paths:
/tests:
Expand Down
80 changes: 40 additions & 40 deletions api/trace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ definitions:
SpanEvent:
type: object
properties:
time_unix_nano:
timeUnixNano:
type: string
format: uint64
description: time_unix_nano is the time the event occurred.
Expand All @@ -28,7 +28,7 @@ definitions:
attributes is a collection of attribute key/value pairs on the event.
Attribute keys MUST be unique (it is not allowed to have more than one
attribute with the same key).
dropped_attributes_count:
droppedAttributesCount:
type: integer
format: int64
description: |-
Expand All @@ -40,17 +40,17 @@ definitions:
SpanLink:
type: object
properties:
trace_id:
traceId:
type: string
format: byte
description: |-
A unique identifier of a trace that this linked span is part of. The ID is a
16-byte array.
span_id:
spanId:
type: string
format: byte
description: A unique identifier for the linked span. The ID is an 8-byte array.
trace_state:
traceState:
type: string
description: The trace_state associated with the link.
attributes:
Expand All @@ -61,7 +61,7 @@ definitions:
attributes is a collection of attribute key/value pairs on the link.
Attribute keys MUST be unique (it is not allowed to have more than one
attribute with the same key).
dropped_attributes_count:
droppedAttributesCount:
type: integer
format: int64
description: |-
Expand Down Expand Up @@ -136,13 +136,13 @@ definitions:
properties:
name:
type: string
span_kind:
spanKind:
type: string
description: Operation encapsulates information about operation.
api_v3SpansResponseChunk:
type: object
properties:
resource_spans:
resourceSpans:
type: array
items:
$ref: '#/definitions/v1ResourceSpans'
Expand All @@ -157,9 +157,9 @@ definitions:
api_v3TraceQueryParameters:
type: object
properties:
service_name:
serviceName:
type: string
operation_name:
operationName:
type: string
attributes:
type: object
Expand All @@ -168,21 +168,21 @@ definitions:
description: |-
Attributes are matched against Span and Resource attributes.
At least one span in a trace must match all specified attributes.
start_time_min:
startTimeMin:
type: string
format: date-time
description: Span min start time in. REST API uses RFC-3339ns format. Required.
start_time_max:
startTimeMax:
type: string
format: date-time
description: Span max start time. REST API uses RFC-3339ns format. Required.
duration_min:
durationMin:
type: string
description: Span min duration. REST API uses Golang's time format e.g. 10s.
duration_max:
durationMax:
type: string
description: Span max duration. REST API uses Golang's time format e.g. 10s.
num_traces:
numTraces:
type: integer
format: int32
description: Maximum number of traces in the response.
Expand All @@ -192,23 +192,23 @@ definitions:
protobufAny:
type: object
properties:
type_url:
typeUrl:
type: string
value:
type: string
format: byte
runtimeStreamError:
type: object
properties:
grpc_code:
grpcCode:
type: integer
format: int32
http_code:
httpCode:
type: integer
format: int32
message:
type: string
http_status:
httpStatus:
type: string
details:
type: array
Expand All @@ -217,21 +217,21 @@ definitions:
v1AnyValue:
type: object
properties:
string_value:
stringValue:
type: string
bool_value:
boolValue:
type: boolean
int_value:
intValue:
type: string
format: int64
double_value:
doubleValue:
type: number
format: double
array_value:
arrayValue:
$ref: '#/definitions/v1ArrayValue'
kvlist_value:
kvlistValue:
$ref: '#/definitions/v1KeyValueList'
bytes_value:
bytesValue:
type: string
format: byte
description: |-
Expand Down Expand Up @@ -263,7 +263,7 @@ definitions:
v1InstrumentationLibrarySpans:
type: object
properties:
instrumentation_library:
instrumentationLibrary:
$ref: '#/definitions/v1InstrumentationLibrary'
description: |-
The instrumentation library information for the spans in this message.
Expand All @@ -274,7 +274,7 @@ definitions:
items:
$ref: '#/definitions/v1Span'
description: A list of Spans that originate from an instrumentation library.
schema_url:
schemaUrl:
type: string
description: This schema_url applies to all spans and span events in the "spans" field.
description: A collection of Spans produced by an InstrumentationLibrary.
Expand Down Expand Up @@ -317,7 +317,7 @@ definitions:
Set of attributes that describe the resource.
Attribute keys MUST be unique (it is not allowed to have more than one
attribute with the same key).
dropped_attributes_count:
droppedAttributesCount:
type: integer
format: int64
description: |-
Expand All @@ -332,12 +332,12 @@ definitions:
description: |-
The resource for the spans in this message.
If this field is not set then no resource info is known.
instrumentation_library_spans:
instrumentationLibrarySpans:
type: array
items:
$ref: '#/definitions/v1InstrumentationLibrarySpans'
description: A list of InstrumentationLibrarySpans that originate from a resource.
schema_url:
schemaUrl:
type: string
description: |-
This schema_url applies to the data in the "resource" field. It does not apply
Expand All @@ -347,7 +347,7 @@ definitions:
v1Span:
type: object
properties:
trace_id:
traceId:
type: string
format: byte
description: |-
Expand All @@ -359,7 +359,7 @@ definitions:
random trace_id if empty or invalid trace_id was received.

This field is required.
span_id:
spanId:
type: string
format: byte
description: |-
Expand All @@ -371,13 +371,13 @@ definitions:
random span_id if empty or invalid span_id was received.

This field is required.
trace_state:
traceState:
type: string
description: |-
trace_state conveys information about request position in multiple distributed tracing graphs.
It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
See also https://github.com/w3c/distributed-tracing for more details about this field.
parent_span_id:
parentSpanId:
type: string
format: byte
description: |-
Expand All @@ -403,7 +403,7 @@ definitions:
Distinguishes between spans generated in a particular context. For example,
two spans with the same name may be distinguished using `CLIENT` (caller)
and `SERVER` (callee) to identify queueing latency associated with the span.
start_time_unix_nano:
startTimeUnixNano:
type: string
format: uint64
description: |-
Expand All @@ -413,7 +413,7 @@ definitions:
Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.

This field is semantically required and it is expected that end_time >= start_time.
end_time_unix_nano:
endTimeUnixNano:
type: string
format: uint64
description: |-
Expand All @@ -440,7 +440,7 @@ definitions:
title: |-
attributes is a collection of key/value pairs. Note, global attributes
like server name can be set using the resource API. Examples of attributes:
dropped_attributes_count:
droppedAttributesCount:
type: integer
format: int64
description: |-
Expand All @@ -452,7 +452,7 @@ definitions:
items:
$ref: '#/definitions/SpanEvent'
description: events is a collection of Event items.
dropped_events_count:
droppedEventsCount:
type: integer
format: int64
description: |-
Expand All @@ -465,7 +465,7 @@ definitions:
description: |-
links is a collection of Links, which are references from this span to a span
in the same or different trace.
dropped_links_count:
droppedLinksCount:
type: integer
format: int64
description: |-
Expand Down
2 changes: 1 addition & 1 deletion server/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ go/logger.go
go/model_api_v3_spans_response_chunk.go
go/model_assertion.go
go/model_attribute.go
go/model_result.go
go/model_selector_item.go
go/model_span_assertion.go
go/model_span_event.go
Expand All @@ -18,6 +17,7 @@ go/model_span_span_kind.go
go/model_status_status_code.go
go/model_test_.go
go/model_test_run.go
go/model_test_run_result.go
go/model_test_service_under_test_.go
go/model_v1_any_value.go
go/model_v1_array_value.go
Expand Down
2 changes: 1 addition & 1 deletion server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://openapi-generator.tech)

- API version: 0.0.1
- Build date: 2022-03-15T11:30:14.039813+02:00[Europe/Vilnius]
- Build date: 2022-03-17T10:35:18.120607+02:00[Europe/Vilnius]


### Running the server
Expand Down
Loading