Commit Graph

998 Commits

Author SHA1 Message Date
Anuraag Agrawal 89675582a1
Use custom resource to avoid version number in assertion string. (#4065) 2022-01-07 14:32:47 +09:00
jack-berg 55bb83d2c1
Log warning when duplicate async instruments are registered (#4020)
* Log warning when duplicate async instruments are registered

* Improve test coverage
2022-01-07 11:53:00 +09:00
Anuraag Agrawal 429afa1c99
Add toString to SDK trace components and print autoconfigured SDK (#4047)
* Add toString to SDK trace components and print autoconfigured SDK

* Clean

* Tweak logging message
2022-01-07 10:55:46 +09:00
Mateusz Rzeszutek 96b7895173
Add DoubleHistogramPointData assertion: hasSumGreaterThan() (#4050) 2022-01-06 14:26:08 +09:00
Anuraag Agrawal dfb4a74ac5
Update errorprone (#4048) 2022-01-06 11:33:00 +09:00
James Moessis e65567d7ac
OTLP Marshalers for Exponential Histogram (#3995)
* otlp marshalers for exponential histogram

* properly write repeated uint64

* test for datapoint OTLP

* spotless

* test for exponential histogram marshaler

* fix size miscalculation upon empty repeated uint64

* change bucket marsahaller to use PrimitiveLongList

fix

* change sizze calc to use primitivelonglist
2022-01-05 13:29:39 +09:00
jack-berg 6c7755698b
Remove metrics suffix from metrics testing assertj package (#4037) 2022-01-04 12:21:01 +09:00
jack-berg 318091a170
Expand GlobaOpenTelemetry and OpenTelemetry to include metric accessors (#4035) 2022-01-04 11:27:37 +09:00
Anuraag Agrawal 538af68ee6
Return an interface when registering metric callbacks. (#4022)
* Return an interface when registring metrics.

* Return type-specific

* untypo
2021-12-23 13:13:13 +09:00
jack-berg a4c44737d7
Consistent behavior when metric instruments violate rules (#3977)
* Consistent behavior when instruments violate rules

* PR feedback

* Rollback check on async counter monotonicity
2021-12-22 09:32:17 -08:00
jack-berg ca69bc2adc
Deprecate InMemoryMetricReader (#3989)
* Deprecate InMemoryMetricReader

* Revert "Deprecate InMemoryMetricReader"

This reverts commit bd4fb42084.

* Move InMemoryMetricReader to :sdk:metrics-testing, deprecate version in :sdk:metrics

* Fix build

* Combine test classes, expand coverage
2021-12-22 08:39:11 +09:00
jack-berg 4fbcc5c860
Add logs testing module (#4016) 2021-12-21 11:48:09 +09:00
Josh Suereth 2b4fdc2e73
Rework histogram benchmarks to include exponential + no-bucket. (#3986)
* Rework histogram benchmarks to include exponential + no-bucket.

* spotless fix.

* Fix test scenarios from review.

* Add new benchmark for startup costs of histograms, with lots of caveats.

* Fixes from review.
2021-12-20 08:09:19 -08:00
jack-berg bbbde5dfde
Add SdkLogEmitterProvider to OpenTelemetrySdk (#3992) 2021-12-16 13:42:38 +09:00
Anuraag Agrawal 1e9fb21c64
Remove deprecated metrics APIs (#3990) 2021-12-15 11:51:32 +09:00
jack-berg cbecf1f706
Move and deprecate InMemoryMetricExporter (#3987) 2021-12-14 11:51:56 +09:00
Anuraag Agrawal b051012251
Support rc versions in span builder test. (#3980) 2021-12-10 12:27:50 +09:00
Anuraag Agrawal ed7f82f873
Remove dependency on api:metrics which was deprecated where possible. (#3975) 2021-12-09 06:27:50 -08:00
jack-berg f3ebf39c41
Add @IgnoreJRERequirement to JreDoubleAdder (#3973) 2021-12-08 16:01:35 -08:00
jack-berg 8d9a57d110
Refactor BatchLogProcessor, add MultiLogExporter, add NoopLogExporter, add LogExporter#flush() (#3955) 2021-12-09 08:40:08 +09:00
Anuraag Agrawal e195b92df3
Fix Logs SDK dependency (#3969) 2021-12-08 08:04:55 -08:00
jack-berg 5e39e5958d
Enable animal sniffer on metrics (#3945)
* Enable animal sniffer on metrics

* Use LongAdder/DoubleAdder if available

* Exclude implementation classes instead of used fields.

* keySet

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-12-08 07:52:24 -08:00
jack-berg 60b2afec33
Drop unused CountAggregator (#3966) 2021-12-08 17:30:52 +09:00
jack-berg 53030b7266
Configurable temporality (#3960)
* Allow configuration of preferred temporality in LoggingMetricExporter and OtlpJsonLoggingMetricExporter

* Make InMemoryMetricReader preferred temporality configurable

* Add create() methods to LoggingSpanExporter, LoggingMetricExporter, and SystemOutLogExporter, deprecate public constructors
2021-12-08 13:58:59 +09:00
Josh Suereth 34218da395
Fix up cumulatives to be preserved in more scenarios. (#3957)
* Fix up cumulatives to be preserved in more scenarios.  Expand testing/expectations to match cumulative user expecations.

* Fixes from review.
2021-12-07 13:34:42 +09:00
Anuraag Agrawal 8e04fbf0b8
Migrate most testsets to test suites. (#3953) 2021-12-07 08:37:15 +09:00
jack-berg d059dcd8f3
Add SdkLogEmitterProvider#get(String) (#3954) 2021-12-06 11:46:57 +09:00
Anuraag Agrawal e56e8ef018
Use PrimitiveLongList in ExponentialHistogramBuckets (#3947)
* Use PrimitiveLongList in ExponentialHistogramData

* Missing test
2021-12-03 18:12:10 -08:00
jason plumb 04239495ac
Let LogDataBuilder take a SpanContext directly. (#3942)
* Let LogDataBuilder take a SpanContext directly.

* rename to setContext() based on PR review, and simplify test code.

* Update sdk/logs/src/main/java/io/opentelemetry/sdk/logs/data/LogDataBuilder.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-12-03 17:57:22 -08:00
Anuraag Agrawal 737a5e2b26
Deprecate GlobalMeterProvider (#3948) 2021-12-03 08:43:49 +09:00
Anuraag Agrawal b1651a18cf
Rename .observe to .record (#3949)
* Rename .observe to .record

* Apply deprecation
2021-12-03 08:37:22 +09:00
Anuraag Agrawal 56e1b90afa
Remove unused dependency (#3950) 2021-12-02 06:10:56 -08:00
jack-berg 37d08f5bf9
Change EmptyAggregator to Drop Aggregator, remove @Nullable (#3887)
* Change EmptyAggregator to Drop Aggregator, remove @Nullable

* Add SdkMeterProvider unit test for drop aggregator

* Move EmptyMetricData to internal package

* Fix merge issue

* Add unit test for EmptyMetricData
2021-12-01 14:19:18 +09:00
jack-berg 3aac6c47d4
Fix metric descriptor compatibility check (#3941) 2021-11-30 18:55:54 -08:00
jack-berg ec45e9476f
Remove supported temporality (#3939)
* Remove supported temporality

* Switch to ternary
2021-11-30 11:43:51 +09:00
jack-berg 947406d149
Drop MinMaxSumCount aggregation (#3929) 2021-11-24 07:57:35 -08:00
jack-berg 201934aef5
Catch throwable in async callbacks, and propagate if fatal (#3922)
* Catch throwable in async callbacks, and propogate if fatal

* Add unit tests, adjust propagate ordering

* Create util function for propagateIfFatal

* PR feedback
2021-11-24 14:39:18 +09:00
jack-berg 12a54710b7
Remove bound instrument from metric API, move to internal package of metric SDK (#3928) 2021-11-24 13:23:31 +09:00
Anuraag Agrawal 55ff1dc533
Promote metrics API to stable (#3919)
* Add MeterProvider to OpenTelemetry API

* Spot

* Set

* Move NoopMeter to package private

* Merge metrics API code into API package

* Finish

* Fix / clean

* Drift

* Update extensions/noop-api/src/main/java/io/opentelemetry/extension/noopapi/NoopOpenTelemetry.java

Co-authored-by: John Watson <jkwatson@gmail.com>

* Spot

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-11-24 08:39:55 +09:00
Anuraag Agrawal 25d98bb8a5
Don't use GlobalMeterProvider for logs. (#3912) 2021-11-20 11:31:58 +09:00
Anuraag Agrawal 7627c8b372
Fix flaky ThrottlingLogger test (#3916) 2021-11-19 20:47:52 +09:00
Anuraag Agrawal 6933de18e5
Don't use global meter provider for trace export (#3901) 2021-11-19 15:06:22 +09:00
jack-berg 31d8840bf9
Fix typos in metrics-testing package (#3907) 2021-11-19 09:20:50 +09:00
jack-berg bc4f8f75a2
Make InstrumentSelect#getInstrumentType() nullable (#3893) 2021-11-17 18:02:53 -08:00
jack-berg 300c4963d8
Wrap async callbacks in try catch (#3895) 2021-11-17 18:01:39 -08:00
jack-berg efbc87b4df
Fix minor javadoc issues with the trace SDK (#3896) 2021-11-17 12:57:20 -08:00
Eugene R 95ada8edd2
Refactor `MeterSharedState` (#3867)
* refactor `MeterSharedState`

* fix format violations

* annotate the register method as Nullable

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-11-17 17:31:53 +09:00
Anuraag Agrawal 7972e84c8d
Enable nullaway for metrics SDK (#3845)
* Enable nullaway for metrics SDK

* Fix nullness

* Fix

* Cleanup

* Exception
2021-11-16 11:39:39 +09:00
Anuraag Agrawal 966c358ef1
Use a wrapper of primitive long array for histogram counts. (#3854)
* Use a wrapper of primitive long array for histogram counts.

* Fix

* Better
2021-11-16 10:53:09 +09:00
Eugene R f24ee19d0b
decommission the deprecated Gradle archivesBaseName property (#3878) 2021-11-15 10:55:08 -08:00