Skip to content

Specify to_json indent from arguments#718

Merged
toumorokoshi merged 3 commits intoopen-telemetry:masterfrom
dtaniwaki:specify-to-json-indent
May 21, 2020
Merged

Specify to_json indent from arguments#718
toumorokoshi merged 3 commits intoopen-telemetry:masterfrom
dtaniwaki:specify-to-json-indent

Conversation

@dtaniwaki
Copy link
Copy Markdown
Contributor

@dtaniwaki dtaniwaki commented May 21, 2020

We want to get a json of span without indent, but it's not possible with Span#to_json because the method uses hard-coded indent. We currently use a workaround of json.loads(span.to_json()) which is not efficient in the performance.

@dtaniwaki dtaniwaki requested a review from a team May 21, 2020 12:40
Copy link
Copy Markdown
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will approve because this change looks trivial, but at the same time I would suggest a unit test to ensure that your behavior isn't broken in the future as an undocumented use case.

@toumorokoshi toumorokoshi merged commit b4e135b into open-telemetry:master May 21, 2020
@dtaniwaki dtaniwaki deleted the specify-to-json-indent branch May 22, 2020 02:29
@dtaniwaki
Copy link
Copy Markdown
Contributor Author

Will add a unit test and send another PR 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants