Improve resource field structure for LogRecords#3972
Improve resource field structure for LogRecords#3972lzchen merged 5 commits intoopen-telemetry:mainfrom
Conversation
|
Are you getting a different output with the current implementation? I seem to get the expected dict representation when printing out the attributes of a resource. outputs: |
I think this repr is fine, but I was working on some tests with LogRecord and noticed the structure of the resource field is different from the one we have for spans (for example) during the I found this issue #3547, which was concerned about that too. So I'm suggesting we use |
Description
In #3547, we suggested the resource field structure be more consistent for LogRecords by making it similar to the representation used in Spans when using a console exporter. This PR extends that by improving the resource field structure for
LogRecordsusing theresource.to_json()method in the same way we have in spansType of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
toxDoes This PR Require a Contrib Repo Change?
Checklist: