Skip to content

OpenTelemetryAttributes

const OpenTelemetryAttributes: object

Defined in: packages/middleware/src/opentelemetry.ts:171

OpenTelemetry span attribute names.

readonly BACKEND: "ai.backend" = 'ai.backend'

readonly DURATION_MS: "ai.duration.ms" = 'ai.duration.ms'

readonly FRONTEND: "ai.frontend" = 'ai.frontend'

readonly REQUEST_ID: "ai.request.id" = 'ai.request.id'

readonly REQUEST_MAX_TOKENS: "ai.request.max_tokens" = 'ai.request.max_tokens'

readonly REQUEST_MESSAGE_COUNT: "ai.request.message_count" = 'ai.request.message_count'

readonly REQUEST_MODEL: "ai.request.model" = 'ai.request.model'

readonly REQUEST_STREAM: "ai.request.stream" = 'ai.request.stream'

readonly RESPONSE_BACKEND: "ai.response.backend" = 'ai.response.backend'

readonly RESPONSE_FINISH_REASON: "ai.response.finish_reason" = 'ai.response.finish_reason'

readonly RESPONSE_MODEL: "ai.response.model" = 'ai.response.model'

readonly TOKENS_COMPLETION: "ai.tokens.completion" = 'ai.tokens.completion'

readonly TOKENS_PROMPT: "ai.tokens.prompt" = 'ai.tokens.prompt'

readonly TOKENS_TOTAL: "ai.tokens.total" = 'ai.tokens.total'