Just got Signoz setup locally (k8 cluster), I am sending traces from a nextjs 15 app to it and I can...
m
Just got Signoz setup locally (k8 cluster), I am sending traces from a nextjs 15 app to it and I can see the traces appear, but the attributes don't include the client ip of the request (to nextjs). • I have added additional
k8sattributes
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
Copy code
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.