Linkerd2: report arbitrary headers in tap/top view

Created on 3 Jul 2019  路  9Comments  路  Source: linkerd/linkerd2

Feature Request

Tap and Top currently have a limited number of output fields; it would be extremely useful to be able to specify arbitrary http/grpc headers to display.

For extra points, being able to specify a field extraction with a regex would be keen.

What problem are you trying to solve?

In many cases, the source IP of a request is uninteresting: it will always be the internal IP of some sort of load balancer. What we actually care about is the X-Forwarded-For header, and specifically we care about the _first_ (comma-separated) value in the list of IPs it will contain.

Similarly, in many cases all traffic behind a perimeter LB will be in http/cleartext, but being able to see the contents of the X-Forwarded-Proto header could be extremely useful.

How should the problem be solved?

Minimally, some sort of --fields flag to top/tap that let me specify fields to list, perhaps in golang template format or along the lines of the gcloud --format / --filter specification

Any alternatives you've considered?

Paying many tens/hundreds of thousands of dollars for a splunk license? :(

How would users interact with this feature?

linkerd top --fields='Source={{.header["X-forwarded-for"]}}, Destination={{.destination}}, Method={{.method}}, Path={{.path}}, Proto={{.header["X-forwarded-proto"]}}'
areweb help wanted

Most helpful comment

I ll take this up

All 9 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

linkerd tap -o json now displays header information! We should consider how this can be leveraged in other commands that use Tap internally.

\o/

Is there anything else to this issue or can we close it?

@wmorgan headers are only exposed in the raw JSON output of linkerd tap. It seems likely it could be useful in other views that consume tap (like the web ui), top, etc

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

Still valuable!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

I ll take this up

Was this page helpful?
0 / 5 - 0 ratings

Related issues

briansmith picture briansmith  路  4Comments

ihcsim picture ihcsim  路  4Comments

alpeb picture alpeb  路  3Comments

ihcsim picture ihcsim  路  4Comments

vikas027 picture vikas027  路  4Comments