mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
trace: trim quotes from tag values
This commit is contained in:
parent
f36be4b006
commit
2c09f9ddf0
@ -269,6 +269,12 @@ void trace_span_tag(const void *key, const char *name, const char *value)
|
||||
size_t s = tal_count(span->tags);
|
||||
tal_resize(&span->tags, s + 1);
|
||||
span->tags[s].name = tal_strdup(span->tags, name);
|
||||
if (strstarts(value, "\"")
|
||||
&& strlen(value) > 1
|
||||
&& strends(value, "\"")) {
|
||||
value = tal_strndup(tmpctx, value + 1,
|
||||
strlen(value) - 2);
|
||||
}
|
||||
span->tags[s].value = tal_strdup(span->tags, value);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user