Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3F776200B2B for ; Mon, 13 Jun 2016 14:01:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3E3AA160A19; Mon, 13 Jun 2016 12:01:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8AB1E160A3C for ; Mon, 13 Jun 2016 14:01:23 +0200 (CEST) Received: (qmail 48358 invoked by uid 500); 13 Jun 2016 12:01:22 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 48348 invoked by uid 99); 13 Jun 2016 12:01:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jun 2016 12:01:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 66E76DFA96; Mon, 13 Jun 2016 12:01:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: acosentino@apache.org To: commits@camel.apache.org Date: Mon, 13 Jun 2016 12:01:23 -0000 Message-Id: In-Reply-To: <99220edeb958492f9b58847dda55a1e8@git.apache.org> References: <99220edeb958492f9b58847dda55a1e8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] camel git commit: Camel-Zipkin: replaced deprecated methods archived-at: Mon, 13 Jun 2016 12:01:24 -0000 Camel-Zipkin: replaced deprecated methods Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/92268c1f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/92268c1f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/92268c1f Branch: refs/heads/master Commit: 92268c1fa96d84039710e50f2eae7d6649028cc0 Parents: 520afce Author: Andrea Cosentino Authored: Mon Jun 13 14:00:32 2016 +0200 Committer: Andrea Cosentino Committed: Mon Jun 13 14:00:32 2016 +0200 ---------------------------------------------------------------------- .../org/apache/camel/zipkin/ZipkinClientRequestAdapter.java | 8 ++++---- .../src/main/java/org/apache/camel/zipkin/ZipkinHelper.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/92268c1f/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinClientRequestAdapter.java ---------------------------------------------------------------------- diff --git a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinClientRequestAdapter.java b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinClientRequestAdapter.java index a5aa944..ac0608b 100644 --- a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinClientRequestAdapter.java +++ b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinClientRequestAdapter.java @@ -63,10 +63,10 @@ public final class ZipkinClientRequestAdapter implements ClientRequestAdapter { exchange.getIn().setHeader(ZipkinConstants.SAMPLED, "0"); } else { exchange.getIn().setHeader(ZipkinConstants.SAMPLED, "1"); - exchange.getIn().setHeader(ZipkinConstants.TRACE_ID, IdConversion.convertToString(spanId.getTraceId())); - exchange.getIn().setHeader(ZipkinConstants.SPAN_ID, IdConversion.convertToString(spanId.getSpanId())); - if (spanId.getParentSpanId() != null) { - exchange.getIn().setHeader(ZipkinConstants.PARENT_SPAN_ID, IdConversion.convertToString(spanId.getParentSpanId())); + exchange.getIn().setHeader(ZipkinConstants.TRACE_ID, IdConversion.convertToString(spanId.traceId)); + exchange.getIn().setHeader(ZipkinConstants.SPAN_ID, IdConversion.convertToString(spanId.spanId)); + if (spanId.nullableParentId() != null) { + exchange.getIn().setHeader(ZipkinConstants.PARENT_SPAN_ID, IdConversion.convertToString(spanId.nullableParentId())); } } } http://git-wip-us.apache.org/repos/asf/camel/blob/92268c1f/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinHelper.java ---------------------------------------------------------------------- diff --git a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinHelper.java b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinHelper.java index da5e568..d54556a 100644 --- a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinHelper.java +++ b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinHelper.java @@ -32,9 +32,9 @@ public final class ZipkinHelper { public static SpanId createSpanId(String traceId, String spanId, String parentSpanId) { if (parentSpanId != null) { - return SpanId.create(IdConversion.convertToLong(traceId), IdConversion.convertToLong(spanId), IdConversion.convertToLong(parentSpanId)); + return SpanId.builder().traceId(IdConversion.convertToLong(traceId)).spanId(IdConversion.convertToLong(spanId)).parentId(IdConversion.convertToLong(parentSpanId)).build(); } - return SpanId.create(IdConversion.convertToLong(traceId), IdConversion.convertToLong(spanId), null); + return SpanId.builder().traceId(IdConversion.convertToLong(traceId)).spanId(IdConversion.convertToLong(spanId)).build(); } public static StreamCache prepareBodyForLogging(Exchange exchange, boolean streams) {