Skip to content

Commit

Permalink
feat(observe): implement opentelemetry (#113)
Browse files Browse the repository at this point in the history
Signed-off-by: GALLLASMILAN <[email protected]>
  • Loading branch information
GALLLASMILAN authored Dec 11, 2024
1 parent e3e1968 commit f67e300
Show file tree
Hide file tree
Showing 15 changed files with 196 additions and 526 deletions.
10 changes: 8 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,15 @@ HTTP_PROXY_URL=

# --- TOOLS SECTION ---

# Observer server, see https://github.com/i-am-bee/bee-observe
BEE_OBSERVE_API_URL=http://127.0.0.1:3009
# --- OBSERVABILITY SECTION ---
BEE_OBSERVE_API_URL=http://127.0.0.1:4318
BEE_OBSERVE_API_AUTH_KEY=observe-auth-key
# Enable instrumentation
BEE_FRAMEWORK_INSTRUMENTATION_ENABLED=false
# Ignore sensitive keys from collected events data
INSTRUMENTATION_IGNORED_KEYS="apiToken,apiKey,cseId,accessToken,proxy,username,password"

# --- OBSERVABILITY SECTION ---

# Identifiers to be used for seeder and to allocate new users into default organization
IBM_ORGANIZATION_OWNER_ID=org_user_670cc04869ddffe24f4fd70e
Expand Down
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ module.exports = {
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
caughtErrorsIgnorePattern: '^_'
}
],
'@typescript-eslint/no-empty-function': 'off',
'no-console': 'error'
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Main

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
branches: ["main"]
branches: ['main']

jobs:
lint:
Expand All @@ -18,8 +18,8 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Lint
Expand All @@ -35,8 +35,8 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: TS check
Expand All @@ -52,8 +52,8 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"mikro-orm": "NODE_OPTIONS='--import tsx' mikro-orm --config ./src/mikro-orm.config.ts",
"prepare": "husky",
"lint": "eslint ./",
"lint:fix": "eslint --fix ./",
"ts:check": "tsc --noEmit",
"grpc:generate-types": "proto-loader-gen-types --defaults --keepCase --oneofs --longs=Number --enums=String --grpcLib=@grpc/grpc-js --outDir=./src/embedding/adapters/caikit/grpc/types ./src/embedding/adapters/caikit/grpc/protos/*.proto",
"copyright": "./scripts/copyright.sh",
Expand Down Expand Up @@ -48,7 +49,6 @@
"ajv": "^8.17.1",
"axios": "^1.7.7",
"bee-agent-framework": "0.0.52",
"bee-observe-connector": "0.0.6",
"bullmq": "^5.32.0",
"bullmq-otel": "^1.0.1",
"cache-manager": "^5.7.6",
Expand Down
26 changes: 0 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/observe/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ import { paths } from './schema.js';

import { BEE_OBSERVE_API_AUTH_KEY, BEE_OBSERVE_API_URL } from '@/config.js';

export type Span =
paths['/trace']['post']['requestBody']['content']['application/json']['spans'][0];

export type Client = ReturnType<typeof createClient<paths>>;

export const client = BEE_OBSERVE_API_URL
Expand Down
Loading

0 comments on commit f67e300

Please sign in to comment.