Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .oxlintrc.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@
}
},
{
"files": ["**/integrations/tracing-channel/aws-sdk/**/*.ts"],
"files": ["**/integrations/aws-sdk/**/*.ts"],
"rules": {
"typescript/no-explicit-any": "off",
"typescript/no-unsafe-member-access": "off"
}
},
{
"files": ["**/integrations/tracing-channel/aws-sdk/services/**/*.ts"],
"files": ["**/integrations/aws-sdk/services/**/*.ts"],
"rules": {
"max-lines": "off",
"complexity": "off"
Expand Down
2 changes: 1 addition & 1 deletion packages/server-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ export {
handleFastifyError,
// oxlint-disable-next-line typescript/no-deprecated
instrumentFastify,
} from './integrations/tracing-channel/fastify';
} from './integrations/fastify';
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import {
URL_FULL,
} from '@sentry/conventions/attributes';
import { MESSAGING_QUEUE_PROCESS_SPAN_OP, MESSAGING_QUEUE_PUBLISH_SPAN_OP } from '@sentry/conventions/op';
import { amqplibModuleNames } from '../../orchestrion/config/amqplib';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { CHANNELS } from '../../orchestrion/channels';
import { bindTracingChannelToSpan } from '../../tracing-channel';
import { amqplibModuleNames } from '../orchestrion/config/amqplib';
import { invokeOrchestrionInstrumentation } from '../orchestrion/instrumentation';
import { CHANNELS } from '../orchestrion/channels';
import { bindTracingChannelToSpan } from '../tracing-channel';

// NOTE: this uses the same name as the OTel integration by design.
// When enabled, the OTel 'Amqplib' integration is omitted from the default set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import {
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
startInactiveSpan,
} from '@sentry/core';
import { getGenAiSpanOp, resolveAIRecordingOptions } from '../../ai/core/utils';
import { addPrivateRequestAttributes, addResponseAttributes, extractRequestAttributes } from '../../ai/anthropic-ai';
import { instrumentAsyncIterableStream, instrumentMessageStream } from '../../ai/anthropic-ai/streaming';
import type { AnthropicAiOptions, AnthropicAiResponse } from '../../ai/anthropic-ai/types';
import { CHANNELS } from '../../orchestrion/channels';
import { bindTracingChannelToSpan } from '../../tracing-channel';
import { anthropicAiModuleNames } from '../../orchestrion/config/anthropic-ai';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { getGenAiSpanOp, resolveAIRecordingOptions } from '../ai/core/utils';
import { addPrivateRequestAttributes, addResponseAttributes, extractRequestAttributes } from '../ai/anthropic-ai';
import { instrumentAsyncIterableStream, instrumentMessageStream } from '../ai/anthropic-ai/streaming';
import type { AnthropicAiOptions, AnthropicAiResponse } from '../ai/anthropic-ai/types';
import { CHANNELS } from '../orchestrion/channels';
import { bindTracingChannelToSpan } from '../tracing-channel';
import { anthropicAiModuleNames } from '../orchestrion/config/anthropic-ai';
import { invokeOrchestrionInstrumentation } from '../orchestrion/instrumentation';

// Same name as the OTel integration by design, so the OTel 'Anthropic_AI'
// integration is deduplicated out of the default set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {
SENTRY_KIND,
HTTP_RESPONSE_STATUS_CODE,
} from '@sentry/conventions/attributes';
import { CHANNELS } from '../../../orchestrion/channels';
import { awsSdkModuleNames } from '../../../orchestrion/config/aws-sdk';
import { invokeOrchestrionInstrumentation } from '../../../orchestrion/instrumentation';
import type { TracingChannelLifeCycleOptions } from '../../../tracing-channel';
import { bindTracingChannelToSpan, safeChannelCallback } from '../../../tracing-channel';
import { CHANNELS } from '../../orchestrion/channels';
import { awsSdkModuleNames } from '../../orchestrion/config/aws-sdk';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import type { TracingChannelLifeCycleOptions } from '../../tracing-channel';
import { bindTracingChannelToSpan, safeChannelCallback } from '../../tracing-channel';
import { AWS_SDK_ORIGIN } from './constants';
import { ServicesExtensions } from './services';
import type { NormalizedRequest, NormalizedResponse, RequestMetadata } from './types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { SerializedTraceData } from '@sentry/core';
import { debug, uniq } from '@sentry/core';
import { DEBUG_BUILD } from '../../../../debug-build';
import { DEBUG_BUILD } from '../../../debug-build';
import type { SNS, SQS } from '../aws-sdk.types';

// https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-quotas.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
GEN_AI_USAGE_INPUT_TOKENS,
GEN_AI_USAGE_OUTPUT_TOKENS,
} from '@sentry/conventions/attributes';
import { DEBUG_BUILD } from '../../../../debug-build';
import { DEBUG_BUILD } from '../../../debug-build';
import {
GEN_AI_OPERATION_NAME_VALUE_CHAT,
GEN_AI_OPERATION_NAME_VALUE_GENERATE_CONTENT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
FAAS_INVOKED_PROVIDER as ATTR_FAAS_INVOKED_PROVIDER,
FAAS_INVOKED_REGION as ATTR_FAAS_INVOKED_REGION,
} from '@sentry/conventions/attributes';
import { DEBUG_BUILD } from '../../../../debug-build';
import { DEBUG_BUILD } from '../../../debug-build';
import type { NormalizedRequest, NormalizedResponse } from '../types';
import type { RequestMetadata, ServiceExtension } from './ServiceExtension';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import {
startSpan,
waitForTracingChannelBinding,
} from '@sentry/core';
import { DEBUG_BUILD } from '../../debug-build';
import type { ChannelName } from '../../orchestrion/channels';
import { CHANNELS } from '../../orchestrion/channels';
import type { TracingChannelPayloadWithSpan } from '../../tracing-channel';
import { bindTracingChannelToSpan } from '../../tracing-channel';
import { DEBUG_BUILD } from '../debug-build';
import type { ChannelName } from '../orchestrion/channels';
import { CHANNELS } from '../orchestrion/channels';
import type { TracingChannelPayloadWithSpan } from '../tracing-channel';
import { bindTracingChannelToSpan } from '../tracing-channel';

// NOTE: this uses the same name as the OTel integration by design.
// When enabled, the OTel 'Dataloader' integration is omitted from the default set.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as diagnosticsChannel from 'node:diagnostics_channel';
import type { IntegrationFn } from '@sentry/core';
import { defineIntegration } from '@sentry/core';
import { expressModuleNames } from '../../../orchestrion/config/express';
import { invokeOrchestrionInstrumentation } from '../../../orchestrion/instrumentation';
import { expressModuleNames } from '../../orchestrion/config/express';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import type { ExpressIntegrationOptions } from './types';
import { instrumentExpress } from './instrumentation';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
startInactiveSpan,
stringMatchesSomePattern,
} from '@sentry/core';
import { DEBUG_BUILD } from '../../../debug-build';
import { CHANNELS } from '../../../orchestrion/channels';
import { bindTracingChannelToSpan } from '../../../tracing-channel';
import { DEBUG_BUILD } from '../../debug-build';
import { CHANNELS } from '../../orchestrion/channels';
import { bindTracingChannelToSpan } from '../../tracing-channel';
import {
getActualMatchedRoute,
getConstructedRoute,
Expand All @@ -32,7 +32,7 @@ import type {
HandleChannelContext,
RegistrationChannelContext,
} from './types';
import { setHttpServerSpanRouteAttribute } from '../../../utils/setHttpServerSpanRouteAttribute';
import { setHttpServerSpanRouteAttribute } from '../../utils/setHttpServerSpanRouteAttribute';

const ORIGIN = 'auto.http.express';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FastifyIntegration, FastifyReply, FastifyRequest } from './types';
import * as diagnosticsChannel from 'node:diagnostics_channel';
import { DEBUG_BUILD } from '../../../debug-build';
import { DEBUG_BUILD } from '../../debug-build';
import { getClient, debug, captureException } from '@sentry/core';
import { defaultShouldHandleError, INTEGRATION_NAME } from './utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import {
withActiveSpan,
} from '@sentry/core';
import type { FastifyInstance, FastifyRequest } from './types';
import { DEBUG_BUILD } from '../../../debug-build';
import { setHttpServerSpanRouteAttribute } from '../../../utils/setHttpServerSpanRouteAttribute';
import { DEBUG_BUILD } from '../../debug-build';
import { setHttpServerSpanRouteAttribute } from '../../utils/setHttpServerSpanRouteAttribute';

const PACKAGE_NAME = '@sentry/instrumentation-fastify';
const SUPPORTED_VERSIONS = '>=3.21.0 <6';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { IntegrationFn } from '@sentry/core';
import { defineIntegration } from '@sentry/core';
import { firebaseModuleNames } from '../../../orchestrion/config/firebase';
import { invokeOrchestrionInstrumentation } from '../../../orchestrion/instrumentation';
import { firebaseModuleNames } from '../../orchestrion/config/firebase';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { instrumentFirebase } from './instrumentation';

