Currently, Record() re-uses code with RecordWithOptions. This always creates
allocations for createRecordOption, which is not needed in this case - we only
have measurements and not generic options.
With a little code duplication, we can reduce these allocations.
Currently,
Record()
re-uses code withRecordWithOptions
. This always creates allocations for createRecordOption, which is not needed in this case - we only have measurements and not generic options.With a little code duplication, we can reduce these allocations.
Note to reviewers: This PR has two commits. The first is broken out into https://github.com/census-instrumentation/opencensus-go/pull/1266; likely that should be merged first For https://github.com/census-instrumentation/opencensus-go/issues/1265