Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add service name to access log fields #278

Closed
spicykoala opened this issue Apr 28, 2017 · 5 comments
Closed

Add service name to access log fields #278

spicykoala opened this issue Apr 28, 2017 · 5 comments
Milestone

Comments

@spicykoala
Copy link

I have a use case where I'm parsing the streamed access logs to calculate request statistics on a more granular level than the metrics output gives. I have no issues with this but, given a path that is split between two services - I can't figure out a way (other than keeping track of all of the service ips) to track which service the request is headed towards. Is this available at the time the access log is being created?

If not, any ideas or clever ways to workaround this?

Thanks for the awesome lb!

magiconair added a commit that referenced this issue Apr 28, 2017
This patch adds a $upstream_service field to the
available access log fields.

Fixes #278
@magiconair
Copy link
Contributor

Thanks. I'm glad you like it :)

I've added a patch which should do what you want. This sounds like a good idea and the metrics should probably expose that as well. Could you let me know whether that works for you?

@magiconair magiconair changed the title Is it possible to get the service name into an access log? Add service name to access log fields Apr 28, 2017
@magiconair
Copy link
Contributor

Erm, the metrics already export this. Time for ☕️ Enjoy 😄

@spicykoala
Copy link
Author

Perfect. That's exactly what I was looking for! Enjoy I shall.

@spicykoala
Copy link
Author

I realized I should probably leave this open until it's merged in :)

@magiconair
Copy link
Contributor

yeah ;) it is merged now. Have fun

@magiconair magiconair added this to the 1.4.4 milestone Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants