feat(server-utils): Migrate @opentelemetry/instrumentation-redis to orchestrion#21925
Draft
chargome wants to merge 10 commits into
Draft
Conversation
Resolve conflict in experimentalUseDiagnosticsChannelInjection.ts: keep develop's derive-from-names for the 1:1 channel replacements (mysql, lru-memoizer) and add ioredisChannelIntegration separately, kept out of replacedOtelIntegrationNames since it only supersedes the ioredis sub-part of the composite OTel 'Redis'. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rvives bundling ioredis' connect() calls standard-as-callback's CJS default export; left external it resolves to a non-function in the nitro/Rollup bundle. Inline it alongside ioredis so the interop links consistently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Keep the OTel ioredis monkey-patch on Node without tracingChannel (<18.19) even when injection is opted in, since orchestrion can't run there — otherwise ioredis <5.11.0 would lose tracing entirely. - Defer the orchestrion ioredis bindTracingChannelToSpan calls via waitForTracingChannelBinding, matching the native redis diagnostics-channel subscriber, so the async-context binding registered by initOpenTelemetry() is available before binding. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nstrumentation The orchestrion opt-in imports cacheResponseHook; importing it from redis/index transitively pulled the vendored OTel IORedisInstrumentation/RedisInstrumentation into the opt-in module graph. Move cacheResponseHook + _redisOptions into redis/cache.ts (no OTel instrumentation imports) so apps using injection only for mysql/lru-memoizer don't bundle the redis OTel instrumentation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
develop now runs all node-integration tests a second time with INJECT_ORCHESTRION (#21911). Under orchestrion, ioredis <5.11 is instrumented by the diagnostics-channel subscriber, so its span origin is 'auto.db.orchestrion.redis' instead of the OTel monkey-patch's 'auto.db.otel.redis'. Branch the expected ioredis origin on isOrchestrionEnabled(); node-redis (redis-4/redis-5) is not ported and keeps the OTel origin. All other span attributes are identical. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
size-limit report 📦
|
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 #20765