Commit Graph

857 Commits

Author SHA1 Message Date
Anuraag Agrawal f13fe7961d
Allow forceFlush of IntervalMetricReader, globally too for autoconfigure / agent. (#3385) 2021-07-09 22:46:40 +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 1196e836b9
Remock shutdown after reset. (#3382) 2021-07-09 12:03:48 +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 d7e8651767
Add vararg hasEvents assertion (#3377)
* Add vararg hasEvents assertion

* Test
2021-07-09 10:01:49 +09:00
Anuraag Agrawal b5d202a08c
Add hasAttributes which takes a list of entries. (#3378) 2021-07-09 08:06:50 +09:00
Anuraag Agrawal e3bcc8b2a1
Different pattern for embedding shaded dependency. (#3371) 2021-07-08 08:52:46 -07:00
Josh Suereth b12a57ed21
Migrate Metrics SDK "data' package to Attributes (#3352)
* Update java metrics data model and create assertion based testing library.

* Update existing SDK for Label => Attribute in data model

- Finish wiring through changes to all code/tests.
- DOES NOT touch API
- Update existing tests to use new testing library to be sensitive to attribute vs. label hashing alterations + equality of the metrics.data package types.

* Fix javadoc breakages

* Fix JMH compile

* Finish javadoc

* Fixes from review

* Remove botched file.

* Fixes from review.
2021-07-01 09:15:44 -07:00
brunomed 535b5b9eff
BatchSpanProcessor falls back to ArrayBlockingQueue if `jdk.unsupported` is not available (#3340)
* rename JcTools' newMpscArrayQueue to newFixedSizeQueue

* falls back to ArrayBlockingQueue if `jdk.unsupported` is not available
2021-06-24 08:21:52 +09: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 864508983e
Extract JMH conventions plugin. (#3324) 2021-06-17 08:37:49 -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
Anuraag Agrawal 1443da140a
Reorder methods on SpanData for better AutoValue toString (#3312) 2021-06-15 08:28:26 +09:00
Christian Neumüller 7be6d242a8
Use Context.root() to simplify logic. (#3314) 2021-06-15 08:25:19 +09: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
Anuraag Agrawal 7ecb2e260e
Only check one part of trace ID is valid since it guarantees a value … (#3291)
* Only check one part of trace ID is valid since it guarantees a value full ID.

* Valid 64-bit IDs.
2021-06-10 21:47:36 +09:00
Anuraag Agrawal 0a9e77f751
Small tweak to name of internal method. (#3292)
* Small tweak to name of internal method.

* Apply
2021-06-08 17:00:55 +09:00
Anuraag Agrawal 4a691cf567
Use switch instead of enummap for status creation (#3290)
* Use switch instead of enummap for status creation

* Combine tests
2021-06-08 16:49:48 +09:00
Anuraag Agrawal cf1fa9f9fe
Fix drift in SpanLimits comments. (#3293)
* Fix drift in SpanLimits comments.

* Nope
2021-06-08 16:38:54 +09:00
Anuraag Agrawal d191424379
Copy simplespanprocessor warning to factory method too and scope it down to logging. (#3289) 2021-06-07 08:31:27 -07:00
Anuraag Agrawal 37cd112e9d
Don't use AutoValue for TraceIdRatio sampler (#3275) 2021-06-03 08:01:00 -07:00
Nikita Salnikov-Tarnovski e86680cd13
Update otel.yaml (#3270) 2021-05-31 09:00:51 -07:00
Anuraag Agrawal 782e38fe6e
Remove unneeded forEach from AttributesMap. (#3266) 2021-05-30 08:21:33 -07:00
John Watson ed99ea357f
Fix the SpanPipelineBenchmark so that it runs. (#3264)
* Fix the SpanPipelineBenchmark so that it runs.
I also updated it to create 100 spans, rather than just a single span, so we can amortize the cost of the Resource, etc.

* Be sure to flush the SDK.

* formatting
2021-05-30 11:44:45 +09:00
Nikita Salnikov-Tarnovski ae3860e069
Add benchmark for recording exception on a span (#3262)
* Add benchmark for recording exception on a span

* Spotless
2021-05-27 11:20:41 -07:00
John Watson 5b4763321e
Implement handling the OTEL_SERVICE_NAME env var. (#3253)
* Implement handling the OTEL_SERVICE_NAME env var.

* Update to use the semconv module and attributes testing helpers.

* add unit tests for testing API additions
2021-05-27 09:55:26 -07:00
Nikita Salnikov-Tarnovski fc4b154dcb
Add a benchmark comparing OTLP and Jaeger exporter (#3261)
* Add a benchmark comparing OTLP and Jaeger exporter

* Spotless
2021-05-27 08:12:49 -07:00
Anuraag Agrawal 608f431479
Remove null checks from SdkSpanBuilder (#3244) 2021-05-21 13:45:26 -07:00
Anuraag Agrawal 672330bf51
Upgrade to Gradle 7.0 (#3228) 2021-05-13 08:21:22 +09:00
John Watson f396965196
Add @since tags for new public methods. (#3209)
* Add @since tags for new public methods.

* remove errant since tags
2021-05-07 08:26:55 +09:00
John Watson 15a1160e56
clean up the package-level docs for the sdk trace export package. (#3208)
Resolves #2903
2021-05-07 08:15:41 +09:00
John Watson 7c9ea8b0f6
default the tracer name to an empty string (#3170) 2021-04-28 10:24:17 -07:00
HaloFour 7d31cddf19
Add Span#setAllAttributes method to add Attributes to a Span (#2799) 2021-04-27 14:41:26 -07:00
John Watson f5c1e0d799
Auto-detect Android and use an Android-friendly IdGenerator instance. (#3176)
* Auto-detect Android and use an Android-friendly IdGenerator instance.

* simplify the random initialization

* Make the AndroidFriendlyRandomIdGenerator even simpler by just keeping a single Random instance
2021-04-27 15:37:02 +09:00
John Watson 7e2c34a18f
Make the ViewRegistry immutable and remove the mutating deprecated method. (#3149)
* remove a method deprecated in 1.1.0

* Make the ViewRegistry immutable.

* set all the defaults view config via loop, rather than explicitly per instrument type.
2021-04-20 10:10:40 -07:00
jack-berg 620ae4caf6
Add full delta support for sum aggregator (#3161)
* Add full support for delta temporality for sum aggregator.

* Respond to PR feedback.
2021-04-20 09:00:30 -07:00
Harshita Srinivas 4bb99964c1
Updated TestClientServer timer execution in Java8 (#3159)
* fixed timer execution in Java 8

* spotless apply

* Updated ClientServer

* Optimised ClientServer timer execution
2021-04-16 13:09:31 +09:00
Jakub Wach 2f3cdb926c
SDK arch test - ensuring that API implmenetation returns only API types (#3146)
* SDK arch test - ensuring that API implmenetation returns only API types

* added metrics verification

* updated tests to match change in SDK / meter return type

* typo corrected

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

* typo corrected

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-04-13 21:11:16 +09:00
John Watson 9a330d03e7
Make the test extensions defensively reset the GlobalOpenTelemetry instance before setting. (#3110) 2021-04-07 09:12:41 +09:00
John Watson a110376698
Add a since tag to the ResourceBuilder (#3109) 2021-04-06 09:31:25 +09:00
Anuraag Agrawal c4f612ee5e
Update dependencies (#3105) 2021-04-05 08:49:05 -07: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
jack-berg 415ed22ec4
Add autoconfiguration SdkMeterProviderConfigurer SPI. (#3060) (#3079) 2021-04-02 07:59:46 -07:00
John Watson 0f875790f7
Revert "Revert "Fix bug where AsynchronousInstrumentAccumulator does not call configured LabelProcessorFactory. (#3085) (#3086)" (#3088)" (#3093)
This reverts commit 6930f7239c.
2021-04-02 11:00:57 +09:00
John Watson 6930f7239c
Revert "Fix bug where AsynchronousInstrumentAccumulator does not call configured LabelProcessorFactory. (#3085) (#3086)" (#3088)
This reverts commit 853a51f7
2021-04-01 11:40:57 -07:00
jack-berg 853a51f7d3
Fix bug where AsynchronousInstrumentAccumulator does not call configured LabelProcessorFactory. (#3085) (#3086) 2021-04-01 07:58: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