[codex] feat: opt-in observability foundation を追加#706
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Closes #699.
Parent: #649.
OpenTelemetry observability の最初の土台として、デフォルトでは既存挙動に影響しない opt-in foundation を追加します。この PR では workflow / span / metric / exporter の実計装は開始しません。
変更内容
observabilityを追加src/infra/config/observabilityConfig.tsを追加し、normalize / denormalize / merge と、全フラグ disabled のデフォルトを定義src/infra/observability/otelFoundation.tsを追加し、observability.enabled === trueのときだけ@opentelemetry/sdk-nodeを lazy import して最小構成の SDK を初期化service.name: "takt"とservice.versionを設定>=18.19.0に調整スコープ外
SessionLogExporter/UsageEventsExporter/MonitorJsonExporterの実装monitor.json出力SessionLogger/UsageEventLogger/ProviderEventLoggerの置き換え検証
git diff --checkpassnpm ci --ignore-scripts --dry-runpass./node_modules/.bin/vitest run src/__tests__/otelFoundation.test.ts src/__tests__/dependency-versions.test.ts src/__tests__/models-api-boundary.test.tspass: 3 files / 12 testsnpm run buildpassnpm run lintpassnpm testpass: 412 files / 5644 testsnpm run test:e2e:mockpass: 36 files passed / 1 skipped、107 tests passed / 14 skipped / 30 todo