Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify to_json indent from arguments #718

Merged
merged 3 commits into from
May 21, 2020

Conversation

dtaniwaki
Copy link
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
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
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