const INTEGRATION_NAME = 'Firebase' as const;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as diagnosticsChannel from 'node:diagnostics_channel';
import { CHANNELS } from '../../../orchestrion/channels';
import { bindTracingChannelToSpan, safeChannelCallback } from '../../../tracing-channel';
import { CHANNELS } from '../../orchestrion/channels';
import { bindTracingChannelToSpan, safeChannelCallback } from '../../tracing-channel';
import type { FirestoreReference } from './firestore-types';
import { startFirestoreSpan } from './firestore';
import { wrapFunctionsRegistration } from './functions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { SENTRY_OP } from '@sentry/conventions/attributes';
import { DATABASE_DB_SPAN_OP } from '@sentry/conventions/op';
import type { IntegrationFn } from '@sentry/core';
import { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, startInactiveSpan } from '@sentry/core';
import { CHANNELS } from '../../orchestrion/channels';
import { genericPoolModuleNames } from '../../orchestrion/config/generic-pool';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { bindTracingChannelToSpan } from '../../tracing-channel';
import { CHANNELS } from '../orchestrion/channels';
import { genericPoolModuleNames } from '../orchestrion/config/generic-pool';
import { invokeOrchestrionInstrumentation } from '../orchestrion/instrumentation';
import { bindTracingChannelToSpan } from '../tracing-channel';

// Same name as the OTel integration by design — when enabled, the OTel
// 'GenericPool' integration is omitted from the default set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import {
spanToJSON,
startInactiveSpan,
} from '@sentry/core';
import { getGenAiSpanOp, resolveAIRecordingOptions } from '../../ai/core/utils';
import { addPrivateRequestAttributes, addResponseAttributes, extractRequestAttributes } from '../../ai/google-genai';
import { instrumentStream } from '../../ai/google-genai/streaming';
import type { GoogleGenAIOptions, GoogleGenAIResponse } from '../../ai/google-genai/types';
import { CHANNELS } from '../../orchestrion/channels';
import { bindTracingChannelToSpan } from '../../tracing-channel';
import { googleGenAiModuleNames } from '../../orchestrion/config/google-genai';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { getGenAiSpanOp, resolveAIRecordingOptions } from '../ai/core/utils';
import { addPrivateRequestAttributes, addResponseAttributes, extractRequestAttributes } from '../ai/google-genai';
import { instrumentStream } from '../ai/google-genai/streaming';
import type { GoogleGenAIOptions, GoogleGenAIResponse } from '../ai/google-genai/types';
import { CHANNELS } from '../orchestrion/channels';
import { bindTracingChannelToSpan } from '../tracing-channel';
import { googleGenAiModuleNames } from '../orchestrion/config/google-genai';
import { invokeOrchestrionInstrumentation } from '../orchestrion/instrumentation';

