Commit Graph

411 Commits

Author SHA1 Message Date
Nikita Salnikov-Tarnovski 70e84334c0
Add new configuration option to limit the size of string attribute values (#1484)
* Add new configuration option to limit the size of string attribute values

* Polish

* Polish

* Polish

* Polish

* Add benchmark.

* Format

* Format
2020-08-03 08:11:58 -07:00
Anuraag Agrawal 6dffbb8fc4
Migrate tests to JUnit5 (#1489)
* Add JUnit 5 dependency

* Revert unintended
2020-07-31 11:10:27 -07:00
Christian Neumüller 0f322b34d7
Fix SpanWrapper snapshot being incomplete. (#1482)
* Fix SpanWrapper snapshot being incomplete.

* Improve clarity of unit test.

* Add javadoc for SpanWrapper.

* Remove 'flyweight' from docstring.
2020-07-30 15:22:32 -07:00
dengliming 24ab6c37f0
Hide EnvAutodetectResource ro reduce public classes (#1477) 2020-07-29 16:17:45 +02:00
MitchellDumovic 9c2b3e45b7
Change default sampler to ParentOrElse(AlwaysOn) (#1474) 2020-07-29 06:53:05 -07:00
dengliming 177b1dcd3b
Support system property otel.resource.attributes corresponding to OTEL_RESOURCE_ATTRIBUTES (#1466) 2020-07-27 18:52:32 +02:00
Bogdan Drutu ab95a19680
Remove isSampled, follow up from #1449 (#1450)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-07-23 08:38:10 -07:00
Anuraag Agrawal f816ad5733
Implement Span.recordException (#1434)
* Implement Span.recordException

* License

* javadoc

* Fix javadoc

* Tests for DefaultSpan

* PrintStream benchmark

* Check arguments

* Use StringWriter

* more merge and event name

* Remove timestamp recordException
2020-07-22 18:53:26 -07:00
MitchellDumovic 23b27d7d97
Add ParentOrElse Sampler (#1444)
* Fix bug where Sampling status would not propagate from parent to child correctly

* use generic parentorelse sampler instead

* bring back alwayson as default sampler
2020-07-22 16:20:45 -07:00
Peter Travers 810379f88b
Refactor decision to sampling result (#1449)
* Refactor decision to sampling result

* Fix bad refactor samplingResult => decision

* Fix decision not sampling result

* Fix comments with divergent explanations of same entity

* Fix make comments clearer

* Add links to SamplingResult
2020-07-22 15:27:13 -07:00
Giovanni Liva 88da16e3ed
Forbid empty/null keys (#1440) 2020-07-22 16:20:44 +02:00
Anuraag Agrawal f5452f4f2b
Remove null checks in Span API. (#1433)
* Remove null checks in Span API.

* Add tests and loosen events as well.
2020-07-20 19:00:13 -07:00
Carlos Alberto Cortez 2f204c2bb0
Add overloads for setParent(Context context). (#1262)
* Add overloads for setParent(Context context).

* Fix the original version.

* Apply feedback.

* Update version for CorrelationContext.

* Add simple extra test for DefaultCorrelationContextManagerTest.
2020-07-17 08:42:01 -07:00
John Watson 95bb731953
Refactor the creation of instrument batchers to be in a central location (#1411)
* Refactor the creation of instrument batchers to be in a central location.
This should allow us to build a Views API into the SDK.

* Fill in some missing javadoc.

* move the ViewRegistry up one package, and clean up the visibility of other classes
2020-07-14 18:55:10 -07:00
John Watson e1ddcaec24
update errorprone, grpc and autovalue (#1403)
Also, clean up new errorprone warnings
2020-07-12 07:56:44 -07:00
John Watson fa95bb609b
More fully document the MetricProducer class (#1406)
- renamed the misleading method name for getting metric data.
- added javadoc in places where it was missing to clarify implementation details
2020-07-11 10:47:33 -07:00
John Watson 7ce215da2b
rename a variable and fix the list initialization size. (#1400) 2020-07-09 13:52:15 +02:00
John Watson ee0d438147
Change the usage of MMSC aggregations to always be deltas. (#1368) 2020-07-01 10:28:20 -07:00
Lei Wang 241017bd4e
support container id in AWS ECS plugin (#1384)
* support container id in AWS ECS plugin

* fix comments; change apache common to guava
2020-07-01 10:26:52 -07:00
Giovanni Liva 0da293d929
Add SDK Telemetry resources (#1366)
* Add SDK Telemetry resources

* Address feedback

* Generate version.properties

* Use unknown when version not available
2020-06-29 11:25:47 -07:00
John Watson 24b4be90c3
Convert CorrelationContext entry keys and values to simple Strings (#1363)
* convert CC entry keys and values to simple Strings

* fix broken javadoc
2020-06-22 14:37:21 -07:00
Bogdan Drutu d02667929b
Change instrument operations to use immutable Labels (#1358)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-18 13:48:39 -07:00
Bogdan Drutu 4633676593
Use lambda references where possible (#1355)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-18 11:54:14 -07:00
Bogdan Drutu 42cdd7ed3d
Use the new immutable Labels for Bind (#1354)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-18 11:53:41 -07:00
Bogdan Drutu 76ef38955a
Start using real java8 in tests. (#1352)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-18 09:09:28 -07:00
Giovanni Liva f4c175d5df
Moved ResourceTest into 'resources' package (#1353) 2020-06-18 08:16:09 -07:00
Bogdan Drutu aaec09d68d
Change samplers to use the new Attributes class (#1347)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-17 17:23:09 -07:00
Bogdan Drutu b734e366ec
Change to use labels for async instruments (#1349)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-17 17:22:32 -07:00
Bogdan Drutu 589adc0531
Fix race condition between merged PRs (#1348)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-17 15:38:45 -07:00
Bogdan Drutu b5520ee14c
Change resource to use the new Attributes class (#1345)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-17 14:20:23 -07:00
Bogdan Drutu 2312932a76
Add a ReadableKeyValuePairs and make ReadableAttribute a simple sub-interface (#1340)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-17 11:05:43 -07:00
John Watson fccc6d9bc3
Convert the usages of the LabelSetSdk to use the Labels class. (#1338) 2020-06-17 10:43:11 -07:00
John Watson f1f5975d5c
Introduce an ReadableAttributes interface, with 2 implementations (#1336)
* Introduce an Attributes interface and have ImmutableAttributes and the AttributesMap implement it.

* make the attribute limiting a little clearer.

* tiny javadoc fix

* Rework to restore the Attributes class, and introduce a ReadableAttributes interface

* polish the javadoc a bit

* fix some broken javadoc

* revert example change; revert test name change

* javadoc de-escalation

* fix bad merge
2020-06-17 09:29:52 -07:00
John Watson 7644ef4d56
Convert SpanData to use immutable Attributes (#1330) 2020-06-15 17:51:49 +02:00
John Watson c877295796
If an exporter throws an exception, log it, rather than having the IMR stop altogether. (#1333) 2020-06-11 15:44:20 -07:00
Anuraag Agrawal 04eb87b307
Apply platforms to resolved classpaths instead of dependency containe… (#1288)
* Apply platforms to resolved classpaths instead of dependency containers and have maven publication use resolution result for all variants.

* Revert unintended
2020-06-11 08:37:14 -07:00
John Watson d80bd1ad67
Convert Link and Event types to use the new immutable Attributes (#1325)
* Convert Link and Event types to use the new immutable Attributes

update from the upstream branch

update from parent branch changes

* move the limiting of attributes to a custom consumer class
2020-06-10 12:13:57 -07:00
John Watson 0a921a6343
Make sure that null points aren't propagated to exporters (#1329)
* make sure that null MetricData Points are not propagated to exporters

* add a test for the double value recorder, as well
2020-06-10 08:39:07 -07:00
John Watson 6c99a09f1d
remove some junk code that snuck in (#1327) 2020-06-09 16:08:23 -07:00
Bogdan Drutu afabbd1e06
Remove duplicate Result interfaces (#1312)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-05 14:37:50 -07:00
Bogdan Drutu 643d25d244
Avoid mockito magic for span processors test, test with empty configmap (#1309)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-04 11:20:34 -07:00
Bogdan Drutu 37b64df70b
Test flush method for multispan exporter (#1308)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-04 09:32:12 -07:00
Giovanni Liva 4808387afb
Cleanup and additional tests for ConfigBuilder (#1296)
* Cleanup and tests for ConfigBuilder

* Add more tests

* Document mockito extension

* Reformat after rebase
2020-06-02 11:33:21 -07:00
Bogdan Drutu a1bae308db
Add implementation for value observers (#1300)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-01 21:11:02 -07:00
Bogdan Drutu b633bf9d21
Refactor batchers to make it more explicit what is used. (#1299)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-01 15:08:35 -07:00
Bogdan Drutu f04ddd8f2a
Cleanup metrics SDK. Rename variables, allow different aggregation for async (#1298)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-01 13:02:18 -07:00
Rashmi 322b661e37
Support env vars for TraceConfig initialization (#1255) 2020-06-01 20:51:13 +02:00
Brandon Kimberly a392120914
Renamed SpanDataImpl to TestSpanData and moved to subdir test (#1291) (#1293) 2020-05-30 14:47:25 -07:00
Nikita Salnikov-Tarnovski 7aca0d9192
Apply bom imports only if needed (#1281) 2020-05-29 12:35:15 -07:00
Anuraag Agrawal a9c7c7237d
Update config / deps to allow building on Java 14. (#1287)
* Update config / deps to allow building on Java 14.

* Finish comment
2020-05-29 08:55:38 -07:00