Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Stop using custom annotations and move them into tags #10

Open
jcchavezs opened this issue May 8, 2019 · 6 comments
Open

Stop using custom annotations and move them into tags #10

jcchavezs opened this issue May 8, 2019 · 6 comments

Comments

@jcchavezs
Copy link

jcchavezs commented May 8, 2019

Is your feature request related to a problem? Please describe.
Zipkin provides a set of idiomatic annotations for server/client events described in https://zipkin.io/pages/instrumenting.html#core-data-structures. The current annotations Received xxx bytes are more suitable with tags as the timestamp does not provide any value more than the server start and server finish.

Describe the solution you'd like
Move the request/response size data into idiomatic tags and only keep core annotations:

/** The size of the non-empty HTTP request body, in bytes. Ex. "16384" * * Large uploads can exceed limits or contribute directly to latency. */
const string HTTP_REQUEST_SIZE = "http.request.size" 

/** The size of the non-empty HTTP response body, in bytes. Ex. "16384" * * Large downloads can exceed limits or contribute directly to latency. */
const string HTTP_RESPONSE_SIZE = "http.response.size"

I am more than happy to come up with a PR for this.

Ping @adriancole @basvanbeek @bogdandrutu

@codefromthecrypt
Copy link

yep as it is there are timestamped annotations with embedded variables which unnecessarily adds indexing load (aka dollars)

@bogdandrutu
Copy link
Contributor

@jcchavezs in case of a stream protocol we can have more than one annotation. The timestamp is important for few reasons:

  1. Determines the delay between the moment when the RPC was started and when the message was sent (in case of some queuing in the RPC client).
  2. For streams it is important to know when different packages are sent.

@codefromthecrypt
Copy link

codefromthecrypt commented May 8, 2019 via email

@jcchavezs
Copy link
Author

So @bogdandrutu are the size really necessary? if they are not, @adriancole are there idiomatic annotations for such a thing? is there any discussion around that? Something like ssp for Server Send Package or something like that?

@bogdandrutu
Copy link
Contributor

Size may be dropped if that causes problems for Zipkin

@codefromthecrypt
Copy link

in the case of unary where there is only one size noted (for request and response) and timing matches start/duration, there's really only a question of whether or not to add these things as tags.

when the timing isn't matching exactly, there are "ws" "wr" annotations, and also some fragment annotations as well. In any case the annotations do not concatenate size in their names.

So basically I would suggest that you can consider..

in any case, as long as size is not embedded in annotation names, it is not going to be bad.

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

No branches or pull requests

3 participants