Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ coverage
# Turbo
.turbo
.tsbuildinfo
tsconfig.tsbuildinfo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. No need to add to gitignore.

The right place is

"tsBuildInfoFile": "node_modules/.cache/core.tsbuildinfo",


# Vim shit
*.py-E
Expand Down Expand Up @@ -60,7 +61,9 @@ apps/web/scripts-dist
# File uploads in development
apps/web/uploads
apps/web/public/uploads
apps/web/public/storage
uploads
storage

# Temporal
tmp
Expand Down Expand Up @@ -89,4 +92,6 @@ __testing__
# New spans
apps/web/ingest
apps/workers/workspaces/*/traces
apps/web/tsc-tracing
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Garbage I generated

*.tsbuildinfo

11 changes: 4 additions & 7 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
}
],
"incremental": true,
"tsBuildInfoFile": ".tsbuildinfo",
"noEmit": true,
"moduleResolution": "Bundler",
"jsx": "preserve",
"typeRoots": [
"./node_modules/@types"
],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was wrong

"skipLibCheck": true,
"types": [],
"baseUrl": ".",
"paths": {
"$/*": [
Expand All @@ -24,9 +23,7 @@
"./src/**/*.test.ts",
"./src/**/*.ts",
"./src/**/*.tsx",
"next-env.d.ts",
"next.config.js",
".next/types/**/*.ts"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This had a lot of shit. 3.8GB memory now 2.5GB

