Commit Graph

135 Commits

Author SHA1 Message Date
Anuraag Agrawal 5fb1189b98
Add int overload for equalTo attribute assertion (#4249) 2022-03-09 08:23:34 +09:00
Anuraag Agrawal d2fbcbadb2
API diffs for 1.12.0 (#4237) 2022-03-07 11:44:05 +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
jack-berg 9f10e0048e
Allow multiple async callbacks, allow callbacks to be removed (#4143)
* Allow multiple async callbacks, allow callbacks to be removed

* Use AutoCloseable to remove callbacks, don't unregister from MetricStorageRegistry

* Use CopyOnWriteArrayList

* PR feedback

* PR feedback
2022-02-25 11:51:51 -06: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 242f509dd1
Add ability to do loose attribute matching while checking all keys. (#4173)
* Add ability to do loose attribute matching while checking all keys.

* equalTo

* Support absent keys
2022-02-22 12:15:17 +09:00
Anuraag Agrawal cffbd3249c
Add context wrapping methods for arguments found in CompletableFuture APIs. (#4154) 2022-02-10 08:09:36 +09:00
jack-berg 562153dc7f
Update docs for 1.11.0 release (#4152)
* Update changelog

* Update version in docs

* Add OTLP log exporter component to readme table

* Update japicmp

* Add note to create discussion to release docs
2022-02-04 16:25:56 -08:00
jack-berg eb92539f94
Logs customizer (#4148) 2022-02-04 10:11:56 -06:00
jack-berg 4392f52e1c
Metrics customizer (#4127)
* Use noop meter provider if no readers registered

* Extend AutoConfigurationCustomizer with metrics customizers

* Switch from inline to instance level mocks

* Deprecate SdkMeterProviderConfigurer
2022-02-03 12:26:04 -06:00
Anuraag Agrawal 3a9b44832d
Deprecate gRPC setChannel (#4116) 2022-01-26 08:13:43 -08:00
Pavol Loffay 5d521f5c21
Switch Jaeger remote sampler to use grpc lite (#4043)
* Switch Jaeger remote sampler to gRPC lite

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Abstract impl

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Service done

* Working example

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Handle gzip compression

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Clean dependencies

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Remove dependency on proto

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* remove stdout

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Fix

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Fix logger

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* jcmpAPI failing

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Fix

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Fix

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Fix

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Switch logger

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Fix

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Support grpc netty too

* NPE test

* update after merge main

* Switch Jaeger remote sampler to gRPC lite

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* test

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* test

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* test

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* test

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* test

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* test

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* some tests

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* some tests

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* tls test

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* tls for default

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Workaround logger reference issue

* Use a better logger workaround

* Wait for two polls since first poll may not have been processed by client in time for assertion.

* Don't depend on poll count for assertions.

* shutdownNow

* Cleanups

* Update logunit

* Don't stop at body read failure

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2022-01-19 12:26:47 +09:00
John Watson d5b66595d2
Reset the api diffs for the current workstream (#4078) 2022-01-12 09:12:32 +09:00
Anuraag Agrawal 89a6ff24cb
Update docs for 1.10.0 (#4068)
* Update docs for 1.10.0

* Revert hack

* Update CHANGELOG.md

* Update README.md

Co-authored-by: John Watson <jkwatson@gmail.com>
2022-01-10 18:34:08 -08:00
Roberto Cortez 07a2d2eb28
Customizer for SdkTracerProviderBuilder (#4004) 2022-01-08 11:18:38 +09:00
Kyle Tully edbe46a9f7
Expose setTrustedCertificates in JaegerGrpcSpanExporterBuilder for mTLS Support (#4061)
* adding setTrustedCertificates to JaegerGrpcSpanExporterBuilder for mTLS support

* fixing formatting error

* added setTrustedCertificates to JaegerGrpcSpanExporterBuilder

* added validConfig test for setTrustedCertificates mTLS support

* removing unnecessary comments
2022-01-07 13:46:24 +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
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 905c1ffa4f
Update Gradle and build dependencies. (#4026) 2021-12-23 07:56:05 -08: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 10ed89ea4c
Remove deprecated methods from ObservableMeasurement (#4018)
* Remove deprecated methods from ObservableMeasurement

* Hack japi
2021-12-22 10:00:57 +09:00
Anuraag Agrawal 1e9fb21c64
Remove deprecated metrics APIs (#3990) 2021-12-15 11:51:32 +09:00
jack-berg 8d9a57d110
Refactor BatchLogProcessor, add MultiLogExporter, add NoopLogExporter, add LogExporter#flush() (#3955) 2021-12-09 08:40:08 +09:00
jack-berg 53030b7266
Configurable temporality (#3960)
* Allow configuration of preferred temporality in LoggingMetricExporter and OtlpJsonLoggingMetricExporter

* Make InMemoryMetricReader preferred temporality configurable

* Add create() methods to LoggingSpanExporter, LoggingMetricExporter, and SystemOutLogExporter, deprecate public constructors
2021-12-08 13:58:59 +09:00
Anuraag Agrawal b1651a18cf
Rename .observe to .record (#3949)
* Rename .observe to .record

* Apply deprecation
2021-12-03 08:37:22 +09:00
John Watson 3a176de814
Update the docs and the examples for v1.9.1 (#3934)
* Update the docs for the 1.9.1 patch release

* update the website docs & example versions
2021-11-25 10:20:14 +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
Anuraag Agrawal 6933de18e5
Don't use global meter provider for trace export (#3901) 2021-11-19 15:06:22 +09:00
Anuraag Agrawal 0ede1316bc
Add apidiffs for 1.9 (#3877) 2021-11-15 10:26:50 -08:00
Anuraag Agrawal 98dec9e290
Update docs for 1.9.0 release (#3866) 2021-11-12 09:14:16 -08:00
John Watson 4a84547af5
update the docs for 1.7.1 (#3824)
* update the docs for 1.7.1

* tweak the message
2021-11-04 08:58:37 +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
Anuraag Agrawal 6623323491
Use same pattern of compileOnly SDK dependencies in exporter-common (#3776) 2021-10-20 10:54:49 -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
John Watson 9cd3f2f79b
Add a log exporter that outputs to standard out. (#3748)
* Add a log exporter that outputs to standard out.

* add a unit test for the format

* bump up the coverage

* renames and formatting tweaks from review
2021-10-15 11:00:53 -07:00
jack-berg 2241ae6eec
Add SimpleLogProcessor (#3749) 2021-10-15 08:20:05 -07:00
John Watson a8a27f4d01
Update the docs for the 1.7.0 release. (#3715)
* Update the docs for the 1.7.0 release.

* formatting
2021-10-08 14:28:43 -07:00
Anuraag Agrawal 0cef3f79b5
Migrate Jaeger exporter to marshaler (#3625)
* Migrate Jaeger exporter to marshaler

* Remove Jaeger protos from public API

* Separate our jaeger-proto artifact.

* Move

* Cleanups

* Spot
2021-09-21 07:40:15 -07:00
Anuraag Agrawal 9419ef025f
Doc updates for 1.6.0 (#3606)
* Doc updates for 1.6.0

* Bump changelog
2021-09-13 08:12:41 -07: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
Anuraag Agrawal 856a9955e5
Rename ConfigProperties.getList / getMap. (#3593) 2021-09-10 11:33:01 +09: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
jack-berg 68c2d48080
Add ability to enable gzip compression to OtlpGrpcSpanExporter and OtlpGrpcMetricExporter (#3585) 2021-09-09 09:51:47 -07:00
Anuraag Agrawal e8f054615e
Separate out autoconfigure-spi artifact with tracing autoconfiguratio… (#3570)
* Separate out autoconfigure-spi artifact with tracing autoconfiguration SPI.

* Split
2021-09-01 10:21:01 -07:00
Anuraag Agrawal 11864d4349
Exclude internal subpackages too from japicmp (#3559) 2021-08-27 08:30:03 -07:00
Anuraag Agrawal 076b6b1622
Move channel shutdown logic to util and use in grpc metrics exporter too. (#3553) 2021-08-27 13:32:28 +09:00
Anuraag Agrawal 89fc562e1b
Wire metric marshaler into gRPC exporter. (#3546)
* Wire metric marshaler into gRPC exporter.

* Cleanup
2021-08-26 13:45:41 +09:00
jack-berg 068bffba9e
Add missing API diff. (#3526) 2021-08-20 12:29:03 -07:00
Anuraag Agrawal 7a89a19700
Make proto dependency on gRPC compileOnly. (#3490)
* Make proto dependency on gRPC compileOnly.

* Manually parse Status
2021-08-15 09:48:42 +09:00
Trask Stalnaker 651df06cc9
Add getAttribute to ReadableSpan (#3458)
* Add getAttribute to ReadableSpan

* javadoc
2021-08-14 10:33:33 +09:00
Anuraag Agrawal 08690412c0
Deprecate AwsXrayIdGenerator (#3478) 2021-08-13 09:18:13 -07:00
Anuraag Agrawal c5730e77b5
Update docs for 1.5.0 (#3482)
* Update docs for 1.5.0

* CHANGELOG too
2021-08-13 08:10:46 -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
Pavol Loffay 0979e40526
Make Jaeger remote sampler available via SPI (#3368)
* Make Jaeger remote sampler available via SPI

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* use env vars

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* Add more tests

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* fix

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* fix

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
2021-08-12 08:23:07 -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
John Watson d9e1151336
Publish the otlp-http-trace exporter. (#3464)
* Publish the otlp-http-trace exporter.

* use empty files, rather than diffing vs. itself

* fix a comment
2021-08-10 18:28:02 -07:00
HaloFour b5f56ccac7
Adds getParentSpanContext to ReadableSpan interface (#3454)
* Adds getParentSpanContext to ReadableSpan

* Unit tests
2021-08-08 11:17:40 +09:00
Anuraag Agrawal 8a597c6c6b
Allow Jaeger remote sampler to be closed. (#3446) 2021-08-06 09:50:05 -07:00
Anuraag Agrawal ca8a12ff01
Add AttributesAssert.containsKey (#3433) 2021-08-03 12:51:49 -07:00
Anuraag Agrawal 2d9a949c70
Add Iterable versions of hasTraces / Spans (#3429) 2021-08-03 10:32:36 -07:00
lo-jason 2cb461d4ae
#3308 Support adding container.id to resource metadata (#3321)
* Support adding container.id to resource metadta

* Address review comments

* Address review feedback

* Change containerResource to cached Resource factory

* Make method private

* Change to Paths and Files

* Fix bad merge and change regex

* Remove debug code, remove regex

* Add nullable annotation

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-07-21 16:40:57 -07:00
wesleyhillyext 0d2b7b03b7
Allow root Context to be overridden (#3230)
* Allow root Context to be overridden

Adds ContextStorage.root() to provide a way to customize the
implementation of the root Context when you don't want the
root to be an ArrayBasedContext.

* Update context/src/main/java/io/opentelemetry/context/ContextStorage.java

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-07-21 16:13:56 -07:00
Anuraag Agrawal d4bbaf405d
Add containsEntry overload that accepts int (#3412) 2021-07-21 13:41:59 +09:00
BrianYan 9fdd001e58
Add factories for SamplingResult (#3410)
* fix:rebase it

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-07-20 08:44:53 -07:00
Anuraag Agrawal 8163b9fc00
Add assertion for exception (#3409) 2021-07-20 08:49:40 +09:00
John Watson 41c7fbf1cb
API Diff updates for 1.4.0 (#3391)
* reset the apidiffs

* generate apidiffs for 1.4.0
2021-07-09 08:57:21 -07: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
Anuraag Agrawal d7e8651767
Add vararg hasEvents assertion (#3377)
* Add vararg hasEvents assertion

* Test
2021-07-09 10:01:49 +09:00
John Watson d8999911fc
Remove the AWS XRay sampler code (#3379)
* Remove the AWS XRay sampler code and deprecate the AwsXrayIdGenerator

* de-deprecate the AWS Xray ID Generator
2021-07-09 08:31:39 +09:00
Anuraag Agrawal b5d202a08c
Add hasAttributes which takes a list of entries. (#3378) 2021-07-09 08:06:50 +09:00
Anuraag Agrawal f83a9531be
Add the actual XRay remote sampler which polls rules and orders / app… (#3343)
* Add the actual XRay remote sampler which polls rules and orders / applies them.

* Test cleanup

* Don't spam logs
2021-06-27 10:46:21 +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
Christian Neumüller be4420b350
Fix missing apidiff from #3168. (#3313) 2021-06-14 08:43:34 -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 f563f4494d
v1.3.0 doc updates (#3305)
* Add CHANGELOG item for metrics autoconfiguration enhancement

* update for 1.3.0 release

* Documentation updates for the 1.3.0 release

* update the website docs for 1.3.0
2021-06-09 16:33:24 -07:00
Anuraag Agrawal 72374048aa
Update API diffs (#3302) 2021-06-09 07:37:37 -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
Anuraag Agrawal 672330bf51
Upgrade to Gradle 7.0 (#3228) 2021-05-13 08:21:22 +09: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
John Watson e60857d369
Update docs for the 1.2.0 release (#3213)
* Update the changelog for version 1.2.0

* Update the README for version 1.2.0

* Update docs to include instructions related to API diffs.

* Add the diffs from 1.1.0

* tweak the japicmp task a bit and update the current diffs

* update the website docs to point at 1.2.0

* Add instructions about updating the website docs.
2021-05-08 11:59:52 +09:00
John Watson bd6cfd85fb
Add a task to compare public APIs for every stable module. (#3183)
* Add a task to compare public APIs for every stable module.

* add a few comments and make the build task depend on the japicmp task

* update the api diffs after rebasing.

* task must depend on jar

* a few script tweaks based on feedback

* small tweak to make it a little more kotlin-idiomatic

* refactoring to make the code more clear

* some more refactoring.

* make the latest released version a lazy val of the build script

* have the task depend on check, rather than build

* put all the API diffs into a central directory

* run at --info to diagnose CI issues

* try an older java 11 version

* try another combo

* remove the info logging
2021-05-06 17:49:49 -07:00