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

client-side annotations #6

Open
codefromthecrypt opened this issue Apr 13, 2016 · 2 comments
Open

client-side annotations #6

codefromthecrypt opened this issue Apr 13, 2016 · 2 comments

Comments

@codefromthecrypt
Copy link
Member

We're currently tagging outbound requests with a trace/span id. I wonder if we can configure a zipkin url and post json of the client-side of the trace?

@eirslett
Copy link
Contributor

I'm not sure I understand what you mean...?

@codefromthecrypt
Copy link
Member Author

In the current code, before we send a request, we add the trace id, like X-B3-TraceId: 9d30188d40a191d3. Let's say we started a stopwatch at the same time. If we added a hook after receiving the response, we could post the following to zipkin /api/v1/spans

[
{
  "traceId": "9d30188d40a191d3",
  "name": "get",
  "id": "9d30188d40a191d3",
  "timestamp": START_MICROS,
  "duration": END_MICROS-START_MICROS,
  "annotations": [
    {
      "endpoint": {
        "serviceName": "zipkin-chrome-extension",
        "ipv4": "MY_IP"
      },
      "timestamp": START_MICROS,
      "value": "cs"
    },
    {
      "endpoint": {
        "serviceName": "zipkin-chrome-extension",
        "ipv4": "MY_IP"
      },
      "timestamp": END_MICROS,
      "value": "cr"
    }
  ]
}
]

Obviously, we could batch up spans and post them at the same time, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants