@ancplua/qyl-api-schema 0.2.3 → 0.4.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
@@ -14,7 +14,7 @@ open-telemetry/semantic-conventions @ v1.43.0 + semantic-conventions-genai (de
14
14
  | Weaver (Qyl.OpenTelemetry.SemanticConventions repo:
15
15
  | generate.sh -> resolved-registry.json -> emit_typespec_keys.py)
16
16
  v
17
- generated/otel-keys.gen.tsp (+ generated/otel-keys-legacy.tsp, hand-frozen wire keys)
17
+ generated/otel-keys.gen.tsp
18
18
  |
19
19
  | TypeSpec import / lockstep key projection
20
20
  v
@@ -31,8 +31,7 @@ qyl services, dashboard, tools, and generated clients
31
31
  The generic OpenTelemetry key projection is the checked-in
32
32
  `generated/otel-keys.gen.tsp` under
33
33
  `ANcpLua.OpenTelemetry.SemanticConventions.Keys.*`, regenerated by the
34
- `Qyl.OpenTelemetry.SemanticConventions` repo's Weaver pipeline (the retired
35
- `@ancplua/typespec-otel-semconv@1.41.0-2` package was its frozen predecessor).
34
+ `Qyl.OpenTelemetry.SemanticConventions` repo's Weaver pipeline.
36
35
  This repo defines qyl domain models, routes, and response contracts under
37
36
  `Qyl.Api.Contracts.*`.
38
37
 
package/VERSIONING.md CHANGED
@@ -30,24 +30,20 @@ namespace Qyl.Api.Contracts.Domains.AI.GenAi;
30
30
 
31
31
  enum GenAiVersions {
32
32
  v1_27: "1.27.0",
33
- v1_28: "1.28.0",
34
- v1_29: "1.29.0",
35
- v1_37: "1.37.0",
36
33
  v1_38: "1.38.0",
37
- v1_39: "1.39.0",
38
34
  v1_40: "1.40.0",
39
- v1_41: "1.41.0",
40
35
  }
36
+ ```
41
37
 
42
- model GenAiSpanAttributes {
43
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.System)
44
- @removed(GenAiVersions.v1_37)
45
- system?: string;
38
+ Keep version enums **minimal**: only the baseline plus versions actually
39
+ referenced by an `@added`/`@removed` annotation. Unreferenced members are
40
+ dead timeline points that rot (an axis with no annotations at all should
41
+ lose `@versioned` entirely — that happened to `HttpVersions`/`DbVersions`
42
+ in 0.4.0).
46
43
 
47
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.UsagePromptTokens)
48
- @removed(GenAiVersions.v1_28)
49
- usagePromptTokens?: TokenCount;
44
+ ```tsp
50
45
 
46
+ model GenAiSpanAttributes {
51
47
  @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.UsageInputTokens)
52
48
  usageInputTokens?: TokenCount;
53
49
 
@@ -57,6 +53,14 @@ model GenAiSpanAttributes {
57
53
  }
