Commit Graph

13 Commits

Author SHA1 Message Date
Bogdan Drutu c63d0c68cd
Move pdata in the new package (#3483)
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>
2021-06-25 01:17:31 +03:00
Bogdan Drutu 0a8a1dce58
Cleanup usage of TimestampUnixNanos and its API (#2549)
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>
2021-02-25 09:19:16 -08:00
Jay Camp 498bd315d0
Metric metadata generation (#1546)
* 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
2020-09-11 09:31:09 -07:00
Bogdan Drutu fc777257b2
Change host metrics receiver to use the new metrics internal structs (#1682)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-08-31 10:23:41 -07:00
Bogdan Drutu 42ac0eeafc
Move previous internal metrics package to dataold (#1658)
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>
2020-08-27 20:19:39 -07:00
Jay Camp 1e65674799
Update copyright (#1597)
* Update copyright

* rebase
2020-08-19 18:25:44 -07:00
James Bebbington 07791f617b
Host scrapers: Use same scrape time for all data points coming from same source (#1473) 2020-08-06 09:34:14 -07:00
James Bebbington add8f61d15
Rename host metrics to more consistent names based on the recently merged otep, and update function names accordingly (#1261) 2020-07-06 20:10:51 -07:00
James Bebbington ba0656e63c
Convert cpu/time to cpu/usage and correct unit / data type (#1092) 2020-06-05 06:38:16 -07:00
Bruno Garcia 8aa2731844
Remove year from copyright (#964) 2020-05-26 12:44:22 -04:00
Bogdan Drutu a637b41c22
Change entire repo to use the new vanityurl go.opentelemetry.io/collector (#977)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-05-15 12:04:05 -07:00
James Bebbington accaaa8b82
Minor cleanup to host metrics receiver (#920) 2020-05-06 07:17:07 -07:00
James Bebbington 3a51f6090d
Support any OS in host metrics receiver & cpu scraper, and include all relevant cpu states for Linux (#902) 2020-05-02 18:39:28 -07:00