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

include user agent in http reporting #142

Open
jcchavezs opened this issue Apr 29, 2019 · 9 comments
Open

include user agent in http reporting #142

jcchavezs opened this issue Apr 29, 2019 · 9 comments

Comments

@jcchavezs
Copy link

jcchavezs commented Apr 29, 2019

zipkin server now exposes the user agent in the collector logs so it makes sense to include them here. A proposed format would be [component]/[version] ([client]) for example zipkin-go/0.12 or zipkin-php/1.4 (curl).

@codefromthecrypt
Copy link
Member

probably we should prefer user agent formatting right? https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent

User-Agent: <product> / <product-version> <comment>

Common format for web browsers:

User-Agent: Mozilla/<version> (<system-information>) <platform> (<platform-details>) <extensions>

Ex here's FF actually sending during this issue

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:66.0) Gecko/20100101 Firefox/66.0

Notable change is slash between thing and version of thing. Also, note there are multiple groups from least to most specific.

I'd guess that we could do something to tell it is zipkin api, if we like... or skip that and save bytes by not sending the prefix. However, with the prefix different language reporters can have common analysis (if that's the goal)

Ex. assuming this is the latest version of the zipkin api endpoint, we can say zipkin/2.1.0 or zipkin-api/2.1.0 after that give the version of the module in use

zipkin/2.1.0 zipkin-reporter-okhttp3/2.9.3

carefully cc'ing @apache/zipkin-committers

@codefromthecrypt
Copy link
Member

cc @openzipkin/core preferences on agent format?

@jcchavezs
Copy link
Author

I have a doubt here: I don't think the api endpoint is too important, actually the reporter could report send the information to any sort of endpoint (wrong v1 endpoint or intermediate agent). I would be more interested on set the format this reporter is sending, e.g. zipkin/v1 vs zipkin/v2. What do you think?

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Jul 12, 2019 via email

@shakuzen
Copy link
Member

first thought seems probably the format is less like user agent and more like content-type

I agree. Perhaps we could consider adding this to the content type in a separate issue?

Ex. assuming this is the latest version of the zipkin api endpoint, we can say zipkin/2.1.0 or zipkin-api/2.1.0 after that give the version of the module in use

zipkin/2.1.0 zipkin-reporter-okhttp3/2.9.3

I like the second part. I'm not sure what the first part represents. Is that the Zipkin Server version?

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Jul 31, 2019 via email

@shakuzen
Copy link
Member

zipkin core library version. It might be overly defensive, but in case people have version skew...

Makes sense. I'm on board with the proposed format, then. We just might need to take care with naming to make sure we can uniquely know which reporter implementation it is.

@codefromthecrypt
Copy link
Member

let's go with the simplified armeria format I think because there's little chance of api drift and easier to deal with.

user-agent: armeria/0.89.0
so..
artifact/version
or..
user-agent: zipkin-sender-okhttp3/2.10.2

@anuraaga @trustin @minwoox @huydx @kojilin make sense?

@trustin
Copy link

trustin commented Aug 13, 2019

SGTM

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

4 participants