Commit Graph

112 Commits

Author SHA1 Message Date
jack-berg eec0225e37
Changelog 1.18.0 (#4737)
* Add since annotations

* Prepare changelog for 1.17.0 release

* Spotless

* PR feedback

* Spotless
2022-09-09 13:44:23 -05:00
jack-berg 2bc88f45c6
Deprecate multi argument InstrumentationScopeInfo create method (#4710)
* Deprecate multi argument InstrumentationScopeInfo create method

* PR feedback
2022-08-24 13:35:31 -05:00
jason plumb 3a802305dc
return early if merging empty resource (#4713) 2022-08-23 12:38:25 -05:00
jack-berg d0c6cd4480
Extend InstrumentationScopeInfo with scope attributes (#4696)
* Extend InstrumentationScopeInfo with scope attributes

* Add InstrumentationScopeInfoBuilder
2022-08-22 12:26:54 -05:00
jack-berg 659a7930bd
Move AttributesMap to :sdk:common (#4641) 2022-07-27 17:08:40 -05: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 59a6061dc5
Deprecate InstrumentationLibraryInfo (#4256)
* Deprecate InstrumentationLibraryInfo

* API diff
2022-03-14 14:45:10 -05: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
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
Beppe Catanese e8d1c2d838
Copy schema URL during Resource.toBuilder (#4209) 2022-02-24 09:06:29 +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
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
jack-berg 7c9234e1ae
Add missing internal disclaimers (#4086) 2022-01-13 14:00:12 -08: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
Anuraag Agrawal dfb4a74ac5
Update errorprone (#4048) 2022-01-06 11:33:00 +09:00
Anuraag Agrawal 8e04fbf0b8
Migrate most testsets to test suites. (#3953) 2021-12-07 08:37:15 +09:00
Anuraag Agrawal e56e8ef018
Use PrimitiveLongList in ExponentialHistogramBuckets (#3947)
* Use PrimitiveLongList in ExponentialHistogramData

* Missing test
2021-12-03 18:12:10 -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
Anuraag Agrawal 7627c8b372
Fix flaky ThrottlingLogger test (#3916) 2021-11-19 20:47:52 +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 e4ea3ab673
avoid redundant allocation of `DefaultThreadFactory` on a `newThread` call (#3836) 2021-11-09 10:19:50 +09:00
Anuraag Agrawal b7e469f861
Test ResourceBuilder with null inputs (#3672) 2021-09-28 09:16:52 -07:00
Josh Suereth e6424654b2
Implementations of Exemplar Reservoirs (#3592)
* Initial implementation of simple ExemplarReservoirs

- Add an implementation of naive fixed-bucket reservoir sampling
- Add an implementation of FixedSizeHistogram reservoir sampling where latest-measurement per-histogram-bucket is kept.
- Add assertions for exemplars.

* Remove explicit locks for mild performance boost.

* Create a new random holder abstraction.

- Create new random holder abstraction that allows
  - ThreadLocalRandom when efficient
  - simple detection of Android + workaround for TLR
  - Overridable with mocked random for testing.
- Update tracing RandomIdGenerator to leverage new RnadomHolder
- Expand exemplar reservoir tests to use new random holder
- Remove android-only random id generator test

* Add api diff + fix silly naming thing.

* Move random hodler to be Supplier, other updates from code review.

* Fixes from review.

* Fix bytebuddy issue with mocking.

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/exemplar/AbstractFixedSizeExemplarReservoir.java

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

* Fix name from review.

* Update sdk/common/src/main/java/io/opentelemetry/sdk/internal/RandomSupplier.java

Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-09-17 13:20:06 +09:00
jack-berg 4a945e63e3
Add gradle ktlint spotless config to all projects (#3543) 2021-08-25 08:36:17 +09:00
jack-berg 58c16a9133
Add missing readmes and missing javadoc links (#3500) 2021-08-16 12:36:54 -07:00
Anuraag Agrawal 1a881a6946
Fix nullness in Resource (low priority). (#3472) 2021-08-14 14:12:02 +09:00
Anuraag Agrawal 2844471335
Fix Resource version properties lookup and extract version file gener… (#3467)
* Fix Resource version properties lookup and extract version file generation.

* Only published

* Cleanup

* Better merge

* Fix merge
2021-08-12 10:15:51 -07:00
Anuraag Agrawal f83ab58317
Fix Nullable of Resource.getAttribute (high priority) (#3473)
* Fix Nullable of Resource.getAttribute

* API
2021-08-12 08:25:19 -07:00
jason plumb cb5198ba99
encapsulate Resource.getAttribute() to help with some law of Demeter violations. (#3468) 2021-08-12 09:06:31 +09:00
Trask Stalnaker 60c3c5ca0c
Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09:00
Anuraag Agrawal 25a053cc54
Make MonotonicClock not implement Clock and move to package private. (#3372)
* Make MonotonicClock not implement Clock and move to package private.

* Anchored

* Remove nanoTime

* Not really milliseconds now adays
2021-07-09 12:29:00 +09:00
Anuraag Agrawal f90040579e
Allow users to access the default Clock and TestClock (#3363)
* Allow users to access the default Clock and TestClock

* Update TestClock API

* Doc

* Fix

* html

* Less newlines

* Update sdk/common/src/main/java/io/opentelemetry/sdk/common/Clock.java

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

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-07-09 11:26:55 +09:00
John Watson 6449a84ce4
Updates for the CHANGELOG as of July 8, 2021 (#3332)
* Updates for the CHANGELOG as of Jun 18, 2021
Also added a couple of missing @since tags.

* update as of July 8
2021-07-08 18:21:15 -07:00
Anuraag Agrawal ce9c8854c7
Extract publishing and animalsniffer plugins. (#3334) 2021-06-22 08:23:16 +09:00
John Watson df1f47d929
Add the OpenTelemetry schema URL to the Resource. (#3319)
* Add the OpenTelemetry schema URL to the Resource.

* A few cleanups from PR review.
2021-06-18 08:52:56 -07:00
Anuraag Agrawal 7f544416e4
Define an extension for otel-specific configuration of Java. (#3317) 2021-06-17 15:54:25 +09:00
Anuraag Agrawal b9ca09b6c1
Extract java conventions plugin. (#3316) 2021-06-15 12:29:47 -07:00
John Watson ca92a9ab03
Introduce usage of the OpenTelemetry schema with a Tracer/MeterBuilder (#3309)
* Add the OpenTelemetry schema URL to the InstrumentationLibraryInfo and the corresponding API calls.

* small refactoring and doc tweaks from feedback

* make the instrumentation version nullable on the method that takes a schema

* update the apidiffs

* add since tags and a few more missing nullable annotations

* Switch to using a Builder rather than method overloads.
2021-06-11 20:50:23 -07:00
John Watson a110376698
Add a since tag to the ResourceBuilder (#3109) 2021-04-06 09:31:25 +09:00
John Watson e52969d94c
Update the CHANGELOG as of APR-02-2021 and add @since tags for new APIs. (#3098) 2021-04-05 07:49:38 -07:00
John Watson 5c18578538
Introduce a ThrottlingLogger wrapper and use for error logging in exporters (#3051)
* initial implementation of logging throttling

* simplify the throttle and incorporate into all the exporters

* small cleanup

* try the ratelimiter and see if it can work

* try the ratelimiter and see if it can work

* re-implement the ThrottlingLogger using the RateLimiter from Jaeger.

* code cleanup & additional tests

* add a unit test for the log level check

* Update sdk/common/src/main/java/io/opentelemetry/sdk/internal/ThrottlingLogger.java

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

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-03-31 20:36:02 -07:00
Piotr Glazar 1a9c9096a9
Resource.Builder for convenient work with Resource class (#3065)
* Resource.Builder for convenient work with Resource class

* Remove unused import

* Adding javadoc comment

* Spotless fix

* Code review fixes

* Adding Javadoc

* Call Resource.create instead of AutoValue
2021-03-31 15:53:33 +09:00
Anuraag Agrawal edf08d7bc1
Have SimpleSpanProcessor keep track of pending exports and wait for t… (#2989)
* Have SimpleSpanProcessor keep track of pending exports and wait for them when flushed.

* Fix CompletableResultCode.ofAll(empty)

* Cleanup
2021-03-07 09:02:45 -08:00
Anuraag Agrawal f553aa0a6b
Add an internal GuardedBy annotation to enable our own error prone ch… (#2978)
* Add an internal GuardedBy annotation to enable our own error prone checker without affecting downstream.

* Method
2021-03-05 11:37:24 +09:00
Anuraag Agrawal a33a4ed036
Don't fail on timeout / interrupted since the result isn't really don… (#2957)
* Don't fail on timeout / interrupted since the result isn't really done yet.

* Fix test

* warning
2021-03-03 13:48:51 -08:00
Bogdan Drutu 75ea07e597
Fix more api dependencies which should be implementation (#2919)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-23 12:20:06 -08:00
Anuraag Agrawal 6710f099e7
Delete old ResourceProvider class (#2895) 2021-02-19 14:05:20 +09:00
Anuraag Agrawal 0730a9e79c
[Breaking Change] Move ResourceProvider SPI to autoconfigure module (#2837)
* autoconfigure

* Finish

* Refactor

* Fix OsResource to use empty

* Fix BeanstalkResource to use empty

* Fix ResourceTest to use empty

* Fix Ec2Resource to use empty

* Fix EcsResource to use empty

* Fix ProcessRuntimeResource to use empty

* Fix ProcessRuntimeResource to use empty

* Fix EksResource to use empty

* Fix LambdaResource to use empty

* Fix ProcessResource to use empty

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Bogdan Drutu <lazy@splunk.com>
2021-02-17 12:41:07 -08:00
Bogdan Drutu 94b37ebfd6
Mark public class TestClock as final (#2856)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-17 12:40:48 -08:00