58
54
  ```
59
55
 
56
+ Note (v0.3.0): the pre-migration `gen_ai.*` fields that carried upstream-deleted
57
+ wire keys (`gen_ai.system`, `gen_ai.prompt`, `gen_ai.completion`,
58
+ `gen_ai.usage.prompt_tokens` / `.completion_tokens`, and the
59
+ `gen_ai.openai.*` vendor keys) were **removed from the contract surface**
60
+ when the OTel 1.42 GenAI-registry split was adopted. Old-key telemetry is a
61
+ collector *ingestion normalization* concern (mapping below), not a contract
62
+ field.
63
+
60
64
  ## Ingestion mapping (deprecated -> current)
61
65
 
62
66
  Consumers can keep ingestion backward-compatible by normalizing deprecated attribute keys. Keep any downstream mapping aligned with the TypeSpec history.
package/common/types.tsp CHANGED
@@ -2,7 +2,8 @@
2
2
  // qyl common types and scalars
3
3
  // =============================================================================
4
4
  // Foundational types used across qyl API contracts and OTel-compatible models.
5
- // OpenTelemetry semantic-convention references are pinned to v1.41.0.
5
+ // OpenTelemetry semantic-convention references are pinned to core v1.43.0
6
+ // (GenAI keys come from the dedicated GenAI registry since the 1.42 split).
6
7
  // =============================================================================
7
8
 
8
9
  import "@typespec/versioning";
@@ -15,40 +16,13 @@ using TypeSpec.OpenAPI;
15
16
 
16
17
  namespace Qyl.Api.Contracts.Common;
17
18
 
18
- // =============================================================================
19
- // Version Enum - OTel Semantic Convention Versions
20
- // =============================================================================
21
-
22
- @doc("OpenTelemetry semantic-convention versions supported by qyl compatibility models")
23
- enum OTelVersion {
24
- @doc("OTel Semconv v1.27 - Base version")
25
- v1_27: "1.27.0",
26
-
27
- @doc("OTel Semconv v1.28 - GenAI additions")
28
- v1_28: "1.28.0",
29
-
30
- @doc("OTel Semconv v1.29 - HTTP improvements")
31
- v1_29: "1.29.0",
32
-
33
- @doc("OTel Semconv v1.30 - Database updates")
34
- v1_30: "1.30.0",
35
-
36
- @doc("OTel Semconv v1.38 - GenAI.Agent support")
37
- v1_38: "1.38.0",
38
-
39
- @doc("OTel Semconv v1.39 - RPC metadata consolidation")
40
- v1_39: "1.39.0",
41
-
42
- @doc("OTel Semconv v1.40 - Oracle DB split, RPC cleanup, GenAI cache tokens")
43
- v1_40: "1.40.0",
44
-
45
- @doc("OTel Semconv v1.41 - Current compatibility pin")
46
- v1_41: "1.41.0",
47
- }
48
-
49
19
  // =============================================================================
50
20
  // Identifier Scalars - Strongly Typed IDs
51
21
  // =============================================================================
22
+ // (The former OTelVersion enum — a hand-bumped list of semconv releases with
23
+ // zero consumers — was deleted in 0.4.0. The semconv pin lives in the
24
+ // otel-keys.gen.tsp header and .nuke/parameters.json OtelKeysVersion, both
25
+ // machine-checked; a prose enum of upstream releases only rots.)
52
26
 
53
27
  @jsonSchema
54
28
  @doc("Unique trace identifier (32 lowercase hex characters)")
@@ -2,31 +2,23 @@
2
2
 
3
3
  This directory holds the semconv TypeSpec key projection and the emitter
4
4
  outputs. `otel-keys.gen.tsp` is Weaver-generated — **do not edit by hand**.
5
- `otel-keys-legacy.tsp` is the one deliberate exception: hand-maintained,
6
- see below.
7
5
 
8
6
  ## Files
9
7
 
10
8
  | File | Source | Regenerate via |
11
9
  | --- | --- | --- |
12
10
  | `otel-keys.gen.tsp` | OpenTelemetry semantic-conventions core **v1.43.0** + the GenAI dev registry (`open-telemetry/semantic-conventions-genai`, pinned commit), merged and projected by the `Qyl.OpenTelemetry.SemanticConventions` repo's Weaver pipeline | In that repo: `src/…SourceGeneration/scripts/generate.sh` (refresh `Resources/resolved-registry.json`), then `src/…SourceGeneration/scripts/emit_typespec_keys.py --write <path-to-this-file>` |
13
- | `otel-keys-legacy.tsp` | Hand-maintained. Frozen legacy wire keys (10 `gen_ai.*` consts) that upstream deleted at the 1.41→1.43 bump but that qyl's published contracts still carry on deprecated migration fields. Values are verbatim from the last registry that defined them (v1.41.0). | Never regenerated. Delete a const here only if upstream re-introduces the same name (the `VerifyKeysLockstep` Nuke target and the TypeSpec duplicate-declaration error both catch that). |
14
-
15
- The predecessor projection was the npm package
16
- [`@ancplua/typespec-otel-semconv@1.41.0-2`](https://github.com/ANcpLua/typespec-otel-semconv)
17
- — its source repo is archived/deleted, so 1.41.0-2 was its last possible
18
- release; it is no longer a dependency of this repo.
19
11
 
20
12
  ## What the key files provide
21
13
 
22
14
  One TypeSpec namespace per OpenTelemetry root group, each declaring `const <Name>: string = "<dotted.key>"`. Extracted `.tsp` models reference these consts inside `@encodedName(...)` instead of hand-typing dotted attribute keys.
23
15
 
24
16
  ```tsp
