Skip to content

Commit 2c09f9d

Browse files
JssDWtvincenzopalazzo
authored andcommitted
trace: trim quotes from tag values
1 parent f36be4b commit 2c09f9d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

common/trace.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ void trace_span_tag(const void *key, const char *name, const char *value)
269269
size_t s = tal_count(span->tags);
270270
tal_resize(&span->tags, s + 1);
271271
span->tags[s].name = tal_strdup(span->tags, name);
272+
if (strstarts(value, "\"")
273+
&& strlen(value) > 1
274+
&& strends(value, "\"")) {
275+
value = tal_strndup(tmpctx, value + 1,
276+
strlen(value) - 2);
277+
}
272278
span->tags[s].value = tal_strdup(span->tags, value);
273279
}
274280

0 commit comments

Comments
 (0)