Commit Graph

1050 Commits

Author SHA1 Message Date
Trask Stalnaker cd2583df6a
Add misspell check (and fix misspellings) (#4290)
* Add misspell check

* Fix misspellings

* Spotless
2022-03-22 15:12:40 +09:00
Brian Yan e54e7ac4dc
feat:add the shortcut of removeif in ResourceBuilder (#4286)
* fix:add an ending period to form notes

* feat:add the shortcut of removeif in ResourceBuilder

* fix:fix the errors of check

* feat:run two gradlew task to achieve check

* fix:fix format violations

* feat:remove extra function and modify the unit test

* fix: fix format violations

* feat:format code and modify unit test

* feat:make unit test specification

* feat:cleanup for normalize
2022-03-22 13:03:55 +09:00
Trask Stalnaker ea288d9722
Reduce lock scope in CompletableResultCode (#4281) 2022-03-22 08:02:20 +09:00
jack-berg 59697eedc0
Metrics SDK odds and ends (#4273)
* Metrics SDK odds and ends

* Make InstrumentSelectorBuilder contructor package private

* Fix build

* Improve documentation for SdkMeterProviderBuilder defaults
2022-03-21 13:45:51 -05:00
jack-berg dba57a538a
Drop io.opentelemetry.sdk.metrics.common package (#4275) 2022-03-21 10:02:08 -05:00
jack-berg ccfa2dcbe4
Implement metric identity specification (#4222)
* Implement metric identity specification

* PR feedback

* Fix build
2022-03-15 12:46:27 -05:00
jack-berg ac884b12e1
Remove log name field (#4263) 2022-03-15 08:06:52 +09:00
jack-berg 59a6061dc5
Deprecate InstrumentationLibraryInfo (#4256)
* Deprecate InstrumentationLibraryInfo

* API diff
2022-03-14 14:45:10 -05:00
Anuraag Agrawal 26c04299d3
Make MetricData factories internal (#4257) 2022-03-11 16:30:13 +09:00
Anuraag Agrawal 7ae6904039
Migrate Aggregation to interface (#4255) 2022-03-10 13:26:11 +09:00
Anuraag Agrawal b0cdfdb78b
Migrate exemplar data to interface (#4253)
* Migrate exemplar data to interface

* internal
2022-03-10 12:08:38 +09:00
Anuraag Agrawal ef427f69ce
Convert ValueAtPercentile to ValueAtQuantile (#4254) 2022-03-10 11:30:20 +09:00
Anuraag Agrawal f5f99cf72d
Inline MeterSelector into InstrumentSelector (#4241) 2022-03-09 14:37:53 +09:00
Anuraag Agrawal 9ac622170e
Extract View configuration interface so it only exposes public API. (#4239)
* Extract View configuration interface so it only exposes public API.

* scare
2022-03-09 14:36:56 +09:00
Anuraag Agrawal 048a0c8d14
Migrate PointData to interface (#4242) 2022-03-09 11:16:48 +09:00
Anuraag Agrawal e676eb41f6
Remove metrics SDK deprecations (#4238) 2022-03-09 09:09:05 +09:00
Anuraag Agrawal 5fb1189b98
Add int overload for equalTo attribute assertion (#4249) 2022-03-09 08:23:34 +09:00
Anuraag Agrawal cb80383df8
Extract SummaryData interface for DoubleSummaryData (#4224)
* Extract SummaryData interface for DoubleSummaryData

* ValueAtQuantile too

* javadoc
2022-03-04 17:20:21 +09:00
Anuraag Agrawal 17265d0b0d
Extract HistogramData interface for DoubleHistogramData. (#4219)
* Extract HistogramData interface for DoubleHistogramData.

* Fix

* javadoc

* Fix merge
2022-03-04 16:49:39 +09:00
Anuraag Agrawal 5cbfe9d93e
Move ExponentialHistogram data to internal package. (#4217)
* Move ExponentialHistogram data to internal package.

* scare

* drift
2022-03-04 11:57:40 +09:00
Anuraag Agrawal 22c7a8e10b
Cleanups to View configuration (#4225) 2022-03-04 10:46:55 +09:00
Anuraag Agrawal 2527359cd5
Deprecate automatic histogram method for removal. (#4218) 2022-03-03 08:27:13 +09:00
Anuraag Agrawal a6107d5590
Remove type-specific SumData (#4216)
* Remove type-specific SumData

* scare
2022-03-02 08:40:21 +09:00
Lauri Tulmin 26dd896c09
Fix android desugaring for HashMap.forEach (#4221) 2022-03-01 08:08:23 +09:00
jack-berg 963bc384c8
Instrumentation scope (#4215)
* Add InstrumentationScopeInfo class

* Rewrite tracer provider documentation

* Refactor ComponentRegistry to use InstrumentationScopeInfo

* Finish updating documentation to reference scope instead of library

* PR feedback
2022-02-26 10:43:55 -08:00
jack-berg 9f10e0048e
Allow multiple async callbacks, allow callbacks to be removed (#4143)
* Allow multiple async callbacks, allow callbacks to be removed

* Use AutoCloseable to remove callbacks, don't unregister from MetricStorageRegistry

* Use CopyOnWriteArrayList

* PR feedback

* PR feedback
2022-02-25 11:51:51 -06:00
James Moessis c053393c32
optimise bucket comparison to fix slow test (#4204) 2022-02-25 14:39:50 +09:00
Anuraag Agrawal 69b00c3f35
Remove type-specific GaugeData (#4207) 2022-02-25 14:08:34 +09:00
Anuraag Agrawal 66520d1f3e
Cleanup ExemplarData (#4205) 2022-02-25 12:01:35 +09:00
Beppe Catanese 13fb460a54
(4172) Vararg versions of AttributeBuilder.put (#4188)
* Overload put with AttributeKey with String array

* Use generic instead of String

* Format and javadoc

* Cast to type

* New public method

* File based view configuration (#4163)

* Add experimental view config module

* Rename view-config to metric-incubator

* Switch naming from camelCase to snake_case

* Extend with attribute key filter

* Wire up to autoconfiguration

* Use snakeyaml instead of jackson

* PR feedback

* PR feedback

* Remove explicit okio dependency (#4187)

* Deprecate PrometheusCollector (#4185)

* Correct javadoc

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

* Cast to type

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2022-02-24 14:04:57 -08:00
Anuraag Agrawal c1afda5efa
Make createAggregator non-public (#4203) 2022-02-24 09:09:09 +09:00
Anuraag Agrawal d868eff3e1
Move view builders to top level (#4202) 2022-02-24 09:08:05 +09:00
Anuraag Agrawal 730b2a5be3
Make AbstractInstrumentBuilder private. (#4200) 2022-02-24 09:07:26 +09:00
Anuraag Agrawal 55d0ccac46
Remove unused Instrument interface. (#4198) 2022-02-24 09:07:10 +09:00
Beppe Catanese e8d1c2d838
Copy schema URL during Resource.toBuilder (#4209) 2022-02-24 09:06:29 +09:00
Anuraag Agrawal 242f509dd1
Add ability to do loose attribute matching while checking all keys. (#4173)
* Add ability to do loose attribute matching while checking all keys.

* equalTo

* Support absent keys
2022-02-22 12:15:17 +09:00
James Moessis 71351a26b5
Exponential Histogram Bucket Indexing Improvements (#4168)
* update indexing strategy to use simple static methods

* remove unused BucketMapper interface

* fix errors introduced by conflict resolution

* fix integer overflow/underflow in exphist corner case

* add test for recording at limits of Double

* fix mistake

* remove superfluous casts

* memoize scaleFactor

* remove superfluous javadoc

* static final not final static

* Make assertions clearer and comment for Math.pow() rounding

* spotless
2022-02-18 15:23:54 +09:00
jack-berg 19b0fec813
Deprecate log name field (#4160)
* Deprecate log name field

* Add deprecation description to javadoc
2022-02-11 12:15:48 +09:00
jack-berg b9074f1d8b
Drop deprecations (#4158)
* Drop OBSERVABLE_SUM and OBSERVABLE_UP_DOWN_SUM

* Drop SdkMeterProviderConfigurer
2022-02-08 14:17:06 +09:00
Josh Suereth 5c1bd6cbfe
Add adaptable circular buffer implementation for ExponentialCounter. (#4087)
* Add adaptable circular buffer implementation for ExponentialCounter and expose hooks to test its use in Exponential Histogram aggregator.

* Clean up some adapting circular buffer code.

* Fix style issues.

* Apply spotless.

* Add tests for adapting integer array.

* Finish wiring ability to remember previous integer cell size and expand testing.

* Update array copy from code review.

* Fixes/cleanups from review.

- Fix a bug in equality where it was forcing ExponentialCounter to have
  the same offset, even if it had stored 0 counts in all buckets. This
  interacts negatively with merge/diff tests where creating a fresh
  exponential bucket would have different indexStart then diff-ing
  another.
- Modify default exponential bucket counter to be adapting circular
  buffer.
- Remove some not-well-though-out methods (like zeroOf, zeroFrom) in
  favor of a "clear" method on ExponentialCounter
- Modify ExponentialBucketStrategy to be an actual implementation.

* Improve testing of copy behavior across exponential-counter implementations.

* Last fix/cleanup for PR.  Remove remaining TODO around preserving runtime optimisations.

* Fixes from review.

* Add test to ensure 0 is returned from exponential counters outside popualted range.

* Add a bunch of extra equality tests.

* run spotless.

* Add note about equality.

* Add copy() method to AdaptingIntegerArray, update tests.

* Fix checkstyle.

* Add internal disclaimer, reduce visibility of test classes

Co-authored-by: jack-berg <jberg@newrelic.com>
2022-02-04 11:21:04 -06:00
jack-berg 0ed4967224
Rename instrument type enumeration values (#4150)
* Rename instrument type enumeration values

* Retain old enum values with @Deprecation notice
2022-02-04 10:28:12 -06:00
Lauri Tulmin 9c6cc22fb6
Javadoc code snippets use methods that don't exist (#4140)
* Replace OpenTelemetry with GlobalOpenTelemetry in javadoc code snippets

* use openTelemetry instread of GlobalOpenTelemetry

* replace one ome usage of GlobalOpenTelemetry
2022-02-02 12:20:36 -08:00
Anuraag Agrawal 47f7c38ef5
Enable loggers in all tests via slf4j. (#4126)
* Route all test jul logging through slf4j.

* Cleanup and more suppressions
2022-02-02 14:43:25 +09:00
Anuraag Agrawal 03c41ec940
Add a testing-internal module and functionality to SuppressLogger for… (#4130)
* Improve behavior of some tests (#4123)

* Optimize

* Fix logging.properties

* Clean
2022-02-01 16:04:39 +09:00
Anuraag Agrawal 3cabcc7e45
Improve behavior of some tests (#4123) 2022-01-26 08:17:21 -08:00
jack-berg 0ef60f8233
Use noop meter provider if no readers registered (#4120)
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2022-01-26 08:08:31 -08:00
jack-berg cb89401381
Add log attribute limits (#4085)
* Add log attribute limits

* Use pad left in test

* PR feedback, improve test coverage
2022-01-18 15:36:54 -06:00
Anuraag Agrawal 6ab88fbc00
Rename RecordEventsReadableSpan to SdkSpan (#4093)
* Rename RecordEventsReadableSpan to SdkSpan

* Moar
2022-01-18 10:56:50 +09:00
Eugene R 3518c98c45
Annotate AutoValue classes as Immutable (#3875)
* annotate AutoValue classes as Immutable

* Remove @Immutable on internal classes

Co-authored-by: jack-berg <jberg@newrelic.com>
2022-01-14 14:53:14 -06:00
jack-berg c887f2c51a
Drop deprecated InMemoryMetricExporter, InMemoryMetricReader (#4084) 2022-01-14 09:24:06 -06:00