Closed peterabbott closed 1 month ago
@peterabbott thanks for reaching out. I've tried to reproduce this but was not able to get the same behavior you're describing.
My attempt uses the node http
module to run a very simple server and winston
for logging. When sending a request to that server, and logging in the handler, the span_id
and trace_id
get attached properly. (see https://github.com/pichlermarc/repro-5001)
I think I may be misunderstanding where you'd expect the context to be active so that it can be attached to the winston
logs. Could you point me in the right direction?
@pichlermarc sorry, missed your question.
From what I can tell when using the latest version it is not hitting here, so either the function is not getting wrapped or is baling out here. In bumping the version we don't change anything else, just the version. I'll have a go at putting together a test to demonstrate.
@pichlermarc with that demo project I was not able to recreate with that demo project you created. There must be something else going on then. I have seen in some cases issues with the ordering of the instrumentation registration. Maybe something in that. I'll close for now, do some more debugging on my full app to see what is going on. If I recreate then reopen if needed
What happened?
Steps to Reproduce
When enabled, incoming and outgoing requests are automatically traced without having to manually create an active span.
Expected Result
an active span is available when making an http request
Actual Result
no active span available
Additional Details
The follow on from this, where we spotted, the winston instrumentation stopped adding the trace_id to the log messages because there was no active span. Have confirmed downgrading to 0.52 restores expected behaviour. Playing with the new disable incoming/output properties in 0.53 do nothing to change behaviour.
Related, but not specific to this ticket which is specific to Remix
The spans we receive from the system all start at downstream from out API (http) services, for example Lambda and ECS. Rolling back to 0.52 the API endpoints show up.
OpenTelemetry Setup Code
package.json
Relevant log output