Skip to content

Commit

Permalink
Merge pull request #99 from appoptics/cc/nh-35816
Browse files Browse the repository at this point in the history
remove chatty debug logs
  • Loading branch information
cleverchuk authored May 10, 2023
2 parents 1b9dfde + 0d22189 commit 2e4d7ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public SamplingResult shouldSample(@Nonnull Context parentContext,
SamplingResult result = TraceStateSamplingResult.wrap(samplingResult, additionalAttributesBuilder.build(),
xTraceOptionsResponseStr);

logger.debug(String.format("Sampling decision: %s", result.getDecision()));
logger.trace(String.format("Sampling decision: %s", result.getDecision()));
return result;
}

Expand All @@ -150,7 +150,7 @@ private String constructUrl(Attributes attributes) {
String target = attributes.get(SemanticAttributes.HTTP_TARGET);

String url = String.format("%s://%s%s", scheme, host, target);
logger.debug(String.format("Constructed url: %s", url));
logger.trace(String.format("Constructed url: %s", url));
return url;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public CompletableResultCode export(@Nonnull Collection<SpanData> collection) {
}
}

logger.debug("Finished sending " + collection.size() + " spans to the collector.");
logger.debug("Finished buffering " + collection.size() + " spans");
return CompletableResultCode.ofSuccess();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,22 @@ static String buildTransactionName(String traceId, String spanName, Attributes s

String customName = CustomTransactionNameDict.get(traceId);
if (customName != null) {
LOGGER.debug(String.format("Using custom transaction name(%s)", customName));
LOGGER.trace(String.format("Using custom transaction name(%s)", customName));
return customName;
}

String path = spanAttributes.get(SemanticAttributes.HTTP_TARGET);
// use HandlerName which may be injected by some MVC instrumentations (currently only Spring MVC)
String handlerName = spanAttributes.get(AttributeKey.stringKey("HandlerName"));
if (handlerName != null) {
LOGGER.debug(String.format("Using HandlerName(%s) as the transaction name", handlerName));
LOGGER.trace(String.format("Using HandlerName(%s) as the transaction name", handlerName));
return handlerName;
}

// use "http.route"
String httpRoute = spanAttributes.get(SemanticAttributes.HTTP_ROUTE);
if (httpRoute != null) {
LOGGER.debug(String.format("Using http.route (%s) as the transaction name", httpRoute));
LOGGER.trace(String.format("Using http.route (%s) as the transaction name", httpRoute));
return httpRoute;
}

Expand All @@ -194,7 +194,7 @@ static String buildTransactionName(String traceId, String spanName, Attributes s
CUSTOM_TRANSACTION_NAME_PATTERN_SEPARATOR);

if (transactionName != null) {
LOGGER.debug(String.format("Using custom configure pattern to extract transaction name: (%s)",
LOGGER.trace(String.format("Using custom configure pattern to extract transaction name: (%s)",
transactionName));
return transactionName;
}
Expand All @@ -204,12 +204,12 @@ static String buildTransactionName(String traceId, String spanName, Attributes s
String transactionNameByUrl = getTransactionNameByUrlAndPattern(path, DEFAULT_TRANSACTION_NAME_PATTERN, true,
DEFAULT_TRANSACTION_NAME_PATTERN_SEPARATOR);
if (transactionNameByUrl != null) {
LOGGER.debug(
LOGGER.trace(
String.format("Using token name pattern to extract transaction name: (%s)", transactionNameByUrl));
return transactionNameByUrl;
}

LOGGER.debug(String.format("Using span name as the transaction name: (%s)", spanName));
LOGGER.trace(String.format("Using span name as the transaction name: (%s)", spanName));
return spanName;
}

Expand Down

0 comments on commit 2e4d7ff

Please sign in to comment.