25
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.System)
26
- system?: string;
17
+ @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.ProviderName)
18
+ providerName?: string;
27
19
  ```
28
20
 
29
- Deprecated upstream attributes are emitted with `#deprecated "..."` so models that reference them produce a TypeSpec compiler warning matching upstream's own deprecation notes. The legacy file's consts are all `#deprecated` by construction.
21
+ Deprecated upstream attributes are emitted with `#deprecated "..."` so models that reference them produce a TypeSpec compiler warning matching upstream's own deprecation notes.
30
22
 
31
23
  ## Pin
32
24
 
package/index.tsp CHANGED
@@ -19,7 +19,6 @@ import "@typespec/sse";
19
19
  import "@typespec/events";
20
20
 
21
21
  import "./generated/otel-keys.gen.tsp";
22
- import "./generated/otel-keys-legacy.tsp";
23
22
 
24
23
  import "./common/types.tsp";
25
24
  import "./common/errors.tsp";
package/models/db.tsp CHANGED
@@ -10,28 +10,8 @@ import "../common/types.tsp";
10
10
  using TypeSpec.Versioning;
11
11
  using Qyl.Api.Contracts.Common;
12
12
 
13
- @versioned(DbVersions)
14
13
  namespace Qyl.Api.Contracts.Domains.Data.Db;
15
14
 
16
- // =============================================================================
17
- // Version History
18
- // =============================================================================
19
-
20
- @doc("Database semantic convention versions")
21
- enum DbVersions {
22
- @doc("Legacy DB semconv")
23
- v1_20: "1.20.0",
24
-
25
- @doc("Stable DB semconv with namespace")
26
- v1_24: "1.24.0",
27
-
28
- @doc("DB semconv v1.38")
29
- v1_38: "1.38.0",
30
-
31
- @doc("Current DB semconv")
32
- v1_39: "1.39.0",
33
- }
34
-
35
15
  // =============================================================================
36
16
  // Database Span Attributes
37
17
  // =============================================================================
@@ -118,29 +98,6 @@ model DbAttributes {
118
98
  @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Db.ClientConnectionState)
119
99
  connectionState?: DbConnectionState;
120
100
 
121
- // ---------------------------------------------------------------------------
122
- // Deprecated Attributes (for migration)
123
- // ---------------------------------------------------------------------------
124
-
125
- @doc("Database name (deprecated - use db.namespace)")
126
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Db.Name)
127
- @removed(DbVersions.v1_24)
128
- dbName?: string;
129
-
130
- @doc("Database statement (deprecated - use db.query.text)")
131
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Db.Statement)
132
- @removed(DbVersions.v1_24)
133
- statement?: string;
134
-
135
- @doc("Database operation (deprecated - use db.operation.name)")
136
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Db.Operation)
137
- @removed(DbVersions.v1_24)
138
- operation?: string;
139
-
140
- @doc("Database user (deprecated)")
141
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Db.User)
142
- @removed(DbVersions.v1_24)
143
- user?: string;
144
101
  }
145
102
 
146
103
  // =============================================================================
package/models/genai.tsp CHANGED
@@ -22,26 +22,14 @@ namespace Qyl.Api.Contracts.Domains.AI.GenAi;
22
22
  // Version History
23
23
  // =============================================================================
24
24
 
25
- @doc("GenAI semantic convention versions")
25
+ @doc("GenAI semantic convention versions (only versions referenced by @added/@removed annotations are kept)")
26
26
  enum GenAiVersions {
27
27
  @doc("Initial GenAI semconv (OTel 1.27)")
28
28
  v1_27: "1.27.0",
29
29
 
30
- @doc("Added agent support (OTel 1.28)")
31
- v1_28: "1.28.0",
32
-
33
- @doc("Token type refinements (OTel 1.29)")
34
- v1_29: "1.29.0",
35
-
36
- @doc("Deprecated gen_ai.system (OTel 1.37)")
37
- v1_37: "1.37.0",
38
-
39
30
  @doc("GenAI.Agent support (OTel 1.38)")
40
31
  v1_38: "1.38.0",
41
32
 
42
- @doc("RPC metadata consolidation (OTel 1.39)")
43
- v1_39: "1.39.0",
44
-
45
33
  @doc("Current version (OTel 1.40)")
46
34
  v1_40: "1.40.0",
47
35
  }
