Problem Statement
I have a CLI that makes request to our backend, and wanted to have distributed tracing setup. LLM suggested to use:
// Inject Sentry tracing headers
sentry.TraceRequest(tx.Context(), req)
But apparently such method does not exist. The closest thing I found was from otel package:
sentryotel.NewSentryPropagator().Inject(req.Context(), propagation.HeaderCarrier(req.Header))
Which I don't think will work as I don't have otel setup.
Solution Brainstorm
Add something like sentry.TraceRequest(tx.Context(), req) or sentry.GetTraceHeaders(tx.Context()) methods