Commit Graph

2156 Commits

Author SHA1 Message Date
jack-berg 8224ee4323
Add http/protobuf exporter for metrics (#3440)
* Add OtlpHttpMetricExporter

* Fix test flake by adjusting logging order.

* Drop metric instrumentation of OtlpHttpMetricExporter

* Attempt to fix log tet flake using awaitility

* Rename isCompressionEnabled to compressionEnabled
2021-08-06 12:24:37 -07:00
Anuraag Agrawal 8a597c6c6b
Allow Jaeger remote sampler to be closed. (#3446) 2021-08-06 09:50:05 -07:00
Anuraag Agrawal bfb4f606c2
Set jobid for build cache. (#3449) 2021-08-06 08:21:15 -07:00
Anuraag Agrawal 49c6d7fd22
Don't fail fast on tests. (#3447) 2021-08-06 08:12:23 -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
jack-berg 20f872d8dc
Add OTLP signal specific certificate autoconfiguration (#3439)
* Add setTrustedCertificates support to OtlpGrpcMetricExporterBuilder

* Add signal specific certificate configuration to autoconfiguration

* Improve test coverage.

* Try to meet code coverage requirements.

* Qualify SslUtil.setTrustedCertificatesPem
2021-08-05 17:10:48 +09:00
jack-berg 956912dd5f
OTLP HTTP trace exporter (#3418)
* Draft of OTLP HTTP trace exporter

* Cleanup some TODOs, shade okhttp dependency

* Get all tests working

* Drop support for otlp/http json format

* Split OtlpHttpSpanExporter to its own module.

* drop @NotNull annotations

* Switch to armeria mock server, respond to PR feedback.

* Remove :exporter:otlp-http:trace shadowJar and other PR feedback.

* Extract constant for application/x-protobuf media type
2021-08-04 07:59:15 -07:00
jack-berg a35b28692e
Add TLS support for OtlpGrpcSpanExporter for OkHttp ManagedChannel (#3425)
* Add OkHttp TLS support to OtlpGrpcSpanExporterBuilder

* Initialize OtlpGrpcSpanExporterBuilder NettyChannelBuilder TLS using TrustManagerFactory.

* Reorganize :exporter:otlp:trace dependencies
2021-08-03 13:00:22 -07:00
Anuraag Agrawal ca8a12ff01
Add AttributesAssert.containsKey (#3433) 2021-08-03 12:51:49 -07:00
Carlos Alberto Cortez 8492353651
Store SpanShim/Baggage in the Context. (#2982)
* Initial attempt to store the SpanShim right in the Context.

* Additional pass to include Baggage.
2021-08-03 12:50:39 -07:00
jack-berg 42831fe004
Add support for signal specific timeout and headers autoconfiguration. (#3434)
* Add support for signal specific timeout and headers autoconfiguration.

* Attempt to fix build.

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-08-03 10:43:45 -07:00
Anuraag Agrawal 2d9a949c70
Add Iterable versions of hasTraces / Spans (#3429) 2021-08-03 10:32:36 -07:00
Trask Stalnaker 5cc59cb244
Preserve spaces in gradle.properties (#3426) 2021-08-03 10:21:27 -07:00
Trask Stalnaker 60c3c5ca0c
Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09:00
dependabot[bot] 614668af6c
Bump codecov/codecov-action from 2.0.1 to 2.0.2 (#3424)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-26 13:04:10 +09:00
John Watson daef9c147d
Provide an option to not set the autoconfigured SDK as the global. (#3419) 2021-07-21 20:51:13 -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
dependabot[bot] e4c03453eb
Bump codecov/codecov-action from 1.5.2 to 2.0.1 (#3411)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1.5.2 to 2.0.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.5.2...v2.0.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-20 18:26:29 -07: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 a081b0283e
Further work on cleaning up the auto-generated javadoc for SemanticAttributes and ResourceAttributes (#3398) 2021-07-19 08:28:49 -07:00
Anuraag Agrawal 6d9e5801c7
Fix disableErrorProne (#3405) 2021-07-15 08:41:30 -07:00
Anuraag Agrawal 3d0485364b
Add hasNoParent assertion (#3406) 2021-07-15 14:09:25 +09:00
Anuraag Agrawal 4cb2a5f0a3
Doc updates for 1.4.1 (#3403) 2021-07-15 13:03:56 +09:00
Anuraag Agrawal 5e6be2bb52
Populate labels in addition to attributes for now on metrics. (#3397)
* Populate labels in addition to attributes for now on metrics.

* meow

* Non-string keys
2021-07-15 09:21:47 +09:00
John Watson 543b5eee45
update the examples to point at 1.4.0 (#3400) 2021-07-15 08:52:30 +09:00
Anna Nosek f606a5b19b
Add documentation for OTEL_SERVICE_NAME (#3396)
* add doc for OTEL_SERVICE_NAME

* Update sdk-extensions/autoconfigure/README.md

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

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
2021-07-14 07:49:51 -07:00
John Watson 3925b50cc9
Tweak the semantic convention code generation. (#3394)
* Tweak the semantic convention code generation.
In particular, to better support links and html in the docs.

* small simplification of the template
2021-07-13 14:39:18 -07:00
Josh Suereth 45b73debe8
Fixes #3392 - Metric benchmark no longer throws NPE, and add 'realistic' histogram benchmark for comparison against prototype. (#3393) 2021-07-12 08:18:16 -07:00
Josh Suereth ae4bb364cd
Wire Exemplars into the metrics.data package (#3353)
* Add Exemplars into `metrics.data` pacakge

- Add Exemplars to match OTLP spec
- Add assertj helpers for exemplar extraction on points.

* Wire exemplar export to OTLP exporter

* Wire exemplar export to Prometheus exporter

* Add javadoc for AbstractSampledPointDataAssert

* Fixes from review.

* Fixes from review.

* Fixes from review.

* Fixes from spotless.

* Fixes froom review.

* Add clarification to javadoc from review.

* ONe last javadoc cleanup.

* Fixes to javadoc build.

* Update method name from review.

* Fixes from review.
2021-07-10 13:20:31 +09:00
John Watson 57bd952756
Update the semconv constants to v1.5.0 (#3381)
* Update the semconv constants to v1.5.0
Also, tweak our checkstyle settings to allow long markdown-style links.

* remove linelength checkstyle checks, since spotless already formats for us
2021-07-09 09:31:17 -07:00
John Watson f83b780c41
Provide an option for disabling errorprone for a smoother dev experience (#3380)
* Provide an option for disabling errorprone for a smoother dev experience

* add a warning if you have turned off errorprone
2021-07-09 08:57:56 -07: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 a7f38027ad
Update docs for 1.4.0 (#3389) 2021-07-09 08:34:10 -07:00
Anuraag Agrawal 669bf0b42b
Add TraceAssert.getSpan (#3386)
* Add TraceAssert.getSpan

* Fix and comment
2021-07-09 07:45:29 -07:00
Anuraag Agrawal f13fe7961d
Allow forceFlush of IntervalMetricReader, globally too for autoconfigure / agent. (#3385) 2021-07-09 22:46:40 +09:00
Anuraag Agrawal 31110381cc
Update changelog with clock (#3383) 2021-07-09 13:03:16 +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
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 e3bcc8b2a1
Different pattern for embedding shaded dependency. (#3371) 2021-07-08 08:52:46 -07:00
Anuraag Agrawal a36cc90f90
Fix tests on Java 16+ and add 16/17-ea to CI. (#3370)
* Fix tests on Java 16 and add to CI.

* JDK for mockito

* Java 17
2021-07-08 13:41:29 +09:00
Trask Stalnaker ddf46e180f
Sync .editorconfig with instrumentation repo (#3375) 2021-07-07 20:41:15 -07:00
Anuraag Agrawal 431bb1281a
Use property to specify test java version instead of adding tasks. (#3365)
* Use property to specify test java version instead of adding tasks.

* Typo
2021-07-05 11:15:48 +09:00