Commit Graph

790 Commits

Author SHA1 Message Date
jason plumb 47c96b5dd9
Fix trace benchmark (#2974)
* fix address passed to span processor, which was causing benchmark to not run.

* started some docs on how to run jmh
2021-03-03 10:55:41 -08:00
Anton Polyakov c7861e8b29
introducing view (#2956)
* introducing view

* code review
2021-03-01 18:43:31 -08:00
beanliu 518f44159b
Histogram Aggregation - core SDK - aggregator (#2924)
* add histogram aggregator

* implement DoubleHistogramAggregator.toMetricData

* pass temporality instead of a boolean for the creation of histogram aggregator

* remove ImmutableDoubleArray

* remove ImmutableLongArray

* fixup! remove ImmutableDoubleArray

* simplify the implementation of DoubleHistogramAggregator

* accumulate value with configured boundaries

* use nanoseconds as timeunit

* update benchmark mode

* List<Double> instead of double[] for histogram factory

* update var names

* switch to using assertj

* simpler boundary check

* simplify multi-threaded test
2021-03-01 10:17:12 -08:00
Anuraag Agrawal 0d467ab670
Pass unmodifiable list to exporters (#2938) 2021-02-26 07:47:34 -08:00
beanliu f1c38ef616
Histogram Aggregation - core SDK - data (#2923)
* add histogram related metric data types

* update doc of histogram boundaries to make it compatible with latest change of ot-proto

* remove unnecessary helper

* simplify the create interface, add doc and validations
2021-02-24 16:03:04 -08:00
Anuraag Agrawal b393a587dd
Have AttributesMap extend HashMap instead of contain LinkedHashMap (#2906)
* Reduce HashMp allocations for AttributeMap.

* Finish

* Add comment on why wrapper is actually needed.
2021-02-24 09:24:25 -08:00
Anuraag Agrawal 1ec484e2d6
Add event assertion, full attributes assertion, and fuzzy attribute value assertion. (#2927) 2021-02-24 08:02:08 -08:00
Bogdan Drutu 75ea07e597
Fix more api dependencies which should be implementation (#2919)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-23 12:20:06 -08:00
Bogdan Drutu 3490002234
Move semconv dependency as implementation, not exposed in the API (#2918)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-23 08:45:21 -08:00
Bogdan Drutu 9e1c76b324
Do not allow null description in the StatusData (#2896)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-22 15:31:45 -08:00
Bogdan Drutu 013643c707
Add package-info for all packages (#2902)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-21 10:44:00 -08:00
Bogdan Drutu a1c25ec784
Move otproto to otlp:internal, so can be marked as stable (#2893)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-20 14:39:27 -08:00
Anuraag Agrawal 77e8f71480
Reduce usage of errorprone annotations to MustBeClosed. (#2898) 2021-02-20 11:43:59 -08:00
Anuraag Agrawal 6710f099e7
Delete old ResourceProvider class (#2895) 2021-02-19 14:05:20 +09:00
Bogdan Drutu 93dd38a18d
Ensure ParametersAreNonnullByDefault is present in all packages (#2879)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-18 08:58:01 -08: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