@@ -60,11 +48,6 @@ model GenAiSpanAttributes {
60
48
  @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.ProviderName)
61
49
  providerName: GenAiProvider;
62
50
 
63
- @doc("The name of the GenAI system/product (e.g., 'ChatGPT', 'Claude', 'Gemini')")
64
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.System)
65
- @removed(GenAiVersions.v1_37)
66
- system?: string;
67
-
68
51
  // ---------------------------------------------------------------------------
69
52
  // Operation Details
70
53
  // ---------------------------------------------------------------------------
@@ -159,11 +142,6 @@ model GenAiSpanAttributes {
159
142
  @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.UsageOutputTokens)
160
143
  usageOutputTokens?: TokenCount;
161
144
 
162
- @doc("Total tokens (deprecated - use input + output)")
163
- @encodedName("application/json", "gen_ai.usage.total_tokens")
164
- @removed(GenAiVersions.v1_38)
165
- usageTotalTokens?: TokenCount;
166
-
167
145
  @doc("Number of cached input tokens (prompt caching)")
168
146
  @encodedName("application/json", "gen_ai.usage.input_tokens.cached")
169
147
  @added(GenAiVersions.v1_38)
@@ -184,20 +162,6 @@ model GenAiSpanAttributes {
184
162
  @added(GenAiVersions.v1_40)
185
163
  usageCacheCreationInputTokens?: TokenCount;
186
164
 
187
- // ---------------------------------------------------------------------------
188
- // Deprecated Attributes (for migration)
189
- // ---------------------------------------------------------------------------
190
-
191
- @doc("Prompt tokens (deprecated - use gen_ai.usage.input_tokens)")
192
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.UsagePromptTokens)
193
- @removed(GenAiVersions.v1_28)
194
- usagePromptTokens?: TokenCount;
195
-
196
- @doc("Completion tokens (deprecated - use gen_ai.usage.output_tokens)")
197
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.UsageCompletionTokens)
198
- @removed(GenAiVersions.v1_28)
199
- usageCompletionTokens?: TokenCount;
200
-
201
165
  // ---------------------------------------------------------------------------
202
166
  // Agent Attributes (v1.38+)
203
167
  // ---------------------------------------------------------------------------
@@ -294,10 +258,6 @@ model GenAiSpanAttributes {
294
258
  @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.OutputType)
295
259
  outputType?: GenAiOutputType;
296
260
 
297
- @doc("Prompt content (may be redacted)")
298
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.Prompt)
299
- prompt?: string;
300
-
301
261
  @doc("Name of the prompt template being used")
302
262
  @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.PromptName)
303
263
  promptName?: string;
@@ -306,10 +266,6 @@ model GenAiSpanAttributes {
306
266
  @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.SystemInstructions)
307
267
  systemInstructions?: string;
308
268
 
309
- @doc("Completion content (may be redacted)")
310
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.Completion)
311
- completion?: string;
312
-
313
269
  // ---------------------------------------------------------------------------
314
270
  // Extended Request Attributes
315
271
  // ---------------------------------------------------------------------------
@@ -1329,40 +1285,21 @@ model LatencyPercentiles {
1329
1285
  // Vendor-Specific Extensions (OTel 1.40)
1330
1286
  // =============================================================================
1331
1287
 
1332
- @doc("OpenAI-specific request attributes")
1288
+ @doc("OpenAI-specific request attributes (OTel 1.42 moved these to the openai.* namespace; response_format and seed graduated to the generic gen_ai.output.type / gen_ai.request.seed)")
1333
1289
  model OpenAiRequestAttributes {
1334
- @doc("Response format requested (text, json_object, json_schema)")
1335
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.OpenaiRequestResponseFormat)
1336
- responseFormat?: OpenAiResponseFormat;
1337
-
1338
- @doc("Random seed for deterministic generation")
1339
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.OpenaiRequestSeed)
1340
- seed?: int64;
1341
-
1342
1290
  @doc("Service tier for the request (auto, default, etc.)")
