Skip to content

feat(otel): add instrumentation package#9

Open
psteinroe wants to merge 14 commits intomainfrom
feat/otel
Open

feat(otel): add instrumentation package#9
psteinroe wants to merge 14 commits intomainfrom
feat/otel

Conversation

@psteinroe
Copy link
Owner

No description provided.

psteinroe and others added 14 commits January 22, 2026 18:27
- Restore original 0000000001_setup.sql (revert in-place edits)
- Add 0000000003_trace_context.sql for context propagation
- Update instrumentation peer dependency to require pgconductor-js > 0.1.0
- Update CLAUDE.md with migration policy (never edit existing migrations)
The trace_context migration was incorrectly rewriting the invoke and
invoke_batch functions with different logic. This fix preserves all
original logic (supersede pattern, singleton throttle/debounce, etc.)
and only adds the trace_context column where needed.
Instead of exporting test fixtures from pgconductor-js, copy a
self-contained version into the instrumentation package. Simplified
to not depend on internal pgconductor-js modules.
Update PgConductorMetrics methods to accept a single object argument
instead of positional parameters for better clarity and consistency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The invoke function was being created in migration 1 without trace_context,
then migration 3 tried to drop and recreate it with trace_context. This caused
function ambiguity errors when calling invoke with named parameters.

Fix by adding trace_context to the base migration (table, type, and functions)
and using exception handling in migration 3 for existing deployments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use dynamic DROP to find and remove the 9-parameter invoke function
before creating the new 10-parameter version. Also add exception
handling for ALTER TYPE to make the migration idempotent.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant