@ancplua/qyl-api-schema 8.0.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,20 +4,16 @@ The TypeSpec source of truth for Qyl's client-visible product API. This reposito
4
4
  emits the public schema and contract artifacts; it does not implement the server,
5
5
  storage engine, or OTLP receiver.
6
6
 
7
- Qyl stores and exposes traces and logs. Metrics are accepted and discarded only by
8
- the collector's OTLP wire-compatibility handlers, so this product contract exposes
9
- no metric DTOs or routes. Profiles are not supported.
7
+ Qyl stores and exposes traces, logs, and metrics. The metric surface is read-only.
8
+ `GET /api/v1/metrics` lists the metric descriptors recorded for a project,
9
+ `GET /api/v1/metrics/{metric_name}/series` lists the distinct attribute streams
10
+ under one metric name, and `GET /api/v1/metrics/{metric_name}/query` aggregates one
11
+ metric over a time range into buckets. Metric points are written over OTLP, which
12
+ this contract does not describe. Profiles are not supported.
10
13
 
11
14
  ## Contract pipeline
12
15
 
13
16
  ```text
14
- Qyl.Telemetry.SemanticConventions
15
- |
16
- | generated semantic key projection
17
- v
18
- generated/otel-keys.gen.tsp
19
- |
20
- v
21
17
  authored Qyl TypeSpec
22
18
  |
23
19
  +----> OpenAPI ----> bundled JSON Schema
@@ -25,9 +21,10 @@ authored Qyl TypeSpec
25
21
  +----> generated TypeScript contracts
26
22
  ```
27
23
 
28
- The semantic-key projection is generated from the sibling conventions repository's
29
- pinned core and GenAI registries. It supplies typed names for telemetry attributes;
30
24
  Qyl domain models, routes, responses, stream events, and errors are authored here.
25
+ The OTel-compatible models target schema `https://opentelemetry.io/schemas/1.44.0`;
26
+ attribute keys cross the wire as open string maps, so this contract carries no
27
+ enumeration of the OpenTelemetry attribute registry.
31
28
 
32
29
  ## Boundary
33
30
 
package/common/types.tsp CHANGED
@@ -2,7 +2,7 @@
2
2
  // qyl common types and scalars
3
3
  // =============================================================================
4
4
  // Foundational types used across qyl API contracts and OTel-compatible models.
5
- // OpenTelemetry registry provenance is owned by generated/otel-keys.gen.tsp.
5
+ // The contract targets OpenTelemetry semantic conventions schema https://opentelemetry.io/schemas/1.44.0.
6
6
  // =============================================================================
7
7
 
8
8
  import "@typespec/openapi";
@@ -14,8 +14,6 @@ namespace Qyl.Api.Contracts.Common;
14
14
  // =============================================================================
15
15
  // Identifier Scalars - Strongly Typed IDs
16
16
  // =============================================================================
17
- // The semantic-conventions pin lives in the generated keys header and is
18
- // machine-checked; a hand-maintained enum of upstream releases would only drift.
19
17
 
20
18
  @doc("Unique trace identifier (32 lowercase hex characters)")
21
19
  @pattern("^[a-f0-9]{32}$")