Commit Graph

122 Commits

Author SHA1 Message Date
damian-les a7a70aa7c1
Update JavaDoc of SystemClock class (#5477)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2023-06-14 09:18:37 -05:00
jack-berg e637e5121a
Ensure correct compiled output and sources are included in multi version jar (#5487) 2023-06-02 10:34:42 -07:00
jason plumb 75b83db960
Create OtelVersion class at build time. (#5365)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2023-04-15 08:31:55 -05:00
jack-berg 06158ffc2d
Cleanup readmes (#5263) 2023-03-06 09:39:34 -06:00
jack-berg 8897dd4d5c
Revert removal final newline (#5133)
* Revert removal final newline

* Add to final newlin editorconfigoverride
2023-01-18 08:51:41 -06:00
dependabot[bot] 1e4a7be6be
Bump spotless-plugin-gradle from 6.12.1 to 6.13.0 (#5126)
* Bump spotless-plugin-gradle from 6.12.1 to 6.13.0

Bumps [spotless-plugin-gradle](https://github.com/diffplug/spotless) from 6.12.1 to 6.13.0.
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/gradle/6.12.1...plugin-gradle/6.13.0)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-plugin-gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2023-01-17 16:47:56 -06:00
dependabot[bot] 76f7a96029
Bump spotless-plugin-gradle from 6.12.0 to 6.12.1 (#5076)
* Bump spotless-plugin-gradle from 6.12.0 to 6.12.1

Bumps [spotless-plugin-gradle](https://github.com/diffplug/spotless) from 6.12.0 to 6.12.1.
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/gradle/6.12.0...gradle/6.12.1)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-plugin-gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix spotless

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2023-01-03 13:15:22 -06:00
jack-berg bd8b5650ac
Fix concurrent modification exception in ComponentRegistry (#4951)
* Fix concurrent modification exception in ComponentRegistry

* Reduce number of threads and iterations
2022-11-15 11:15:50 -06:00
jack-berg f8a4d81e24
Optimize log hot path (#4913)
* ComponentRegistry accepts name, version, schemaUrl instead of InstrumentationScopeInfo

* Fix comment
2022-11-08 17:05:00 -06:00
jack-berg 52c37d56da
Stop publishing opentelemetry-sdk-extension-resources artifact (#4828) 2022-10-31 12:25:36 -05:00
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