htrace-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raam Rosh-Hai <r...@findhotel.net>
Subject Re: How to deal with htrace conversion of values to base64
Date Fri, 23 Dec 2016 12:10:11 GMT
Seems like it's because of the base64 url safe Alphabet.

This is the same string encoded both ways:
URL SAFE:
CgABqKdlb0B2jl8LAAMAAAASdHJhY2luZy1kaXNwYXRjaGVyCgAESCAq1QQdkQkKAAWvdiX_ycnsTw8ABgwAAAAECgABAAVEUihZhiALAAIAAAACY3MMAAMIAAEKAALxBgACAFALAAMAAAAXcGxhY2UtaHRyYWNlLzEwLjAuMi4yNDEAAAoAAQAFRFIoWYYgCwACAAAAAnNyDAADCAABCgAC8QYAAgBQCwADAAAAF3BsYWNlLWh0cmFjZS8xMC4wLjIuMjQxAAAKAAEABURSKF6a6AsAAgAAAAJzcwwAAwgAAQoAAvEGAAIAUAsAAwAAABdwbGFjZS1odHJhY2UvMTAuMC4yLjI0MQAACgABAAVEUihemugLAAIAAAACY3IMAAMIAAEKAALxBgACAFALAAMAAAAXcGxhY2UtaHRyYWNlLzEwLjAuMi4yNDEAAA8ACAwAAAAAAA

NOW:
CgABqKdlb0B2jl8LAAMAAAASdHJhY2luZy1kaXNwYXRjaGVyCgAESCAq1QQdkQkKAAWvdiX/ycnsTw8ABgwAAAAECgABAAVEUihZhiALAAIAAAACY3MMAAMIAAEKAALxBgACAFALAAMAAAAXcGxhY2UtaHRyYWNlLzEwLjAuMi4yNDEAAAoAAQAFRFIoWYYgCwACAAAAAnNyDAADCAABCgAC8QYAAgBQCwADAAAAF3BsYWNlLWh0cmFjZS8xMC4wLjIuMjQxAAAKAAEABURSKF6a6AsAAgAAAAJzcwwAAwgAAQoAAvEGAAIAUAsAAwAAABdwbGFjZS1odHJhY2UvMTAuMC4yLjI0MQAACgABAAVEUihemugLAAIAAAACY3IMAAMIAAEKAALxBgACAFALAAMAAAAXcGxhY2UtaHRyYWNlLzEwLjAuMi4yNDEAAA8ACAwAAAAAAA==

Notice the url safe version switched / with _

On 23 December 2016 at 12:19, Raam Rosh-Hai <raam@findhotel.net> wrote:

> After making the change I am getting a TApplicationException
>
> org.apache.htrace.shaded.thrift.TApplicationException: Internal error
> processing log: Last unit does not have enough valid bits
>
> Any tips?
>
> On 23 December 2016 at 11:41, Raam Rosh-Hai <raam@findhotel.net> wrote:
>
>> Trying it write now, hopefully PR soon.
>>
>> On 23 December 2016 at 10:21, Adrian Cole <adrian.f.cole@gmail.com>
>> wrote:
>>
>>> My guess is that this has to do with url encoding. Can you patch
>>> org.apache.htrace.impl.ScribeTransport to use
>>> encodeBase64URLSafeString instead of encodeBase64String?
>>>
>>> that might answer it..
>>>
>>> On Fri, Dec 23, 2016 at 5:04 PM, Raam Rosh-Hai <raam@findhotel.net>
>>> wrote:
>>> > Hi St.Ack,
>>> >
>>> > Thank you for your reply, I am using "org.apache.htrace" %
>>> "htrace-core4" %
>>> > "4.1.0-incubating",
>>> > "org.apache.htrace" % "htrace-zipkin" % "4.1.0-incubating" in scala.
>>> > I was looking at an older version of htrace (non incubating master on
>>> > github) and now I see your are no longer doing that.
>>> >
>>> > What I am getting in zipkin UI is a malformed base64 string. where the
>>> `/`
>>> > were converted to `_` after debugging the zipkin receiver it seems
>>> like the
>>> > spans are sent correctly, maybe you have an idea what can go wrong?
>>> >
>>> > On 22 December 2016 at 18:47, Stack <stack@duboce.net> wrote:
>>> >
>>> >> Show us where in the code this is happening Raam Rosh-Hai and tell us
>>> what
>>> >> version of htrace you are using. Thanks.
>>> >> St.Ack
>>> >>
>>> >> On Thu, Dec 22, 2016 at 3:41 AM, Raam Rosh-Hai <raam@findhotel.net>
>>> wrote:
>>> >>
>>> >> >         I am saving a simple string value and it seems like the
>>> trace
>>> >> > pipkin connector is converting all values to base64 I then get
the
>>> base64
>>> >> > values in the zipkin fronted, any suggestions?
>>> >> >
>>> >> > Thanks,
>>> >> > Raam
>>> >> >
>>> >>
>>>
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message