d25d482dc2
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
61 lines
2.4 KiB
TypeScript
61 lines
2.4 KiB
TypeScript
// AUTO-GENERATED FILE. DO NOT EDIT.
|
||
//
|
||
// Source: copilot/copilot/contracts/metrics-v1.schema.json
|
||
// Regenerate with: bun run metrics-contract:generate
|
||
//
|
||
// Canonical mothership OTel metric names. Call sites should reference
|
||
// `Metric.<Identifier>` (e.g. `Metric.CopilotToolDuration`) rather than raw
|
||
// string literals, so the Go-side contract is the single source of truth and
|
||
// typos become compile errors.
|
||
//
|
||
// NAMES ONLY. Label keys and histogram bucket boundaries are NOT in this
|
||
// contract — Go owns the label-cardinality allowlist and the shared bucket
|
||
// constant, and the Sim emitter MUST mirror those by hand so the Go∪Sim metric
|
||
// union is queryable as one series set.
|
||
|
||
export const Metric = {
|
||
CopilotCacheAttempted: 'copilot.cache.attempted',
|
||
CopilotCacheHit: 'copilot.cache.hit',
|
||
CopilotCacheWrite: 'copilot.cache.write',
|
||
CopilotFileReadDuration: 'copilot.file.read.duration',
|
||
CopilotFileReadSize: 'copilot.file.read.size',
|
||
CopilotMessagesSerializeDuration: 'copilot.messages.serialize.duration',
|
||
CopilotRequestCount: 'copilot.request.count',
|
||
CopilotRequestDuration: 'copilot.request.duration',
|
||
CopilotToolCalls: 'copilot.tool.calls',
|
||
CopilotToolDuration: 'copilot.tool.duration',
|
||
CopilotVfsDelta: 'copilot.vfs.delta',
|
||
CopilotVfsMaterializeDuration: 'copilot.vfs.materialize.duration',
|
||
GenAiClientCacheTokenUsage: 'gen_ai.client.cache.token.usage',
|
||
GenAiClientTokenUsage: 'gen_ai.client.token.usage',
|
||
LlmClientErrors: 'llm.client.errors',
|
||
LlmClientOutputCutoff: 'llm.client.output_cutoff',
|
||
LlmClientStreamDuration: 'llm.client.stream.duration',
|
||
LlmClientTimeToFirstToken: 'llm.client.time_to_first_token',
|
||
} as const
|
||
|
||
export type MetricKey = keyof typeof Metric
|
||
export type MetricValue = (typeof Metric)[MetricKey]
|
||
|
||
/** Readonly sorted list of every canonical mothership metric name. */
|
||
export const MetricValues: readonly MetricValue[] = [
|
||
'copilot.cache.attempted',
|
||
'copilot.cache.hit',
|
||
'copilot.cache.write',
|
||
'copilot.file.read.duration',
|
||
'copilot.file.read.size',
|
||
'copilot.messages.serialize.duration',
|
||
'copilot.request.count',
|
||
'copilot.request.duration',
|
||
'copilot.tool.calls',
|
||
'copilot.tool.duration',
|
||
'copilot.vfs.delta',
|
||
'copilot.vfs.materialize.duration',
|
||
'gen_ai.client.cache.token.usage',
|
||
'gen_ai.client.token.usage',
|
||
'llm.client.errors',
|
||
'llm.client.output_cutoff',
|
||
'llm.client.stream.duration',
|
||
'llm.client.time_to_first_token',
|
||
] as const
|