Open max-prtsr opened 4 weeks ago
Hello, thanks for writing in.
Could you please add debug: true
to your init and paste the logs?
I also noticed you add the expressIntegration
, this is not necessary anymore.
@andreiborza
Sentry Logger [log]: Initializing Sentry: process: 44816, thread: main.
Sentry Logger [log]: Integration installed: InboundFilters
Sentry Logger [log]: Integration installed: FunctionToString
Sentry Logger [log]: Integration installed: LinkedErrors
Sentry Logger [log]: Integration installed: RequestData
Sentry Logger [log]: Integration installed: Console
Sentry Logger [log]: Integration installed: Http
Sentry Logger [log]: Integration installed: NodeFetch
Sentry Logger [log]: Integration installed: OnUncaughtException
Sentry Logger [log]: Integration installed: OnUnhandledRejection
Sentry Logger [log]: Integration installed: ContextLines
Sentry Logger [log]: Integration installed: LocalVariables
Sentry Logger [log]: Integration installed: Context
Sentry Logger [log]: Integration installed: Modules
Sentry Logger [log]: Integration installed: Express
Sentry Logger [log]: Integration installed: Fastify
Sentry Logger [log]: Integration installed: Graphql
Sentry Logger [log]: Integration installed: Mongo
Sentry Logger [log]: Integration installed: Mongoose
Sentry Logger [log]: Integration installed: Mysql
Sentry Logger [log]: Integration installed: Mysql2
Sentry Logger [log]: Integration installed: Redis
Sentry Logger [log]: Integration installed: Postgres
Sentry Logger [log]: Integration installed: Nest
Sentry Logger [log]: Integration installed: Hapi
Sentry Logger [log]: Integration installed: Koa
Sentry Logger [log]: Integration installed: Connect
Sentry Logger [log]: Integration installed: ProfilingIntegration
Sentry Logger [log]: Integration installed: Debug
Sentry Logger [log]: Running in CommonJS mode.
Sentry Logger [debug]: @opentelemetry/api: Registered a global for diag v1.9.0.
Sentry Logger [debug]: @opentelemetry/api: Registered a global for trace v1.9.0.
Sentry Logger [debug]: @opentelemetry/api: Registered a global for context v1.9.0.
Sentry Logger [debug]: @opentelemetry/api: Registered a global for propagation v1.9.0.
Sentry Logger [debug]: @opentelemetry/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'http' }
Sentry Logger [debug]: @opentelemetry/instrumentation-express Applying instrumentation patch for module on require hook {
module: 'express',
version: '4.17.1',
baseDir: '/xxx/node_modules/express'
}
Hey @max-prtsr , is there a reason why you manually add these headers to your request on the python side? They should be attached automatically anyway if you're using the requests
library. Could you try omitting these and check if the automatic propagation works?
They should be attached automatically anyway if you're using the requests library.
@chargome either you're missing something or sentry python is truly broken.
If sentry modifies ALL outer requests it means I'll 100% remove it and stop paying moving to anything else. Silently adding headers to outgoing requests in my production system feels like a ticking time bomb.
Could you please provide the exact part of documentation about it?
UPD: Yes, if I remove manual request
patching then it works. Now please tell me how to turn it off by default, it's a serious problem I don't want to deal with in the future, https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
You can find information about trace propagation in general, as well as about how to disable this, here: https://docs.sentry.io/platforms/javascript/guides/node/tracing/trace-propagation/#disabling-distributed-tracing
Note that only in Node headers are automatically attached, where CORS is not an issue. In the browser, headers are not automatically attached to external URLs, to avoid CORS issues.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.25.0
Framework Version
"express": "4.17.1"
Link to Sentry event
https://protosure.sentry.io/issues/4798675845/?project=1531391&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=7d&stream_index=3
Reproduction Example/SDK Setup
Steps to Reproduce
I'm sending trace stuff from the python server:
And you can see the correct trace_id is being sent in debug info
Expected Result
Exception in express uses trace got in
sentry-trace
-5e4d5a3d98584bfcbe381e77fd509701-866c84dc2567c8f8-1
Actual Result
It creates new trace
9233d99781ed8d5b932ffb019d8e791e
debug info