// Same name as the OTel integration by design, so the OTel 'Google_GenAI'
// integration is deduplicated out of the default set.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as diagnosticsChannel from 'node:diagnostics_channel';
import type { Client, IntegrationFn } from '@sentry/core';
import { defineIntegration, extendIntegration } from '@sentry/core';
import { graphqlIntegration as graphqlNativeIntegration } from '../../../graphql';
import type { GraphqlDiagnosticChannelsOptions } from '../../../graphql/graphql-dc-subscriber';
import { CHANNELS } from '../../../orchestrion/channels';
import { graphqlModuleNames } from '../../../orchestrion/config/graphql';
import { invokeOrchestrionInstrumentation } from '../../../orchestrion/instrumentation';
import { bindTracingChannelToSpan, safeChannelCallback } from '../../../tracing-channel';
import { graphqlIntegration as graphqlNativeIntegration } from '../../graphql';
import type { GraphqlDiagnosticChannelsOptions } from '../../graphql/graphql-dc-subscriber';
import { CHANNELS } from '../../orchestrion/channels';
import { graphqlModuleNames } from '../../orchestrion/config/graphql';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { bindTracingChannelToSpan, safeChannelCallback } from '../../tracing-channel';
import {
finalizeExecuteSpan,
finalizeValidateSpan,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import {
SPAN_STATUS_ERROR,
startInactiveSpan,
} from '@sentry/core';
import type { GraphqlDocumentNode } from '../../../graphql/utils';
import type { GraphqlDocumentNode } from '../../graphql/utils';
import {
collectGraphqlDocument,
getOperationSpanName,
hasResultErrors,
renameRootSpanWithOperation,
} from '../../../graphql/utils';
} from '../../graphql/utils';
import { GRAPHQL_DATA_SYMBOL, ORIGIN, SPAN_NAME_EXECUTE, SPAN_NAME_PARSE, SPAN_NAME_VALIDATE } from './constants';
import { getOperation, wrapFields, wrapFieldResolver } from './resolvers';
import type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import type {
// eslint-disable-next-line typescript/no-deprecated -- TODO(v11): Replace deprecated attributes
import { HTTP_METHOD, HTTP_ROUTE } from '@sentry/conventions/attributes';
import { AttributeNames, handlerPatched, HapiLayerType, HapiLifecycleMethodNames } from './hapi-types';
import { setHttpServerSpanRouteAttribute } from '../../utils/setHttpServerSpanRouteAttribute';
import { setHttpServerSpanRouteAttribute } from '../utils/setHttpServerSpanRouteAttribute';

type SpanAttributes = Record<string, string | undefined>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as diagnosticsChannel from 'node:diagnostics_channel';
import type { IntegrationFn } from '@sentry/core';
import { defineIntegration } from '@sentry/core';
import { CHANNELS } from '../../orchestrion/channels';
import { hapiModuleNames } from '../../orchestrion/config/hapi';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { CHANNELS } from '../orchestrion/channels';
import { hapiModuleNames } from '../orchestrion/config/hapi';
import { invokeOrchestrionInstrumentation } from '../orchestrion/instrumentation';
import { wrapExtArguments, wrapRouteArguments } from './hapi-utils';

// NOTE: same name as the OTel integration by design — when enabled, the OTel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import * as diagnosticsChannel from 'node:diagnostics_channel';
import { DB_STATEMENT, DB_SYSTEM, NET_PEER_NAME, NET_PEER_PORT } from '@sentry/conventions/attributes';
import type { IntegrationFn, Span } from '@sentry/core';
import { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, startInactiveSpan } from '@sentry/core';
import { CHANNELS } from '../../orchestrion/channels';
import { defaultDbStatementSerializer } from '../../redis/redis-statement-serializer';
import { bindTracingChannelToSpan } from '../../tracing-channel';
import { ioredisModuleNames } from '../../orchestrion/config/ioredis';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { CHANNELS } from '../orchestrion/channels';
import { defaultDbStatementSerializer } from '../redis/redis-statement-serializer';
import { bindTracingChannelToSpan } from '../tracing-channel';
import { ioredisModuleNames } from '../orchestrion/config/ioredis';
import { invokeOrchestrionInstrumentation } from '../orchestrion/instrumentation';

// Distinct from the OTel `Redis` integration, which is composite (node-redis +
// ioredis + the >=5.11.0 diagnostics_channel subscriber) and stays in the set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import * as diagnosticsChannel from 'node:diagnostics_channel';
import type { TracingChannelSubscribers } from 'node:diagnostics_channel';
import type { IntegrationFn, Span } from '@sentry/core';
import { defineIntegration } from '@sentry/core';
import { CHANNELS } from '../../../orchestrion/channels';
import { kafkajsModuleNames } from '../../../orchestrion/config/kafkajs';
import { invokeOrchestrionInstrumentation } from '../../../orchestrion/instrumentation';
import { CHANNELS } from '../../orchestrion/channels';
import { kafkajsModuleNames } from '../../orchestrion/config/kafkajs';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { isWrappedConsumerCallback, wrapEachBatch, wrapEachMessage } from './consumer';
import { applyErrorToSpans, startProducerSpan } from './spans';
import type { ConsumerRunConfig, ProducerBatch } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import {
NET_TRANSPORT,
SENTRY_KIND,
} from '@sentry/conventions/attributes';
import { DEBUG_BUILD } from '../../debug-build';
import { CHANNELS } from '../../orchestrion/channels';
import { bindTracingChannelToSpan } from '../../tracing-channel';
import { DEBUG_BUILD } from '../debug-build';
import { CHANNELS } from '../orchestrion/channels';
import { bindTracingChannelToSpan } from '../tracing-channel';

// NOTE: this uses the same name as the OTel integration by design. `@sentry/node`'s `knexIntegration`
// picks this subscriber over the vendored OTel path when orchestrion injection is active.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import {
// oxlint-disable-next-line typescript/no-deprecated
import { CODE_FUNCTION_NAME, HTTP_ROUTE, KOA_NAME, KOA_TYPE, SENTRY_OP } from '@sentry/conventions/attributes';
import { WEB_SERVER_MIDDLEWARE_SPAN_OP } from '@sentry/conventions/op';
import { DEBUG_BUILD } from '../../debug-build';
import { CHANNELS } from '../../orchestrion/channels';
import { koaModuleNames } from '../../orchestrion/config/koa';
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
import { setHttpServerSpanRouteAttribute } from '../../utils/setHttpServerSpanRouteAttribute';
import { DEBUG_BUILD } from '../debug-build';
import { CHANNELS } from '../orchestrion/channels';
import { koaModuleNames } from '../orchestrion/config/koa';
import { invokeOrchestrionInstrumentation } from '../orchestrion/instrumentation';
import { setHttpServerSpanRouteAttribute } from '../utils/setHttpServerSpanRouteAttribute';

// Same name as the OTel integration. When enabled, the OTel 'Koa' integration is omitted from the default set.
const INTEGRATION_NAME = 'Koa' as const;
Expand Down
Loading
Loading