include user agent in http reporting · Issue #142 · openzipkin/zipkin-reporter-java · GitHub
Skip to content

include user agent in http reporting #142

Open

Description

@jcchavezs

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).

Activity

  1. codefromthecrypt commented on Apr 30, 2019

    @codefromthecrypt
    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

  2. codefromthecrypt commented on Jul 4, 2019

    @codefromthecrypt
    Member

    cc @openzipkin/core preferences on agent format?

  3. jcchavezs commented on Jul 12, 2019

    @jcchavezs
    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?

  4. codefromthecrypt commented on Jul 12, 2019

    @codefromthecrypt
    Member
  5. shakuzen commented on Jul 30, 2019

    @shakuzen
    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?

  6. codefromthecrypt commented on Jul 31, 2019

    @codefromthecrypt
    Member
  7. shakuzen commented on Jul 31, 2019

    @shakuzen
    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.

  8. codefromthecrypt commented on Aug 13, 2019

    @codefromthecrypt
    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?

  9. trustin commented on Aug 13, 2019

    @trustin

    SGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions