Skip to content
Permalink
Browse files

fix events not being included in the trace.

Also, it seems the JS base64 parser doesn't work on url encoded values
  • Loading branch information
carl-mastrangelo committed Nov 16, 2019
1 parent 0ffd823 commit 671ee53732e1ec0f56928d83258ce988ccb1cf83
@@ -121,7 +121,7 @@ public static void writeTraceHtml(Writer writer) throws IOException {
try (OutputStreamWriter w = new OutputStreamWriter(baos, UTF_8)) {
TraceEventWriter.writeTraceEvents(w);
}
byte[] traceData64 = Base64.getUrlEncoder().encode(baos.toByteArray());
byte[] traceData64 = Base64.getEncoder().encode(baos.toByteArray());

String indexWithTraceViewer =
replaceIndexTraceImport(index, traceViewer, new String(traceData64, UTF_8));
@@ -432,6 +432,9 @@ protected void onEvent(Mark mark) {
out:
{
switch (mark.getOperation()) {
case EVENT_N1S1:
case EVENT_N1S2:
break out;
case EVENT_N2S2:
case EVENT_N2S3:
tagMap = tagMap.withUnkeyed(mark.getTagStringValue(), mark.getTagFirstNumeric());
@@ -441,8 +444,6 @@ protected void onEvent(Mark mark) {
case TASK_START_N1S2:
case TASK_END_N1S1:
case TASK_END_N1S2:
case EVENT_N1S1:
case EVENT_N1S2:
case MARK:
case LINK:
case TAG_N0S1:

0 comments on commit 671ee53

Please sign in to comment.
You can’t perform that action at this time.