1343
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.OpenaiRequestServiceTier)
1291
+ @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Openai.RequestServiceTier)
1344
1292
  serviceTier?: string;
1345
1293
  }
1346
1294
 
1347
1295
  @doc("OpenAI-specific response attributes")
1348
1296
  model OpenAiResponseAttributes {
1349
1297
  @doc("Service tier used for the response")
1350
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.OpenaiResponseServiceTier)
1298
+ @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Openai.ResponseServiceTier)
1351
1299
  serviceTier?: string;
1352
1300
 
1353
1301
  @doc("System fingerprint for reproducibility")
1354
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.OpenaiResponseSystemFingerprint)
1302
+ @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Openai.ResponseSystemFingerprint)
1355
1303
  systemFingerprint?: string;
1356
1304
  }
1357
1305
 
1358
- @doc("OpenAI response format types")
1359
- enum OpenAiResponseFormat {
1360
- @doc("Plain text response")
1361
- text: "text",
1362
-
1363
- @doc("JSON object response")
1364
- jsonObject: "json_object",
1365
-
1366
- @doc("JSON schema-constrained response")
1367
- jsonSchema: "json_schema",
1368
- }
package/models/http.tsp CHANGED
@@ -10,28 +10,8 @@ import "../common/types.tsp";
10
10
  using TypeSpec.Versioning;
11
11
  using Qyl.Api.Contracts.Common;
12
12
 
13
- @versioned(HttpVersions)
14
13
  namespace Qyl.Api.Contracts.Domains.Transport.Http;
15
14
 
16
- // =============================================================================
17
- // Version History
18
- // =============================================================================
19
-
20
- @doc("HTTP semantic convention versions")
21
- enum HttpVersions {
22
- @doc("Legacy HTTP semconv")
23
- v1_20: "1.20.0",
24
-
25
- @doc("Stable HTTP semconv")
26
- v1_23: "1.23.0",
27
-
28
- @doc("HTTP semconv v1.38")
29
- v1_38: "1.38.0",
30
-
31
- @doc("Current HTTP semconv")
32
- v1_39: "1.39.0",
33
- }
34
-
35
15
  // =============================================================================
36
16
  // HTTP Span Attributes
37
17
  // =============================================================================
@@ -184,39 +164,6 @@ model HttpAttributes {
184
164
  @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Http.RequestResendCount)
185
165
  requestResendCount?: int32;
186
166
 
187
- // ---------------------------------------------------------------------------
188
- // Deprecated Attributes (for migration)
189
- // ---------------------------------------------------------------------------
190
-
191
- @doc("Request target (deprecated - use url.path + url.query)")
192
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Http.Target)
193
- @removed(HttpVersions.v1_23)
194
- target?: string;
195
-
196
- @doc("Request URL (deprecated - use url.full)")
197
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Http.Url)
198
- @removed(HttpVersions.v1_23)
199
- url?: UrlString;
200
-
201
- @doc("HTTP method (deprecated - use http.request.method)")
202
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Http.Method)
203
- @removed(HttpVersions.v1_23)
204
- method?: string;
205
-
206
- @doc("Status code (deprecated - use http.response.status_code)")
207
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Http.StatusCode)
208
- @removed(HttpVersions.v1_23)
209
- statusCode?: int32;
210
-
211
- @doc("Request content length (deprecated)")
212
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Http.RequestContentLength)
213
- @removed(HttpVersions.v1_23)
214
- requestContentLengthLegacy?: ByteSize;
215
-
216
- @doc("Response content length (deprecated)")
217
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Http.ResponseContentLength)
218
- @removed(HttpVersions.v1_23)
219
- responseContentLengthLegacy?: ByteSize;
220
167
  }
221
168
 
222
169
  // =============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancplua/qyl-api-schema",
3
- "version": "0.2.3",
3
+ "version": "0.4.0",
4
4
  "description": "TypeSpec source of truth for qyl API contracts. Emits OpenAPI, JSON Schema, Qyl.Api.Contracts DTOs, and TypeScript contract types; not an OpenTelemetry package, storage schema, or server implementation.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,51 +0,0 @@
