Commit Graph

21 Commits

Author SHA1 Message Date
Bogdan Drutu 25bf879df7
Split global functionality into a separate class (#2233)
This ensure clear separation of functionality. This PR does not change any functionality, it just restructures the code to separate global functionality from
the Default implementation. Also helps to ensure that Global initialization does not happen by mistake when working only with the default implementation.

Also it helps with methods like `OpenTelemetry.get()` and `OpenTelemetry.set()` to understand they are interacting with global instance

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-15 10:27:35 -08:00
Anuraag Agrawal 91dc119181
Move Sdk to be prefix of implementation classes instead of suffix/midfix. (#2292) 2020-12-14 11:59:28 -08:00
Bogdan Drutu d4bddd1fdf
Change MetricData to be consistent with protos, move creation to the Aggregation (#2274)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-11 11:04:12 -08:00
Bogdan Drutu ae63b9fbe7
Update types to reflect the names in proto (#2243)
* Update types to reflect the names in proto

NON_MONOTONIC_SUM will be soon merged with SUM and offer the "isMonotonic" as a property.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update names to follow, type + aggregation pattern

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-09 13:13:32 -08:00
Anuraag Agrawal 469900eb34
Add a system property that can enable strict context checking for staging environments. (#2195) 2020-12-07 12:38:27 +09:00
Anuraag Agrawal 8697de9afa
Detect GC leaks of scopes in StrictContextStorage. (#2164)
* Detect GC leaks of scopes in StrictContextStorage.

* More

* Finish

* Force GC more aggressively

* Cleanup

* Vendor code directly

* Copy test too

* Try waiting more

* ep

* oops

* Remove from build.gradle

* Drift

* Log on multiple

* Cleaner ourselves.

* EP

* Move into if

* Revert accidental
2020-12-04 13:04:27 +09:00
Anuraag Agrawal 4762c6a25d
Remove ReadableAttributes (#2187)
* Remove ReadableAttributes

* Don't rewrite history

* Drift
2020-12-03 11:26:24 -08:00
Anuraag Agrawal ca3714053f
Replace SpanData.hasRemoteParent/getParentSpanId with getParentSpanContext (#2146)
* Remove SpanData.hasRemoteParent

* Replace parentSpanId with parentSpanContext

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

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

* Keep parentId

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
2020-12-01 09:50:11 -08:00
Christian Neumüller bbe8702257
Rename HttpTraceContext to W3CTraceContextPropagator. (#2116)
* Rename HttpTraceContext to W3CTraceContextPropagator.

* Add javadoc.
2020-11-25 10:27:07 +09:00
Anuraag Agrawal ac672e56bf
Update dependencies (#2115) 2020-11-21 09:39:27 -08:00
Anuraag Agrawal 0e013e5c73
Hide default context propagators implementation behind interface. (#2089)
* Hide default context propagators implementation behind interface.

* Deprecate

* Revamp
2020-11-20 10:58:34 +09:00
Anuraag Agrawal 9d17c6619a
Add assertj helpers for asserting traces and expose from the junit5 h… (#2051)
* Add assertj helpers for asserting traces and expose from the junit5 helper.

* Style and stability of map

* Revert rename, any order comes in future.

* Add coverage for protected method implementations.

* Test hasTraceId

* Check hasTraceId failure too.
2020-11-12 09:06:00 +09:00
Anuraag Agrawal cdc725c3c3
Add AssertJ custom assertions for SpanData and ReadableAttributes. (#2035)
* Add AssertJ custom assertions for SpanData and ReadableAttributes.

* Simpler?

* Cleanup
2020-11-09 08:36:27 -08:00
Anuraag Agrawal 570924b4b7
Fix post-merge conflict in OpenTelemetryRule. (#2014) 2020-11-04 19:05:43 -08:00
Anuraag Agrawal f01456bebd
Add a junit4 rule for OTel testing. (#1996)
* Add a junit4 rule for OTel testing.

* Docs to 4

* A bit more 4

* Volatile just in case
2020-11-05 11:37:51 +09:00
Bogdan Drutu 18d45beb4f
Remove inmemory exporter artifact, move to sdk-testing (#1991)
* Remove unused class InMemoryTracing, junit5 helper is enough

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Remove inmemory exporter artifact, move to sdk-tracing

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-04 08:18:01 -08:00
Bogdan Drutu 6dfbc14e19
Rename package name for exporters to singular exporter (#1992)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-03 16:27:57 -08:00
Anuraag Agrawal db93a841ed
Rename exporter artifacts to singular (#1984)
Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-03 14:24:00 -08:00
Bogdan Drutu 2046ec050e
Move testing-internal artifact to sdk-testing (#1987)
* Move testing-internal artifact to sdk-testing

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Fix missed usage of TestSpanData

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-03 13:54:43 -08:00
Anuraag Agrawal 95fa0eae4d
Add a StrictContextStorage which keeps track of scope open / close to… (#1938)
* Add a StrictContextStorage which keeps track of scope open / close to throw errors when it's incorrect for tests.

* Separate out SettableContextStorageProvider

* Check noop too

* Update sdk/testing/src/main/java/io/opentelemetry/sdk/testing/context/StrictContextStorage.java

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2020-11-03 10:11:37 +09:00
Anuraag Agrawal a506b3a695
Add a JUnit5 extension for setting up OpenTelemetry in a test. (#1880)
* Add a JUnit5 extension for setting up OpenTelemetry in a test.

* git add

* Split API and management accessors.

* Update sdk/testing/src/main/java/io/opentelemetry/sdk/testing/junit5/OpenTelemetryExtension.java

Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>

Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
2020-10-28 09:01:20 +09:00