Commit Graph

762 Commits

Author SHA1 Message Date
Anuraag Agrawal dfb4a74ac5
Update errorprone (#4048) 2022-01-06 11:33:00 +09:00
jack-berg 318091a170
Expand GlobaOpenTelemetry and OpenTelemetry to include metric accessors (#4035) 2022-01-04 11:27:37 +09:00
jack-berg b88107a1e4
Use singletons in noop implementation, reduce visibility of internal classes (#4030) 2021-12-28 10:19:50 +09:00
Anuraag Agrawal 538af68ee6
Return an interface when registering metric callbacks. (#4022)
* Return an interface when registring metrics.

* Return type-specific

* untypo
2021-12-23 13:13:13 +09:00
Anuraag Agrawal 6e28c10c72
Remove ObservableMeasurement superinterface (#4023) 2021-12-22 13:47:47 +09:00
Anuraag Agrawal 8d6e5b87f1
Make behavior of private method more explicit. (#4017) 2021-12-22 10:01:09 +09:00
Anuraag Agrawal 10ed89ea4c
Remove deprecated methods from ObservableMeasurement (#4018)
* Remove deprecated methods from ObservableMeasurement

* Hack japi
2021-12-22 10:00:57 +09:00
Anuraag Agrawal d88b09cc0b
Reduce volatile reads in GlobalOpenTelemetry.get (#4009) 2021-12-21 11:49:15 +09:00
Anuraag Agrawal 1e9fb21c64
Remove deprecated metrics APIs (#3990) 2021-12-15 11:51:32 +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
jason plumb 51556cd67a
Move key/value validation from ImmutableBaggage to the W3CBaggagePropagator (#3871)
* move key/value validation from ImmutableBaggage to the W3CBaggagePropagator

* remove import

* enforcement parade

* let baggageToString() return String

* Nits

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-12-02 09:47:31 +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 55ff1dc533
Promote metrics API to stable (#3919)
* Add MeterProvider to OpenTelemetry API

* Spot

* Set

* Move NoopMeter to package private

* Merge metrics API code into API package

* Finish

* Fix / clean

* Drift

* Update extensions/noop-api/src/main/java/io/opentelemetry/extension/noopapi/NoopOpenTelemetry.java

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

* Spot

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-11-24 08:39:55 +09:00
Josh Suereth 19f6fa79f0
Take a pass at fixing metrics API javadoc issues/missing information. (#3874)
* Take a pass at fixing metrics API javadoc issues/missing information.

* Spotless fix.
2021-11-17 12:53:46 -08:00
Eugene R f24ee19d0b
decommission the deprecated Gradle archivesBaseName property (#3878) 2021-11-15 10:55:08 -08:00
Josh Suereth 3ee4936ea2
Fixes #3494 - Removes ofLongs/ofDoubles when the default is long/double for a builder. (#3873) 2021-11-14 12:05:07 -08:00
jack-berg 10d677b736
Cleanup metric deprecations (#3869) 2021-11-12 16:42:57 -08:00
jack-berg 8d96cb892b
Deprecate MeterProvider#get(..) methods (#3812)
* Deprecate MeterProvider#get(..) methods

* Retain MeterProvider#get(String instrumentationName)
2021-11-05 09:05:30 +09:00
jack-berg 5f259ee4ee
Add remove method to AttributesBuilder (#3771)
* Add remove method to AttributesBuilder

* Improve test coverage

* Remove attributes by nulling out instead of removing from list

* feedback wip

* Add AttributesBuilder#remove(String) method

* Add removeIf() method

* AbstractFixedSizeExemplarReservoir uses more efficient removeIf() attribute filter
2021-10-28 08:47:50 +09:00
Anuraag Agrawal 1e073fcff2
Add an auto-configuration builder. (#3753)
* Add an auto-configuration builder.

* Test

* Builder

* More

* Revamp

* Customizer only customizes

* Pass config to customizers

* More specific name

* Cleanup

* Cleanup

* SPI test

* Clean

* Clean

* Clean

* Shutdown once instead of flush and shutdown for simple

* Clean

* Cleanups

* Cleanup
2021-10-28 08:41:14 +09:00
jack-berg c4c2e6c9db
Align SdkMeterProvider with SdkTracerProvider (#3792)
* Align SdkMeterProvider with SdkTracerProvider

* Use noop meter provider when metric exporter is none
2021-10-27 10:03:08 -07:00
John Watson 69d26c12fd
Properly encode baggage values and metadata (#3740)
* URL encode & decode baggage values
Resolves #3442

* Vendor in the guava url escaping code, and use it, rather than URLEncoder

* add fuzz testing for the escaper and propagator

* formatting

* Remove strict value validation from the baggage implementation
And, ensure we encode baggage metadata as well as the baggage value.

* Add additional fuzz iterations, manually.

* remove the usage of the vintage engine and use driver test methods instead
2021-10-14 08:10:28 -07:00
Anuraag Agrawal 5320f208cb
Fix nullness in trace-propagators (#3656) 2021-09-24 09:15:04 -07:00
Anuraag Agrawal b311d50d03
Fix some nullness. (#3647)
* Fix some nullness.

* Log
2021-09-22 09:00:57 -07:00
Anuraag Agrawal ece161f6e0
Preencode attribute keys into utf8 bytes. (#3576)
* Use constants for AttributeKeys in JMH

* Preencode attribute keys into utf8 bytes.

* Spot

* Ignore

* Be lazy

* Boil
2021-09-10 10:35:26 +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 9e73bfe9e5
Remove branches from isValidBase16 (#3566) 2021-08-31 08:57:35 +09:00
Trask Stalnaker e2564eb95e
Cache AttributeKey hashCode (#3563)
* Cache AttributeKey hashCode

* Don't call instance method from constructor
2021-08-30 16:15:15 -07:00
Anuraag Agrawal 6ef3091cfb
Copy in spotless-conventions from instrumentation repo (#3554)
* Copy in spotless-conventions from instrumentation repo.

* Reformat

* A few more dotfiles
2021-08-27 08:28:31 -07:00
John Watson 4b4f0167ed
Optimize 1 & 2 element attributes creation (#3502)
* optimize the single-attribute creation flow to avoid unneeded allocations

* Optimize the implementations of 1 and 2 element Attributes instances.

* Refactor to *actually* save allocations and fix a couple of bugs.
2021-08-18 16:14:32 -07:00
Anuraag Agrawal 87f2b5e0a8
Update error-prone (#3485) 2021-08-13 09:44:29 -07:00
Anuraag Agrawal 182455023a
Update nullaway and add a Contract for StringUtils. (#3432)
* Update nullaway and add a Contract for StringUtils.

* RUNTIME

* SOURCE

* Cleanup
2021-08-12 14:50:39 +09:00
Christian Neumüller dd7cae97d5
Fix OpenTelemetrySdk(.tracerProvider).tracerBuilder() being noop. (#3466)
* Add test for obfuscated tracerBuilder.

* Fix bug, add more tests.
2021-08-11 09:02:09 -07:00
Josh Suereth 0ef19291c2
Swap old Metrics API for currently specified Metrics API (#3423)
* Update the API to the latest SDK specification.

* API updates to other sdk areas.

* First half of SDK updates for API.

Passing off to other cmoputer.

* Get SDK compiling again.

* Get tests compiling again (and failing).

* Fix bad copy-paste error.

* Get all SDK tests passing.

* More fixes to builds across SDK impls.

* Remove unecessary publics

* more fixes for new API.

* spotless fixes.

* Make tests for metric points order independent.

* Restore readme.

* Fix readmes.

* Add noop meter provider tests for code coverage.

* Add code coverage for assertion library.

* Fix wierd test failure that gradle cache is preventing me from seeing locally.

* Fix javadoc/spelling comments from review.

* Remove marker interfaces.

* Switch from atomic ref to volatile.

* Fixes from review.

* Apply suggestions from code review

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

* Fixes from review.

* Fixes from review.

* Update OTLP HTTP exporter to use new metrics api

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-08-05 13:58:49 -07:00
Trask Stalnaker 60c3c5ca0c
Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09:00
Anuraag Agrawal ce9c8854c7
Extract publishing and animalsniffer plugins. (#3334) 2021-06-22 08:23:16 +09: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
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 d6849219a7
Use constant for baggage validation bitsets (#3274)
* Use constant for baggage validation bitsets

* Spot

* Move to element

* private
2021-06-03 17:26:00 -07:00
Anuraag Agrawal d044890a7c
Don't create Supplier when decoding byte (#3273) 2021-06-04 08:31:40 +09:00
Nikita Salnikov-Tarnovski ff85102a46
Remove unnecessary string allocation on hot path (#3272) 2021-06-03 08:57:16 +09:00
Valeriy 34494e609b
javadocs: fix code examples (#3269)
Problem:
Javadocs comments at Tracer interface contains call of unexistent method OpenTelemetry.getTracer()

Solution:
Replace OpenTelemetry.getTracer() with openTelemetry.getTracer(String, String) in examples at javadocs
2021-06-01 12:58:59 -07:00
Anuraag Agrawal 1bfc7871bd
Add doc for AttributesBuider accident. (#3265) 2021-05-30 08:22:12 -07:00
Anuraag Agrawal cb77a8d364
Move TemporaryBuffers to internal and use it everywhere. (#3226)
* Move TemporaryBuffers to internal and use it everywhere.

* blurb
2021-05-13 11:18:50 +09:00
Anuraag Agrawal 672330bf51
Upgrade to Gradle 7.0 (#3228) 2021-05-13 08:21:22 +09:00
Jakub Wach ad6ceccc4c
baggage parsing improvements (#3180)
* baggage parsing improvements

* added JMH benchmark for W3C baggage propagator

* clean-up

* removed old implementation code

* post-review changes
2021-05-12 09:41:21 -07:00
Anuraag Agrawal 77f0b0adc4
Allow enabling nullaway and fix some nullness issues (#3218)
* Add support for enabling nullaway and fix a couple of projects.

* Finish

* Finish

* Cleanup
2021-05-12 08:43:32 +09:00