The new module go.opentelemetry.io/collector/model will be created later when the internal data will
also be moved.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Updates https://github.com/open-telemetry/opentelemetry-collector/issues/2488
Important Changes:
* Rename pdata.TimestampUnixNanos to pdata.Timestamp
* Remove pdata.TimestampUnixNanos and helpers, move them of the pdata.Timestamp type.
* Fix bug around IsZero, this function should return true if the time is January 1, year 1, 00:00:00 UTC not epoch.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* fix go generate
go generate would not work because a tool (esc) was missing from install-tools.
fixing in preparation for metrics metadata generation.
* Metric metadata generation
This implements the proposal (phase 1) in #985.
Currently just the cpu scraper has been migrated to gather feedback before
moving additional ones.
The plan is to check in the generated_metrics.go files. This makes it easier
when others want to import the code as a library to not have to run the code
generation in a library dependency.
generated_metrics.go will be generated by running `go generate`.
Resolves#985
* metadata improvements
* acronyms (e.g. CpuState) are now formatted correctly (CPUState)
* now handles labels with different semantics (e.g. state label in memory vs cpu)
* they are referenced in code by unique ids (CPUState, MemState) but their string values are just "state"
* specify which labels are referenced by a given metric
* adding tests
* merge cleanup
* cleanup
* cleanup
* don't do codegen on windows for now
* fix lint issues
* fix coverage checks
* fix ignore
* add docs, code review feedback
* invalid metric type check
* update docs
* cleanup
* doc fix
* make system.memory.usage int sum
* move golint code to third_party dir
Need to re-generate the new internal metrics, but it is too much code to change,
so will move this to dataold (was internal anyway, so no public breaking change).
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>