1
- // Hand-maintained companion to otel-keys.gen.tsp — NOT generated. Frozen legacy
2
- // wire keys that upstream removed from the registries at the 1.41→1.43 bump
3
- // (the GenAI split: gen_ai.system/prompt/completion/usage.{prompt,completion}_tokens
4
- // were dropped outright; of the gen_ai.openai.* vendor keys, service_tier ×2 and
5
- // response.system_fingerprint were renamed to openai.*, seed and
6
- // request.response_format were removed with no successor).
7
- //
8
- // qyl's public contracts still carry these dotted keys on deliberately-deprecated
9
- // migration fields (`@removed(GenAiVersions.…)` in models/genai.tsp). A wire name
10
- // is a published contract: it stays frozen even after upstream deletes the key.
11
- // The values below are verbatim from the last registry that defined them
12
- // (open-telemetry/semantic-conventions v1.41.0, via the retired
13
- // @ancplua/typespec-otel-semconv@1.41.0-2 projection).
14
- //
15
- // TypeSpec merges namespaces across files, so these consts land in the same
16
- // Keys.GenAi namespace the generated file populates — consuming models did not
17
- // change. If a future regeneration re-introduces one of these names, the
18
- // compiler will error on the duplicate: resolve by deleting it HERE.
19
-
20
- namespace ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi {
21
- /** Frozen legacy wire key; removed from semconv (replaced by gen_ai.output.messages). */
22
- #deprecated "Removed upstream; frozen for contract compatibility."
23
- const Completion: string = "gen_ai.completion";
24
- /** Frozen legacy wire key; removed from semconv (no openai.* successor at 1.43). */
25
- #deprecated "Removed upstream; frozen for contract compatibility."
26
- const OpenaiRequestResponseFormat: string = "gen_ai.openai.request.response_format";
27
- /** Frozen legacy wire key; removed from semconv (no openai.* successor at 1.43). */
28
- #deprecated "Removed upstream; frozen for contract compatibility."
29
- const OpenaiRequestSeed: string = "gen_ai.openai.request.seed";
30
- /** Frozen legacy wire key; renamed upstream to openai.request.service_tier. */
31
- #deprecated "Renamed upstream to openai.request.service_tier; frozen for contract compatibility."
32
- const OpenaiRequestServiceTier: string = "gen_ai.openai.request.service_tier";
33
- /** Frozen legacy wire key; renamed upstream to openai.response.service_tier. */
34
- #deprecated "Renamed upstream to openai.response.service_tier; frozen for contract compatibility."
35
- const OpenaiResponseServiceTier: string = "gen_ai.openai.response.service_tier";
36
- /** Frozen legacy wire key; renamed upstream to openai.response.system_fingerprint. */
37
- #deprecated "Renamed upstream to openai.response.system_fingerprint; frozen for contract compatibility."
38
- const OpenaiResponseSystemFingerprint: string = "gen_ai.openai.response.system_fingerprint";
39
- /** Frozen legacy wire key; removed from semconv (replaced by gen_ai.input.messages). */
40
- #deprecated "Removed upstream; frozen for contract compatibility."
41
- const Prompt: string = "gen_ai.prompt";
42
- /** Frozen legacy wire key; removed from semconv (replaced by gen_ai.provider.name). */
43
- #deprecated "Replaced by gen_ai.provider.name; frozen for contract compatibility."
44
- const System: string = "gen_ai.system";
45
- /** Frozen legacy wire key; removed from semconv (replaced by gen_ai.usage.output_tokens). */
46
- #deprecated "Replaced by gen_ai.usage.output_tokens; frozen for contract compatibility."
47
- const UsageCompletionTokens: string = "gen_ai.usage.completion_tokens";
48
- /** Frozen legacy wire key; removed from semconv (replaced by gen_ai.usage.input_tokens). */
49
- #deprecated "Replaced by gen_ai.usage.input_tokens; frozen for contract compatibility."
50
- const UsagePromptTokens: string = "gen_ai.usage.prompt_tokens";
51
- }