Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add stdout metrics exporter
Adds the stdout metrics exporter alongside the trace and log stdout exporter.
Questions:
I've added
Encodable
/Codable
to some of the types to make the JSON encoding a little easier. This doesn't match the pattern inStdoutSpanExporter
which uses a wrapper that implementsCodable
. TheStdoutLogExporter
relies on theReadableLogRecord
beingCodable
. Is there a pattern that we want to standardize on for the std out exporters?The
StdoutSpanExporter
encodes eachSpanData
as a separate JSON object whereas theStdoutLogExporter
encodes the array ofReadableLogRecord
instead of the individual objects. Do we want to standardize on one of these patterns for all of the std out exporters? I couldn't discern from the spec if either of these is the "correct" way to do it.The other two std out exporters lack tests and so I've not added any for this one. Is this a blocker to merging?
Sample Output: