Skip to content

Commit

Permalink
Upgrade to OTLP v1.0 (#97)
Browse files Browse the repository at this point in the history
* Upgrade to OTLP v1.0

Signed-off-by: Yuri Shkuro <[email protected]>

* update swagger

Signed-off-by: Yuri Shkuro <[email protected]>

---------

Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro authored Sep 10, 2023
1 parent 5b86620 commit de44a4e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 30 deletions.
69 changes: 40 additions & 29 deletions swagger/api_v3/query_service.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
"STATUS_CODE_ERROR"
],
"default": "STATUS_CODE_UNSET",
"description": "- STATUS_CODE_UNSET: The default status.\n - STATUS_CODE_OK: The Span has been validated by an Application developers or Operator to have\ncompleted successfully.\n - STATUS_CODE_ERROR: The Span contains an error.",
"description": "- STATUS_CODE_UNSET: The default status.\n - STATUS_CODE_OK: The Span has been validated by an Application developer or Operator to \nhave completed successfully.\n - STATUS_CODE_ERROR: The Span contains an error.",
"title": "For the semantics of status codes see\nhttps://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status"
},
"api_v3GetOperationsResponse": {
Expand Down Expand Up @@ -446,39 +446,29 @@
},
"description": "ArrayValue is a list of AnyValue messages. We need ArrayValue as a message\nsince oneof in AnyValue does not allow repeated fields."
},
"v1InstrumentationLibrary": {
"v1InstrumentationScope": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "An empty instrumentation library name means the name is unknown."
"description": "An empty instrumentation scope name means the name is unknown."
},
"version": {
"type": "string"
}
},
"description": "InstrumentationLibrary is a message representing the instrumentation library information\nsuch as the fully qualified name and version."
},
"v1InstrumentationLibrarySpans": {
"type": "object",
"properties": {
"instrumentation_library": {
"$ref": "#/definitions/v1InstrumentationLibrary",
"description": "The instrumentation library information for the spans in this message.\nSemantically when InstrumentationLibrary isn't set, it is equivalent with\nan empty instrumentation library name (unknown)."
},
"spans": {
"attributes": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Span"
"$ref": "#/definitions/v1KeyValue"
},
"description": "A list of Spans that originate from an instrumentation library."
"description": "Additional attributes that describe the scope. [Optional].\nAttribute keys MUST be unique (it is not allowed to have more than one\nattribute with the same key)."
},
"schema_url": {
"type": "string",
"description": "This schema_url applies to all spans and span events in the \"spans\" field."
"dropped_attributes_count": {
"type": "integer",
"format": "int64"
}
},
"description": "A collection of Spans produced by an InstrumentationLibrary."
"description": "InstrumentationScope is a message representing the instrumentation scope information\nsuch as the fully qualified name and version."
},
"v1KeyValue": {
"type": "object",
Expand Down Expand Up @@ -530,32 +520,53 @@
"$ref": "#/definitions/v1Resource",
"description": "The resource for the spans in this message.\nIf this field is not set then no resource info is known."
},
"instrumentation_library_spans": {
"scope_spans": {
"type": "array",
"items": {
"$ref": "#/definitions/v1InstrumentationLibrarySpans"
"$ref": "#/definitions/v1ScopeSpans"
},
"description": "A list of InstrumentationLibrarySpans that originate from a resource."
"description": "A list of ScopeSpans that originate from a resource."
},
"schema_url": {
"type": "string",
"description": "This schema_url applies to the data in the \"resource\" field. It does not apply\nto the data in the \"instrumentation_library_spans\" field which have their own\nschema_url field."
"description": "This schema_url applies to the data in the \"resource\" field. It does not apply\nto the data in the \"scope_spans\" field which have their own schema_url field."
}
},
"description": "A collection of ScopeSpans from a Resource."
},
"v1ScopeSpans": {
"type": "object",
"properties": {
"scope": {
"$ref": "#/definitions/v1InstrumentationScope",
"description": "The instrumentation scope information for the spans in this message.\nSemantically when InstrumentationScope isn't set, it is equivalent with\nan empty instrumentation scope name (unknown)."
},
"spans": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Span"
},
"description": "A list of Spans that originate from an instrumentation scope."
},
"schema_url": {
"type": "string",
"description": "This schema_url applies to all spans and span events in the \"spans\" field."
}
},
"description": "A collection of InstrumentationLibrarySpans from a Resource."
"description": "A collection of Spans produced by an InstrumentationScope."
},
"v1Span": {
"type": "object",
"properties": {
"trace_id": {
"type": "string",
"format": "byte",
"description": "A unique identifier for a trace. All spans from the same trace share\nthe same `trace_id`. The ID is a 16-byte array. An ID with all zeroes\nis considered invalid.\n\nThis field is semantically required. Receiver should generate new\nrandom trace_id if empty or invalid trace_id was received.\n\nThis field is required."
"description": "A unique identifier for a trace. All spans from the same trace share\nthe same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR\nof length other than 16 bytes is considered invalid (empty string in OTLP/JSON\nis zero-length and thus is also invalid).\n\nThis field is required."
},
"span_id": {
"type": "string",
"format": "byte",
"description": "A unique identifier for a span within a trace, assigned when the span\nis created. The ID is an 8-byte array. An ID with all zeroes is considered\ninvalid.\n\nThis field is semantically required. Receiver should generate new\nrandom span_id if empty or invalid span_id was received.\n\nThis field is required."
"description": "A unique identifier for a span within a trace, assigned when the span\nis created. The ID is an 8-byte array. An ID with all zeroes OR of length\nother than 8 bytes is considered invalid (empty string in OTLP/JSON\nis zero-length and thus is also invalid).\n\nThis field is required."
},
"trace_state": {
"type": "string",
Expand Down Expand Up @@ -589,7 +600,7 @@
"items": {
"$ref": "#/definitions/v1KeyValue"
},
"description": "\"/http/user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\"\n \"/http/server_latency\": 300\n \"abc.com/myattribute\": true\n \"abc.com/score\": 10.239\n\nThe OpenTelemetry API specification further restricts the allowed value types:\nhttps://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/common.md#attributes\nAttribute keys MUST be unique (it is not allowed to have more than one\nattribute with the same key).",
"description": "\"/http/user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\"\n \"/http/server_latency\": 300\n \"example.com/myattribute\": true\n \"example.com/score\": 10.239\n\nThe OpenTelemetry API specification further restricts the allowed value types:\nhttps://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute\nAttribute keys MUST be unique (it is not allowed to have more than one\nattribute with the same key).",
"title": "attributes is a collection of key/value pairs. Note, global attributes\nlike server name can be set using the resource API. Examples of attributes:"
},
"dropped_attributes_count": {
Expand Down Expand Up @@ -626,7 +637,7 @@
"description": "An optional final status for this span. Semantically when Status isn't set, it means\nspan's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0)."
}
},
"description": "Span represents a single operation within a trace. Spans can be\nnested to form a trace tree. Spans may also be linked to other spans\nfrom the same or different trace and form graphs. Often, a trace\ncontains a root span that describes the end-to-end latency, and one\nor more subspans for its sub-operations. A trace can also contain\nmultiple root spans, or none at all. Spans do not need to be\ncontiguous - there may be gaps or overlaps between spans in a trace.\n\nThe next available field id is 17."
"description": "A Span represents a single operation performed by a single component of the system.\n\nThe next available field id is 17."
},
"v1Status": {
"type": "object",
Expand Down

0 comments on commit de44a4e

Please sign in to comment.