Commit Graph

219 Commits

Author SHA1 Message Date
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
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 facbf4fb9e
Add default implementations for getInstrumentationScopeInfo methods (#4640) 2022-07-27 17:54:29 -05:00
jack-berg 659a7930bd
Move AttributesMap to :sdk:common (#4641) 2022-07-27 17:08:40 -05:00
Mohit Palriwal aa873a05be
Added a static method "drain" under JcTools with a generic consumer (#4582)
* Added a static method "drain" under JcTools with a generic consumer

* Rename spanT to T

* Update sdk/trace-shaded-deps/src/main/java/io/opentelemetry/sdk/trace/internal/JcTools.java

* Rename Test methods

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2022-07-08 15:30:35 +09:00
jack-berg 160b30a16a
Fix ConcurrencModificationException in BatchSpanProcessorTest (#4568) 2022-06-29 17:03:52 -05:00
jack-berg b7347f6577
Update dependencies (#4519)
* Update dependencies

* revert jqf-fuzz to 1.7
2022-06-09 20:41:40 -05:00
jack-berg 60cc5f452a
Merge otlp grpc trace and metric exporter into :exporters:otlp:all (#4494) 2022-05-27 10:12:45 -05:00
jack-berg e067223409
Convert tests to from :sdk:metrics-testing to :sdk:testing (#4444) 2022-05-09 09:34:09 -05:00
Lauri Tulmin 16be81aed8
Apply attribute limits to exception events (#4423) 2022-04-28 16:12:35 -05:00
wallezhang f36785f676
fix: fix BatchSpanProcessor with non-runtime exception (#4402)
* fix: fix BatchSpanProcessor worker thread is killed by non-runtime exception

* refactor: Propagate exception if fatal

* test: Add unit test for exporter throwing a non-runtime exception
2022-04-22 07:57:02 +09: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
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 59a6061dc5
Deprecate InstrumentationLibraryInfo (#4256)
* Deprecate InstrumentationLibraryInfo

* API diff
2022-03-14 14:45:10 -05: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
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 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
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
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
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
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 8d9a57d110
Refactor BatchLogProcessor, add MultiLogExporter, add NoopLogExporter, add LogExporter#flush() (#3955) 2021-12-09 08:40:08 +09: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
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 6933de18e5
Don't use global meter provider for trace export (#3901) 2021-11-19 15:06:22 +09:00
jack-berg efbc87b4df
Fix minor javadoc issues with the trace SDK (#3896) 2021-11-17 12:57:20 -08:00
Eugene R 90bd4afa21
remove redundant synchronization (#3855) 2021-11-11 19:35:46 +09:00
Anuraag Agrawal 3869ecf491
Remove final from methods on final class. (#3816) 2021-11-02 07:48:34 -07:00
jack-berg 9ad1d55779
Fix DelegatingSpanData#toString() typo (#3781) 2021-10-20 15:24:30 -07:00
Anuraag Agrawal 27c48f6ffe
Promote DelegatingSpanData out of incubator. (#3768)
* Promote DelegatingSpanData out of incubator.

* Not final equals
2021-10-20 12:48:56 +09:00
Anuraag Agrawal 5bc953ec68
Replace InMemoryMetricReader constructor with factory. (#3727)
* Replace InMemoryMetricReader constructor with factory.

* Update InMemoryMetricReader.java
2021-10-12 11:06:05 +09:00
Anuraag Agrawal 776b4f71d7
Replace :proto usage with published io.opentelemetry.proto (#3697) 2021-10-06 11:51:17 -07:00
Josh Suereth 70086cf014
MetricReader and Multi-export features (#3578)
* Start of multi-exporter codebase.

* Restore InMemoryExporter + fix javadocs.

* Quick javadoc fix

* Fix some javadoc build failures and missing things.

* Fix bug with autoconfigure

* Modify InMemoryMetricReader + register methods to allow for immutable SdkMeterProvider

- InMemoryMetricReader is now a factory + reader
- Hide register on SdkMeterProvider
- Update all tests to make sure things pass.

* Make metric-readers 'immutable' post-construction of SdkMeterProvider.   Update all code around registration of readers and autoconfigure.   Create new 'sdk noop' meter provider for when we have no readers configured.

* Fix integration test.

* Fix jmh benchmarks for trace.

* Fix jmh build.

* Fix broken in-memory exporter things, and Noop API issue.

* Migrate MetricReader.Factory to MetricReaderFactory.

* Rename PeriodMetricReader.Factory to PeriodicMetricReaderFactory.

* Apply suggestions from code review

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

* Minor cleanup of ColectionHandle.

* Fixes from review.

* Extract delta accumulation and add tests.

* Fragment the abstraction in SynchronousMetricStorage for better separation of responsibilities.

* Add tests (and minor optimisation) for delta metric storage.

* Add test for temporal metric storage.

* Update temporal metric storage to fix issue w/ async instruments.

* Migrate Async storage to use temporal metric storage (with better tests).

* Another fix from review.

* Remove start epoch nano parameter from storage constructors.

* Fixes from review.

* Migrate flush -> forceFlush as per review.

* Add test coverage for flush.

* Fixes from review.

* Fix public API breakage.

* Fixes from review.

* Fix threadsafe annotations

Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-09-30 22:22:09 +09:00
Anuraag Agrawal 534eeac73d
Add tests for illegal span limits (#3673) 2021-09-28 09:15:44 -07:00
Anuraag Agrawal f59087b183
Don't crash on null spans in BSP (#3664) 2021-09-27 08:23:23 -07:00
Anuraag Agrawal b70c114f51
Use concatenation instead of stringbuilder in RERS. (#3646) 2021-09-22 08:16:40 -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 9b9ef48b34
Add autoconfigure for span attribute value length limits (#3602)
* Rename SpanLimitsBuilder.setMaxAttributeLength to setMaxAttributeValueLength

* Add span attribute value length limits to autoconfigure

* Fix build
2021-09-10 14:01:33 -07:00
jack-berg 060e50ed5f
Add attribute length limits to SpanLimits. (#3551)
* Add attribute length limits to SpanLimits.

* Respond to PR feedback

* Respond to PR feedback

* Remove test utility function

* Rename method to getMaxAttributeValueLength
2021-09-10 09:49:55 +09:00
Trask Stalnaker 86eea94b76
Allow creating a SpanContext without validation for internal use (#3564)
* Avoid unnecessary calls to TraceId and SpanId.isValid()

* Alternative: move ImmutableSpanContext to internal package

* javadoc

* Only skip for safe IdGenerators

* Simplify

* Errorprone

* Add test and fix boolean logic

* Spotless

* Add test

* Revert toString test change
2021-08-31 11:09:19 -07:00
Anuraag Agrawal adbf811249
Only compute nanoTime once for a root span. (#3567)
* Only compute nanoTime once for a root span.

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/RecordEventsReadableSpan.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/RecordEventsReadableSpan.java

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

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-08-31 08:43:09 +09:00
jack-berg 58c16a9133
Add missing readmes and missing javadoc links (#3500) 2021-08-16 12:36:54 -07:00
Anuraag Agrawal 42da2da1cc
Fix some nullability in SDK. (#3474)
* Fix some nullabiity in SDK.

* Cleanup

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkTracer.java

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
2021-08-15 09:47:39 +09:00