[
https://issues.apache.org/jira/browse/HTRACE-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14299287#comment-14299287
]
Colin Patrick McCabe commented on HTRACE-51:
--------------------------------------------
awesome!
{{htrace.client.rest.max.spans.at.a.time}} -> {{htrace.client.rest.batch.size}}
?
{code}
/**
* Simple bounded queue to hold spans between periodic runs of the httpclient.
* TODO: Make size configurable.
*/
private final Queue<Span> queue;
{code}
Size is already configurable via {{htrace.client.rest.q.capacity}}, so we don't
need this TODO
{code}
try {
ContentResponse response = request.send();
if (response.getStatus() == HttpStatus.OK_200) {
LOG.info("POSTED " + count + " spans");
{code}
Should be {{LOG.debug}} ?
{code}
if (!this.queue.offer(span)) {
long now = System.currentTimeMillis();
// Only log every 5 minutes. Any more than this for a guest process is
obnoxious
if (now - lastAtCapacityWarningLog > 300000) {
LOG.warn("At capacity");
this.lastAtCapacityWarningLog = now;
}
}
{code}
Should use monotonic time here via System.nanoTime (divided by 10^6)
+1 once those are addressed
> htraced java REST client (a.k.a java SpanReceiver for htraced)
> --------------------------------------------------------------
>
> Key: HTRACE-51
> URL: https://issues.apache.org/jira/browse/HTRACE-51
> Project: HTrace
> Issue Type: New Feature
> Reporter: stack
> Assignee: stack
> Attachments: 51.txt, 51.txt, 51v4.txt, 51v5.txt, 52v2.txt
>
>
> Add a java REST client for htraced so we can build a receiver that writes
> htraced via REST from a java process.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)