Metalstorm
08/30/2025, 11:58 AMk8sattributes
via processors
and I can see them in the UI
• I have added OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_HEADERS: user-agent,referer,cf-connecting-ip,x-forwarded-for,x-real-ip,forwarded
to the nextjs app env vars
• I have added this to the HttpInstrumentation
headersToSpanAttributes: {
server: {
requestHeaders: ["user-agent", "referer", "cf-connecting-ip", "x-forwarded-for", "x-real-ip", "forwarded"],
},
},
I am surprised this is even needed, i would expect these to be on by default (as they are very commonly used)
If I use https://gist.github.com/trentm/ce3568c01d1328d0769f136c3d24d6bb for testing I can see 'client.address'
in the trace, and that doesn't explicitly add the headers.