Commit Graph

119 Commits

Author SHA1 Message Date
Bogdan Drutu a633d1ee87
[Breaking Change] Remove metrics exporter from stable testing package (#2857)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-17 12:29:05 -08:00
Anuraag Agrawal fa8bb33646
[Breaking Change] Rename API getDefault to noop! (#2842)
* Noop!

* errorprone
2021-02-17 09:18:22 -08:00
John Watson 20a1601089
[Breaking Change] Rename getEmpty() to empty() (#2831) 2021-02-17 08:15:23 -08:00
Anuraag Agrawal 1fc7e057ad
Target Android API 21 with animalsniffer and disable it for metrics for now since it's unstable. (#2809) 2021-02-12 11:59:43 -08:00
Bogdan Drutu 301a29d7a3
Move labels outside of the stable package (#2647)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-02 10:24:06 -08:00
Bogdan Drutu 439c7c5c79
Remove metrics specific helpers from internal.StringUtils (#2663)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-02 08:21:36 -08:00
Anuraag Agrawal 6eee5ba4ae
Update dependencies (#2618)
* Update dependencies

* Inline annotations

* Revert "Inline annotations"

This reverts commit 8facc4ddbe.

* Unmodifiable
2021-02-01 12:21:00 +09:00
Anuraag Agrawal 1a56b8b0d8
Migrate api / sdk projects to build.gradle.kts (#2609) 2021-01-29 10:10:40 -08:00
Anuraag Agrawal 32a63fb8e3
Migrate to using gradle platform to manage dependency versions instea… (#2586)
* Migrate to using gradle platform to manage dependency versions instead of global variables.

* Remove unused and fix test

* Revert test yolo

* Workaround test ordering issue by just merging them

* Spot
2021-01-27 13:54:58 +09:00
Anuraag Agrawal 760b012430
Migrate to guava JRE version (#2590) 2021-01-27 13:28:57 +09:00
John Watson 1f84ec099b
Create a MANDATORY Resource instance containing mandatory attributes. Merge that into the default resource. (#2366)
* Assign a fallback service name to resources when building the signal Provider instances.

* Add a MANDATORY resource that will contain all mandatory attributes.

* some cleanups of leftover stuff

* make the MANDATORY resource instance private

* updates from ResourceAttributes changes

* be sure to set the service name in the jaeger tests
2021-01-21 09:01:16 -08:00
Anuraag Agrawal adbed0c0fd
Remove remaining 0.14.0 deprecated stuff. (#2544) 2021-01-19 09:21:44 -08:00
Bogdan Drutu 4720911d66
Add initial support to define temporality per aggregator (#2534)
In this PR there are quiet some changes:
* Default aggregation for Sum/UpDownSum observers is changed to Sum, now that the sum knows how to produce cumulative for different types of instruments.
* SumAggregationFactory has an argument that allows to configure to produce always cumulative or delta for all types except sum/updownsum observers.
* `toMetricPoint` now accepts all available timestamps start, last collection, now and can decide which one to use.
* LastValue produces only gauge metrics now. The start time is always 0 (a.k.a. unset).

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-15 11:55:18 -08:00
Bogdan Drutu c3574c47de
Move InstrumentProcessor initialization in the Accumulator (#2529)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-14 15:09:49 -08:00
Bogdan Drutu 2bc0541a3a
When creating aggregator pass resource and instrumentation library info. (#2528)
Avoid passing these info again when converting to metrics, and make every aggregator store this.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-14 13:27:14 -08:00
Bogdan Drutu 32747ba1d3
Update metric data util in the aggregator, remove unnecessary helpers (#2520)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-14 09:35:15 -08:00
Bogdan Drutu cbcec6b359
Rename Point to PointData to suggest that it represents data reprezentation (#2519)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-14 13:05:40 +09:00
Anuraag Agrawal 6bee59e912
Remove OpenTelemetry SPI (#2504) 2021-01-14 11:35:41 +09:00
Anuraag Agrawal e0f6260bc9
Remove ConfigBuilder and deprecated exporter constants / timeouts (#2506)
* Remove deprecated usage from exporters

* Remove ConfigBuilder and deprecated exporter settings.
2021-01-14 09:31:03 +09:00
Bogdan Drutu 53f0e30776
Extract inner classes from metrics API (#2517)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-13 15:26:21 -08:00
Bogdan Drutu 957bd0ad1c
Move jmh benchmarks to the artifact that is testing (#2515)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-13 14:05:51 -08:00
Bogdan Drutu 04b6b51b5d
Remove deprecated methods from metrics (#2509)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-13 10:31:32 -08:00
Bogdan Drutu c405579419
Remove public from classes/methods that don't need to be (#2510)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-13 10:31:03 -08:00
Bogdan Drutu 61eafc62eb
Avoid using inner classes in MetricData (#2493)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-13 11:31:24 +09:00
Bogdan Drutu 488d6b68db
Avoid passing the time to collect by calling the producer public method (#2490)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-12 15:17:58 -08:00
Bogdan Drutu 9175d94f8a
For async instrument tests call the public metric producer method, instead of passing timestamp (#2492)
* Implement MetricProducer directly by the SdkMeterProvider

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Call the public metric producer method, instead of passing timestamp

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-12 14:51:33 -08:00
Bogdan Drutu a6d2047b23
Implement MetricProducer directly by the SdkMeterProvider (#2489)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-12 14:51:05 -08:00
Bogdan Drutu cd8c13b905
Add tests for the default meter name (#2491)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-12 13:34:31 -08:00
Bogdan Drutu 1523bbb43e
Rename testSdk with sdkMeter to match the class name (#2488)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-12 12:46:08 -08:00
Bogdan Drutu 0e9e993a58
Create SdkMeter via provider, simplifies initialization logic (#2487)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-12 12:36:55 -08:00
Bogdan Drutu 2ae096044c
Update tests for sync instruments, test for whole data, consistent tests, fix names (#2486)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-12 12:36:39 -08:00
Bogdan Drutu 172a1fc39f
Ensure that all points produce for a metric and all metrics have same start/end timestamps (#2473)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-11 08:10:00 -08:00
Bogdan Drutu f9bf909372
Pass the whole instrument descriptor to the Aggregator factory (#2472)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-09 15:30:04 -08:00
Bogdan Drutu 890015b082
Some small fixes in the metrics (#2471)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-08 16:25:47 -08:00
Bogdan Drutu 72dd37b757
Extract Builder as a top-level class (#2469)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-08 15:39:50 -08:00
Bogdan Drutu f71c48bd4e
Cleanup ViewRegistry, move processor creation to InstrumentProcessor (#2467)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-08 12:05:47 -08:00
Bogdan Drutu 757cd79889
With all the operations on the Aggregator, no need to define Accumulation (#2462)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-08 08:28:08 -08:00
Bogdan Drutu 1c40444da3
Remove aggregation and merge functionality into aggregator (#2460)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-07 16:29:45 -08:00
Anuraag Agrawal bdbab03332
Deprecate ConfigBuilder. (#2442) 2021-01-07 08:52:39 -08:00
Anuraag Agrawal 3eda37ad7f
Have projects set their release state to alpha instead of recognizing word metrics (#2428) 2021-01-05 09:07:18 -08:00
Bogdan Drutu 450db6c2b2
Change MetricData to expose the Point type that is expected for each data type (#2413)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-01-03 08:32:52 -08:00
Anuraag Agrawal 70876ed4ad
Add SdkMeterProviderBuilder.buildAndRegisterGlobal (#2407) 2021-01-01 13:45:15 -08:00
Bogdan Drutu 838be8ef8e
Move accumulations to a different package (#2412)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-28 17:52:20 -08:00
Bogdan Drutu b1a22e03a6
Rename Aggregator -> AggregatorHandle; AggregatorFactory -> Aggregator (#2395)
* Rename Aggregator -> AggregatorHandle; AggregatorFactory -> Aggregator

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update comments for Aggregator and AggregatorHandle

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-24 08:11:18 -08:00
Bogdan Drutu 241ae28a44
Make the toMetricsData to use generic map of labels to accumulations (#2397)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-24 08:49:28 +09:00
Bogdan Drutu fa507d4e7c
Make Aggregation generic, so we can ensure type safety between compon… (#2394)
* Make Aggregation generic, so we can ensure type safety between components

This ensures that we pass the correct type of Accumulation between components inside the SDK.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Adress feedback

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-22 19:13:29 -08:00
Bogdan Drutu a77a5f0b7b
Add ability to create accumulation to the Aggregator (#2392)
This way the Accumulator will produce the right accumulations, for example in case of count. Added tests for all instrument types.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-22 16:22:41 -08:00
Bogdan Drutu 296723b9f7
Change aggregator to use generics for Accumulation (#2382)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-22 11:40:20 -08:00
Bogdan Drutu a49ee16159
Add aggregation factory and remove specialized only the aggregator by value type (#2391)
This will allow to specialize merge arguments and other methods in the Aggregation by the type of the value recorded.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-22 11:17:46 -08:00
Bogdan Drutu 1c937c4f4e
Remove AbstractBoundInstrument, move mapping logic to Aggregator (#2384)
* Remove AbstractBoundInstrument, move mapping logic to Aggregator

Remove one allocation when calling instruments without bounds.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Fix review comments

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-22 10:38:25 -08:00