Commit Graph

1071 Commits

Author SHA1 Message Date
jack-berg e7d5a97f88
OTLP metric exporter accepts aggregation temporality function (#4340)
* OTLP metric exporter accepts aggregation temporality function

* Spotless
2022-04-08 07:54:04 -05:00
Anuraag Agrawal d78cadabaa
Update errorprone (#4346) 2022-04-08 08:12:57 +09:00
jack-berg 0b94400914
Another round of log suppression (#4342)
* Another round of log suppression

* Suppress logs from HttpServerPipelineConfigurator
2022-04-07 11:00:42 -05:00
jack-berg 6692683917
Disallow aggregations for incompatible instruments (#4338)
* Disallow aggregations for incompatible instruments

* Improve test coverage

* Ignore View if aggregation is incompatible, using default view if no others are configured
2022-04-07 10:55:58 -05:00
jack-berg a895d7e33c
Add min and max to HistogramPointData (#4317)
* Add min and max to HistogramPointData

* Add hasMin, hasMax to HistogramPointData instead of @Nullable

* Add javadoc about describing behavior when hasMin / hasMax is false

* Get rid of @Nullable on HistogramAccumulation
2022-04-06 10:41:52 -05:00
jack-berg 8ab4d0aa9c
Remove instrument selector predicates, add instrument name wildcards (#4331)
* Remove instrument selector predicates, add instrument name wildcards

* Cache name pattern to regex translation

* Use alternative glob match algo, get rid of cache
2022-04-06 09:54:43 -05:00
jack-berg ddca7f34ba
Ensure callbacks are not called concurrently (#4328)
* Ensure callbacks are not called concurrently

* Disallow concurrent collections by single reader, disallow concurrent callback invocations by different readers

* Restore lock on CallbackRegistration

* Single lock on MeterSharedState ensures all collections are sequential
2022-04-06 09:53:23 -05:00
jack-berg 423e1a2c54
Refactor MetricReader registration (#4320) 2022-03-31 10:13:17 -05:00
jack-berg 725ce32db3
Make setMinimumCollectionInterval package private (#4310)
* Make setMinimumCollectionInterval package private, centralize experimental utilities

* Default minimum collection interval to zero
2022-03-31 09:49:53 -05:00
HaloFour 6bc06f86ca
Add ExceptionEventData which wraps events that contain exceptions (#4162)
* Add ExceptionEventData which wraps events that contain exceptions

* checkstyle

* Keep it simple

* Refactor ExceptionEventData to tracing-incubator

* Clean up reflection code, defer and memoize merged attributes

* Move ExceptionEventData back to :sdk:trace under internal package

* Address PR comments

* Add internal package-info

* Add internal package verbiage to ExceptionEventData interface

* Kick CI
2022-03-31 11:46:21 +09:00
jack-berg 7fe1783e10
PMR don't export if metrics collection is empty (#4315)
* PMR don't export if metrics collection is empty

* Set export available

* Use isEmpty() instead of size() == 0

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

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2022-03-29 08:15:48 -05:00
jack-berg e375bfdde1
Drop deprecations in metrics sdk (#4301)
* Drop deprecations in metrics sdk

* Retain OtlpGrpcMetricExporterBuilder#setChannel()
2022-03-28 11:30:31 -05:00
jack-berg 80c05a71a3
Fix bad merge (#4309) 2022-03-26 17:30:06 +09:00
jack-berg 647ff0db3c
Throw exception if selection criteria selects nothing (#4300) 2022-03-25 10:04:34 -05:00
jack-berg 1b7ec8a235
Invoke callbacks once when multiple views are registered (#4296) 2022-03-25 10:03:48 -05:00
jack-berg 12fc4b2dda
Drop HistogramPointData utility methods (#4303) 2022-03-25 10:03:05 -05:00
jack-berg 21a61e5894
Change MetricExporter getPreferredTemporality to accept InstrumentType (#4288) 2022-03-24 11:25:50 -05:00
jack-berg c4ea1c155e
Refactor view API, make AttributesProcessor internal (#4277)
* Switch View and ViewBuilder to classes

* Make AttributesProcessor an empty interface, move content to AbstractAttributesProcessor

* Drop io.opentelemetry.sdk.metrics.view package
2022-03-23 11:01:54 -05:00
jack-berg 322097ad4b
Hide exemplars (#4276)
* Make exemplar package internal

* Add method to reflectively set exemplar filter on SdkMeterProvderBuilder
2022-03-22 10:39:37 -05:00
jack-berg 2c695a34f8
Simplify MetricReader (#4268)
* Simplify MetricReader

* Tighten up PR

* Restore some methods / classes and deprecate

* Revert "Restore some methods / classes and deprecate"

This reverts commit fee90e5da7.
2022-03-22 10:10:15 -05:00
Gregor Zeitlinger b717b0625a
Add SpanDataAssert.hasAttribute (#4271)
* add assertAttributes to be able to assert a single attribute in a fluent way

* add assertAttributes to be able to assert a single attribute in a fluent way

* Update sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/SpanDataAssert.java

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>

* Update sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/SpanDataAssert.java

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2022-03-22 15:56:59 +09:00
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