"next-env.d.ts"
],
"exclude": [
"node_modules",
Expand Down
7 changes: 3 additions & 4 deletions apps/web/tsconfig.workers.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
"module": "es2022",
"noEmit": false,
"moduleResolution": "Bundler",
"jsx": "preserve",
"typeRoots": ["./node_modules/@types"],
"skipLibCheck": true,
"baseUrl": ".",
"paths": {
"$/*": ["./src/workers/*"],
"@latitude-data/constants": ["../../packages/constants/src/index.ts"],
"@latitude-data/constants/*": ["../../packages/constants/src/*"]
"@latitude-data/constants": ["../../packages/constants"],
"@latitude-data/constants/*": ["../../packages/constants/*"]
}
},
"include": ["./src/workers/**/*.ts"],
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"watch:buildExamples": "chokidar 'examples/src/**/*' -c 'pnpm buildExamples'",
"mintlify_docs": "cd docs && mintlify dev",
"latitudeDocs": "pnpm buildExamples && concurrently \"pnpm watch:buildExamples\" \"pnpm mintlify_docs\"",
"tc": "turbo tc",
"tc": "tsc -b",
"tc:turbo": "turbo tc",
"prettier": "prettier --write \"{apps,packages}/**/*.{ts,tsx,md}\" --ignore-path .prettierrcignore",
"prettier:check": "prettier --check \"**/*.{ts,tsx,md}\" --ignore-path .prettierrcignore",
"test": "turbo test",
Expand Down
4 changes: 3 additions & 1 deletion packages/constants/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"extends": "@latitude-data/typescript-config/base.json",
"compilerOptions": {
"moduleResolution": "Bundler",
"rootDir": "./src"
"rootDir": "./src",
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsconfig.tsbuildinfo"
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
Expand Down
3 changes: 3 additions & 0 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "@latitude-data/typescript-config/base.json",
"compilerOptions": {
"noEmit": true,
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/core.tsbuildinfo",
"moduleResolution": "Bundler",
"jsx": "preserve"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/env/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"extends": "@latitude-data/typescript-config/base.json",
"compilerOptions": {
"moduleResolution": "Bundler",
"rootDir": "./src"
"rootDir": "./src",
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsconfig.tsbuildinfo"
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
Expand Down
36 changes: 12 additions & 24 deletions packages/telemetry/typescript/src/sdk/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,9 @@ import {
VertexAIInstrumentation,
} from '@traceloop/instrumentation-vertexai'

import type * as anthropic from '@anthropic-ai/sdk'
import type * as bedrock from '@aws-sdk/client-bedrock-runtime'
import type * as azure from '@azure/openai'
import type * as aiplatform from '@google-cloud/aiplatform'
import type * as vertexai from '@google-cloud/vertexai'
import type * as langchain_runnables from '@langchain/core/runnables'
import type * as langchain_vectorstores from '@langchain/core/vectorstores'
import type * as latitude from '@latitude-data/sdk'
import type * as cohere from 'cohere-ai'
import type * as langchain_agents from 'langchain/agents'
import type * as langchain_chains from 'langchain/chains'
import type * as langchain_tools from 'langchain/tools'
import type * as llamaindex from 'llamaindex'
import type * as openai from 'openai'
import type * as togetherai from 'together-ai'

const TRACES_URL = `${env.GATEWAY_BASE_URL}/api/v3/traces`
const SERVICE_NAME = process.env.npm_package_name || 'unknown'
Expand Down Expand Up @@ -122,23 +110,23 @@ export type TelemetryOptions = {
[Instrumentation.Latitude]?:
| typeof latitude.Latitude
| LatitudeInstrumentationOptions
[Instrumentation.OpenAI]?: typeof openai.OpenAI
[Instrumentation.Anthropic]?: typeof anthropic
[Instrumentation.AzureOpenAI]?: typeof azure
[Instrumentation.OpenAI]?: typeof import('openai').OpenAI
[Instrumentation.Anthropic]?: import('@anthropic-ai/sdk').Anthropic
[Instrumentation.AzureOpenAI]?: typeof import('@azure/openai')
[Instrumentation.VercelAI]?: 'manual'
[Instrumentation.VertexAI]?: typeof vertexai
[Instrumentation.AIPlatform]?: typeof aiplatform
[Instrumentation.Bedrock]?: typeof bedrock
[Instrumentation.TogetherAI]?: typeof togetherai.Together
[Instrumentation.Cohere]?: typeof cohere
[Instrumentation.VertexAI]?: import('@google-cloud/vertexai').VertexAI
[Instrumentation.AIPlatform]?: import('@google-cloud/aiplatform').v1.EndpointServiceClient
[Instrumentation.Bedrock]?: import('@aws-sdk/client-bedrock-runtime').BedrockRuntimeClient
[Instrumentation.TogetherAI]?: import('together-ai').default
[Instrumentation.Cohere]?: typeof import('cohere-ai').CohereClientV2
[Instrumentation.Langchain]?: {
chainsModule: typeof langchain_chains
agentsModule: typeof langchain_agents
toolsModule: typeof langchain_tools
chainsModule: import('langchain/chains').APIChain
agentsModule: import('langchain/agents').AgentExecutor
toolsModule: import('langchain/tools').Tool
vectorStoreModule: typeof langchain_vectorstores
runnablesModule: typeof langchain_runnables
}
[Instrumentation.LlamaIndex]?: typeof llamaindex
[Instrumentation.LlamaIndex]?: import('llamaindex').OpenAI
}
disableBatch?: boolean
exporter?: SpanExporter
Expand Down
2 changes: 2 additions & 0 deletions packages/telemetry/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"outDir": "./dist",
"rootDir": "../../",
"baseUrl": ".",
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsconfig.tsbuildinfo",
"paths": {
"$telemetry/*": ["./src/*"],
"@latitude-data/constants/*": ["../../constants/src/*"],
Expand Down
4 changes: 3 additions & 1 deletion packages/web-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"],
"jsx": "preserve"
"jsx": "preserve",
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsconfig.tsbuildinfo"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
Expand Down
17 changes: 17 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"files": [],
"references": [
{ "path": "./packages/constants" },
{ "path": "./packages/env" },
{ "path": "./packages/telemetry/typescript" },
{ "path": "./packages/core" },
{ "path": "./packages/web-ui" },

{ "path": "./apps/console" },
{ "path": "./apps/gateway" },
{ "path": "./apps/websockets" },
{ "path": "./apps/workers" },
{ "path": "./apps/web" }
]
}
Loading