[
https://issues.apache.org/jira/browse/HTRACE-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14334289#comment-14334289
]
Nick Dimiduk commented on HTRACE-113:
-------------------------------------
I wasn't suggesting to use the method Exception#printStackTrace, only pointing
out that exception's stack trace is populated on creation, not on catch.
For your new build() method, I think this would be equivalent -- no custom
getStackTrace() required:
{noformat}
public Sampler build() {
Sampler sampler = newSampler();
if (LOG.isTraceEnabled()) {
LOG.trace("Created new sampler of type " + sampler.getClass().getName(),
new Exception());
}
return sampler;
}
{noformat}
I'm +1 with fix on commit. This logging will be really helpful.
> Add more log4j messages to htrace SamplerBuilder, SpanReceiverBuilder, etc.
> ---------------------------------------------------------------------------
>
> Key: HTRACE-113
> URL: https://issues.apache.org/jira/browse/HTRACE-113
> Project: HTrace
> Issue Type: Improvement
> Affects Versions: 3.2.0
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HTRACE-113.001.patch, HTRACE-113.002.patch
>
>
> We should add more log4j messages at DEBUG or TRACE level to htrace
> SamplerBuilder, SpanReceiverBuilder, etc. This will make it easier to
> determine which samplers and span receivers are being used by the application.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)