Commit Graph

776 Commits

Author SHA1 Message Date
Anuraag Agrawal 2493ba5f60 Delete old ResourceProvider class (#2895) 2021-02-19 06:27:48 +00:00
Anuraag Agrawal 8f787275fc
[Breaking Change] Make TraceId.getTraceIdRandomPart private (#2839)
* Move traceidrandom

* Make BigEndianEncoding public-internal to use for Android compatibility.

* Rename BigEndianEncoding to sound less useful if accidentally imported.
2021-02-17 16:59:54 -08:00
John Watson bd6a329211
Obfuscate the GlobalOpenTelemetry instance. (#2829)
* Obfuscate the GlobalOpenTelemetry instance.
This is to prevent people from casting to the SDK implementation.
Resolves #2788

* Add some more tests for the global obfuscation
2021-02-18 08:59:56 +09:00
Bogdan Drutu 7c038e00e9
Mark classes final, or hide ctor for testing classes (#2847)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-17 15:18:46 -08:00
Anuraag Agrawal 0730a9e79c
[Breaking Change] Move ResourceProvider SPI to autoconfigure module (#2837)
* autoconfigure

* Finish

* Refactor

* Fix OsResource to use empty

* Fix BeanstalkResource to use empty

* Fix ResourceTest to use empty

* Fix Ec2Resource to use empty

* Fix EcsResource to use empty

* Fix ProcessRuntimeResource to use empty

* Fix ProcessRuntimeResource to use empty

* Fix EksResource to use empty

* Fix LambdaResource to use empty

* Fix ProcessResource to use empty

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Bogdan Drutu <lazy@splunk.com>
2021-02-17 12:41:07 -08:00
Bogdan Drutu 94b37ebfd6
Mark public class TestClock as final (#2856)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-17 12:40:48 -08:00
Bogdan Drutu a633d1ee87
[Breaking Change] Remove metrics exporter from stable testing package (#2857)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-17 12:29:05 -08:00
Anuraag Agrawal 4623334c7c
Move Getter/Setter to top level (#2840) 2021-02-17 09:46:56 -08:00
Anuraag Agrawal fa8bb33646
[Breaking Change] Rename API getDefault to noop! (#2842)
* Noop!

* errorprone
2021-02-17 09:18:22 -08:00
Anuraag Agrawal 224845b6b1
[Breaking Change] Remove attribute value truncation. (#2841) 2021-02-17 09:08:39 -08:00
John Watson f83c21638a
[Breaking Change] Rename TraceStateBuilder.set() to put() (#2830)
Provisionally resolves #2746
2021-02-17 08:16:24 -08:00
John Watson 20a1601089
[Breaking Change] Rename getEmpty() to empty() (#2831) 2021-02-17 08:15:23 -08:00
John Watson 920f79d151
clean up the javadoc and make examples pasteable (#2824)
* clean up the javadoc and make examples pastable
resolves #2817

* formatting
2021-02-17 12:31:08 +09:00
Anuraag Agrawal ebaceb74a1
Simplify ParentBased equals/hashcode and add coverage. (#2823) 2021-02-17 08:41:21 +09:00
Anuraag Agrawal 900c35ed8c
Migrate remaining gradle scripts to kotlin (#2820)
* Migrate remaining gradle scripts to kotlin

* Finish more
2021-02-16 14:11:07 -08:00
Anuraag Agrawal 23adacaf2e
Use empty default for null attributes and discard for null unit (#2777)
* Use empty / millisecond default for null attributes / unit

* Discard
2021-02-16 09:39:02 -08:00
Anuraag Agrawal 1fc7e057ad
Target Android API 21 with animalsniffer and disable it for metrics for now since it's unstable. (#2809) 2021-02-12 11:59:43 -08:00
Anuraag Agrawal bace5dce1f
Rename disabled resources property to be consistent with agent. (#2792)
* Rename disabled resources property to be consistent with agent.

* property > env
2021-02-12 13:45:33 +09:00
John Watson cacf0f18f4
Clarify the implementation of the BatchSpanProcessor forceFlush implementation (#2807)
* Clarify the implementation of the BatchSpanProcessor forceFlush implementation

* insert missing word here
2021-02-11 16:15:05 -08:00
John Watson 74b0e9cc7e
Update the span limit defaults to be 128, per spec 1.0.0 (#2798) 2021-02-10 20:01:56 -08:00
Anuraag Agrawal 170cb4533a
Add VERSIONING document and make sure all internal packages have doc … (#2775)
* Add VERSIONING document and make sure all internal packages have doc about internalness.

* Make internal package caveat even stronger

* Users must not use internal package.
2021-02-10 09:22:44 -08:00
Anuraag Agrawal 5c0ea253a5
Add docs about recommendations regarding traceidratiobased sampler (#2791) 2021-02-09 19:47:12 -08:00
Anuraag Agrawal 0385f6d79b
Make StrictContextStorage package-private (#2772) 2021-02-08 19:03:35 -08:00
John Watson 8898e4c441
save the already known state of SpanContext validity (#2769) 2021-02-08 18:26:02 -08:00
Bogdan Drutu ff5529a422
Partially reverts #2750 (#2756)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-08 12:33:34 -08:00
Anuraag Agrawal 522953bd8f
Restore Trace/SpanId.fromBytes (#2750)
This reverts commit d6fea3a70a.
2021-02-08 07:42:49 -08:00
John Watson eb529cb26d
Revert the SpanContext trace/span id accessor methods. (#2749) 2021-02-08 09:51:49 +09:00
Bogdan Drutu dbfd07faf8
[BREAKING CHANGE] Remove not very used method from SpanData (#2722)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-05 20:34:54 -08:00
Bogdan Drutu 07b5ebe868
[BREAKING CHANGE] Remove not very used method from SpanData (#2723)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-05 20:34:17 -08:00
Bogdan Drutu e187c18112
Consistent name for Trace/Span ids getters with the specification (#2721)
See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#retrieving-the-traceid-and-spanid

Not breaking change since methods were just renamed anyway.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-05 20:33:32 -08:00
Bogdan Drutu eb7e212587
Mark interfaces in trace/data immutable (#2729)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-05 20:30:17 -08:00
Bogdan Drutu d6fea3a70a
Remove helper methods fromBytes from Trace/Span Id (#2727)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-05 20:29:51 -08:00
Bogdan Drutu d932baa919
Remove trivial usage of fromLong[s] methods (#2730)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-05 20:28:00 -08:00
Bogdan Drutu 6c30f411f3
Change TraceFlags to be a class, expose all helpers of the class itself. (#2709)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-05 09:06:19 -08:00
John Watson f543fe85f8
Add javadoc to the package-info.java for Sampling (#2694)
* Add javadoc to the package-info.java for Sampling
and update some javadoc for parent-based Samplers.

* Suppress linelength for package-info

* tweak some language, add a link to the spec

* pin the url to a specific SHA

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-02-04 10:56:32 -08:00
Bogdan Drutu bc326c6c0d
Clarify thread-safety requirements for SDK components, fix small issues (#2708)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-04 09:16:23 -08:00
Bogdan Drutu 77d993d653
[BREAKING CHANGE] Cleanup TraceId/SpanId classes. Ensure consistency. (#2696)
Summary of changes:
* getHexLength renamed to getLength
* bytesFromHex/bytesToHex renamed to asBytes/fromBytes.
* bytesFromHex/bytesToHex renamed to asLongHigh/asLongLow
* Update javadoc.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-04 07:38:25 -08:00
Bogdan Drutu 0b250c1c91
Cleanup usages of TraceState and TraceFalgs (#2697)
* Avoid calling TraceState.builder().build() and replace it with TraceState.getDefault();
* Avoid storing TraceFalgs.getDefault() and TraceFalgs.getSampler() and use them directly;

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-03 18:39:52 -08:00
Anuraag Agrawal b8c5acd3ff
Rename TraceConfig -> SpanLimits and move to upper package. (#2686) 2021-02-04 09:10:05 +09:00
Bogdan Drutu 88e760d01c
[BREAKING CHANGE] Remove AsHexString suffix from ids getters. (#2684)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-03 10:40:43 -08:00
John Watson 687c3b082c
Update the check in the tracer to see if the SDK has been shut down. (#2673)
* Update the check in the tracer to see if the sdk has been shut down.
This changes the logic so that we only need to have called shutdown on the TracerSharedState, not that it has successfully shut down.

* remove the lock in the hot path
2021-02-03 08:13:57 -08:00
Bogdan Drutu 506a49b48f
Fix SpanWrapper toString to avoid duplicates (#2671)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-03 08:04:34 -08:00
Bogdan Drutu 19c002471e
Move Span.Kind to the upper level as SpanKind (#2646)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-02 12:27:54 -08:00
Bogdan Drutu 301a29d7a3
Move labels outside of the stable package (#2647)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-02 10:24:06 -08:00
Bogdan Drutu 527b5f4549
Expose the SpanContext to the SpanData (#2660)
This helps exporter to have access directly to bytes, hex or any other format we will expose for the ids in the SpanContext.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-02 08:54:26 -08:00
Bogdan Drutu 439c7c5c79
Remove metrics specific helpers from internal.StringUtils (#2663)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-02 08:21:36 -08:00
Bogdan Drutu c048ab8954
Mark SamplingResult as immutable (#2630)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-01 09:48:29 -08:00
Bogdan Drutu 3423c008a4
Remove unnecessary public method (#2622)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-01 12:24:27 +09:00
Anuraag Agrawal 6eee5ba4ae
Update dependencies (#2618)
* Update dependencies

* Inline annotations

* Revert "Inline annotations"

This reverts commit 8facc4ddbe.

* Unmodifiable
2021-02-01 12:21:00 +09:00
Bogdan Drutu 4bad109db5
Remove reference to not public class MultiSpanExporter (#2633)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-01 11:46:19 +09:00