Commit Graph

699 Commits

Author SHA1 Message Date
Anuraag Agrawal 86cd56441c
Deprecate StatusData.isUnset (#2500)
* Deprecate StatusData.isUnset

* Cleanup

* option 2
2021-01-13 13:58:30 +09:00
Anuraag Agrawal b68fc82b89
Make classes that can be shutdown Closeable (#2285)
* Make classes that can be shutdown Closeable

* Glad not my password

* Drift
2021-01-13 13:57:20 +09:00
Bogdan Drutu ca661b8c40
Avoid using inner classes in SpanData (#2495)
* Avoid using inner classes in SpanData

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

* Javadoc cleanups

* Remove non-existent type param

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-01-12 19:12:00 -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
Anuraag Agrawal 620969556f
Cleanup OTLP exporter timeout settings. (#2446)
* Cleanup OTLP exporter timeout settings.

* error prone
2021-01-09 15:32:20 +09: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
Anuraag Agrawal 62251dd3d2
Accept TimeUnit and Duration for BSP values instead of forcing millis. (#2444)
* Accept TimeUnit and Duration for BSP values instead of forcing millis.

* Test invalid

* Clean
2021-01-08 11:44:51 -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
Anuraag Agrawal d93a4b2585
Fix logging statement for java version (#2464) 2021-01-08 14:05:40 +09:00
Anuraag Agrawal 75e01110e4
Deprecate OpenTelemetry SPI. (#2453) 2021-01-08 13:37:44 +09: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 4b8a0c8591
Add TraceConfig.builder() (#2445) 2021-01-07 10:02:53 -08:00
Anuraag Agrawal bdbab03332
Deprecate ConfigBuilder. (#2442) 2021-01-07 08:52:39 -08:00
John Watson aa8433d87f
Add a test for the RECORD_ONLY span (#2440)
And remove the old TODOs from the BSP test.
2021-01-06 18:23:08 -08:00
John Watson e1cf785475
Have a default span name in case instrumentation sends in a blank/empty/null name (#2433)
* Have a default span name in case instrumentation sends in a blank/empty/null name.

* add a test for the null name
2021-01-07 09:01:05 +09:00
John Watson 015708b7a7
Move the semantic conventions generated code into its own module (#2423)
* Move the semantic conventions generated code into its own module

* remove un-needed dependencies

* move the semconv module to the top level, out of the API namespace

* Update README.md

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* move SemanticAttributes to a more appropriate package and deprecate the old ones in the api package.

* Apply suggestions from code review

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-01-06 08:25:17 -08:00
John Watson 3b3f1ae540
Change the SdkTracerManagement shutdown method to return CompletableResultCode (#2422)
* Change the SdkTracerManagement shutdown method to return CompletableResultCode

* protect against a possible NPE due to a race condition

* cleanup from PR feedback

* move the mock to where it's used.
2021-01-06 08:23:49 -08:00
Anuraag Agrawal 4121cdc693
Remove sampling probability attribute when was not accepted to spec. (#2432)
* Remove sampling probability attribute when was not accepted to spec.

* Remove unused

* Remove unused
2021-01-06 08:03:29 -08:00
Anuraag Agrawal 6cf8f934b1
Update dependencies (#2427)
* Update dependencies

* Brave
2021-01-06 16:32:18 +09:00
Anuraag Agrawal fe78126aed
Use logunit instead of tedious jul handler modifications for testing (#2425) 2021-01-06 09:30:35 +09: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
Anuraag Agrawal 4dbbe807c9
Deprecate addSpanProcessor mutator (#2385) 2021-01-04 08:43:52 -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
Anuraag Agrawal 66d08f4f00
Deprecate updateActiveTraceConfig (#2405)
* Deprecate updateActiveTraceConfig

* Spot

* Foo

* Spot++
2020-12-25 11:11:54 +09:00
Anuraag Agrawal f8f409bae5
Rename OpenTelemetrySdkBuilder.build to buildAndRegisterGlobal and ad… (#2387)
* Rename OpenTelemetrySdkBuilder.build to buildAndRegisterGlobal and add non-registering version.

* Some clean
2020-12-25 11:04:02 +09: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
Anuraag Agrawal 2d1bdaff73
Merge non-metrics API into API artifact. (#2369)
* Merge non-metrics API into API artifact.

* Revert kotlin newline
2020-12-24 14:13:54 +09: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
Anuraag Agrawal 9f675da85a
Remove usage of updateTraceConfig in tests. (#2402)
* Remove usage of updateTraceConfig in tests.

* Clean
2020-12-23 08:15:50 -08:00
Anuraag Agrawal 24ef29efea
Add SimpleSpanProcessor.create and deprecate SimpleSpanProcessorBuilder (#2374)
* Deprecate SimpleSpanProcessorBuilder

* Null test
2020-12-23 12:31:02 +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
Anuraag Agrawal d48eab6aa9
Allow registering TraceConfigSupplier and use it from zpages. (#2390)
* Allow registering TraceConfigSupplier and use it from zpages.

* Finish

* Remove unnecessary method

* Same method name
2020-12-23 11:52:17 +09:00
Anuraag Agrawal 8fc4e627ca
Reduce usage of GlobalOpenTelemetry (#2386)
* Reduce usage of GlobalOpenTelemetry

* Cleanup
2020-12-23 10:17:46 +09: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