Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.8k
ref(server-utils): Streamline redisIntegration#23353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
d5deeb068f1384ebf80e374ad2e01993641986c68faaf4e90c2fccf9File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,6 @@ | ||
| import type { RedisDiagnosticChannelResponseHook } from '@sentry/server-utils'; | ||
| import { redisIntegration as redisChannelIntegration } from '@sentry/server-utils'; | ||
| import type { Integration, IntegrationFn } from '@sentry/core'; | ||
| import { defineIntegration, extendIntegration } from '@sentry/core'; | ||
| const INTEGRATION_NAME = 'DenoRedis' as const; | ||
| export interface DenoRedisIntegrationOptions { | ||
| /** | ||
| * Optional hook invoked once the redis command response arrives. Useful for | ||
| * attaching response-derived attributes (e.g. cache hit/miss, payload size). | ||
| */ | ||
| responseHook?: RedisDiagnosticChannelResponseHook; | ||
| } | ||
| const _denoRedisIntegration = ((options: DenoRedisIntegrationOptions = {}) => { | ||
| // The diagnostics_channel subscription lives in server-utils so it is shared | ||
| // across runtimes. The AsyncLocalStorage async-context strategy the channel | ||
| // binding depends on is installed once in `init()`, so this wrapper only | ||
| // renames the shared integration. | ||
| return extendIntegration(redisChannelIntegration({ responseHook: options.responseHook }), { | ||
| name: INTEGRATION_NAME, | ||
| }); | ||
| }) satisfies IntegrationFn; | ||
| import { redisIntegration } from '@sentry/server-utils/orchestrion'; | ||
| /** | ||
| * Creates spans for redis commands, batches, and connects under Deno via | ||
| * `node:diagnostics_channel`. Subscribes to both node-redis (>= 5.12.0) and | ||
| * ioredis (>= 5.11.0) channels — both libraries publish to dedicated channels | ||
| * once they're new enough; on older releases the subscribers are inert. | ||
| * @deprecated Use `redisIntegration` instead. | ||
| */ | ||
| export const denoRedisIntegration = defineIntegration(_denoRedisIntegration) as ( | ||
| options?: DenoRedisIntegrationOptions, | ||
| ) => Integration & { name: 'DenoRedis'; setupOnce: () => void }; | ||
| export const denoRedisIntegration: typeof redisIntegration = redisIntegration; |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.