Commit Graph

33 Commits

Author SHA1 Message Date
Anuraag Agrawal c6c179c267
Make sure forceFlush / shutdown can have callers wait for them to be done by returning CompletableResultCode. (#1571)
* Make sure forceFlush / shutdown can have callers wait for them to be done by returning CompletableResultCode.

* Merge
2020-08-28 10:51:39 -07:00
Sergei Malafeev 88582202c4
Rename 'HttpTextFormat' to 'TextMapPropagator' (#1586)
* #1581 Rename 'HttpTextFormat' to 'TextMapPropagator'

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* fix long line

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* add change log entry

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>

* add change log entry

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-08-26 08:19:48 -07:00
jarebudev 20669f48b6
1556 change resourceconstants to resourceattributes (#1590)
* renamed ResourceConstants to ResourceAttributes, and change to use attributesetter pattern

* tidy up javadoc

* tidy up javadoc
2020-08-25 21:08:44 -07:00
Anuraag Agrawal 07af1d1c1b
Migrate AwsResource to ResourceProvider. (#1582) 2020-08-25 09:20:35 -07:00
John Watson 7e87a69ae0
Introduce a ReadWriteSpan interface and pass it to the onStart of the SpanProcessor (#1574)
* start working on a ReadWriteSpan for startSpan

* Finish converting the disruptor and the unit tests to the new model.

* Add some simple javadoc to the ReadWriteSpan interface
2020-08-24 07:48:27 -07:00
jarebudev ca85d8f0eb
prevent parent spanContext from being null in Samplers (#1563) 2020-08-20 10:23:47 -07:00
Anuraag Agrawal cb50978106
Implement OS and some process resource attributes. (#1555)
* Implement OS and some process resource attributes.

* Update link in javadoc

* pid, docs

* Don't support Android
2020-08-20 09:42:30 -07:00
Terry (Tianyu) Wang ce8cfd4d5b
Changed TraceConfigz zPage form to use POST request (#1521)
* Removed URLEncoder

* Fixed typo

* Added URLDecoding

* Included comment for string replacement

* Added unit tests for special characters in span names

* Resolved URL decoding issues

* Moved url decoding to parseQueryMap and updated the corresponding unit tests

* Added a README file for zPage quickstart

* Add images for README

* Updated README

* Add frontend images

* Add backend images

* Added our design doc

* Added details on package

* Reworded a few lines

* Moved DESIGN.md to a docs folder and changed gradle config to implementation

* Changed wording regarding HttpServer requirement

* Added zpages folder under docs, resolved broken image links

* Resolved comments for the design md file

* Made a few wording changes

* Wrote a benchmark test for TracezSpanBuckets (#23)

* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly

* Updated README file (#25)

* Wrote benchmark tests for TracezDataAggregator (#24)

* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly

* Added a set of benchmark tests for TracezDataAggregator

* Modified README formatting

* Changed benchmark test to negate dead code elimination

* Added Javadocs to the TracezDataAggregator benchmark tests

* Removed benchmark results from README and added a param to the TracezDataAggregator benchmark tests

* Update sdk_extensions/zpages/src/jmh/java/io/opentelemetry/sdk/extensions/zpages/TracezDataAggregatorBenchmark.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Added multiple param values for TracezDataAggregatorBenchmark

* Changed TraceConfigz zPage form submit to use POST request

* Added requestMethod parameter to emitHtml, limited TraceConfig change on POST request only

* Removed duplicate parse function, added test for update on POST request only

* Added separate method for processing request

* Removed unnecessary error check in tests, used try resources for inputstream

Co-authored-by: williamhu99 <wilhu@google.com>
Co-authored-by: William Hu <32604217+williamhu99@users.noreply.github.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-08-12 08:20:29 -07:00
William Hu bcb1d4aca2
Wrote benchmark tests for the zPages module (#1504)
* Removed URLEncoder

* Fixed typo

* Added URLDecoding

* Included comment for string replacement

* Added unit tests for special characters in span names

* Resolved URL decoding issues

* Moved url decoding to parseQueryMap and updated the corresponding unit tests

* Added a README file for zPage quickstart

* Add images for README

* Updated README

* Add frontend images

* Add backend images

* Added our design doc

* Added details on package

* Reworded a few lines

* Moved DESIGN.md to a docs folder and changed gradle config to implementation

* Changed wording regarding HttpServer requirement

* Added zpages folder under docs, resolved broken image links

* Resolved comments for the design md file

* Made a few wording changes

* Wrote a benchmark test for TracezSpanBuckets (#23)

* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly

* Updated README file (#25)

* Wrote benchmark tests for TracezDataAggregator (#24)

* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly

* Added a set of benchmark tests for TracezDataAggregator

* Modified README formatting

* Changed benchmark test to negate dead code elimination

* Added Javadocs to the TracezDataAggregator benchmark tests

* Removed benchmark results from README and added a param to the TracezDataAggregator benchmark tests

* Update sdk_extensions/zpages/src/jmh/java/io/opentelemetry/sdk/extensions/zpages/TracezDataAggregatorBenchmark.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Added multiple param values for TracezDataAggregatorBenchmark

Co-authored-by: Terry Wang <wtyanan@google.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-08-06 20:02:41 -07:00
Anuraag Agrawal e2554f40e9
Migrate most remaining tests to JUnit5. (#1514) 2020-08-06 16:23:11 +02:00
Anuraag Agrawal 8d0a4787ff
Migrate from Truth to AssertJ (#1493)
* Migrate from Truth to AssertJ

* Fix test

* Update andAndUpdate
2020-08-03 17:08:36 -07:00
Anuraag Agrawal 6dffbb8fc4
Migrate tests to JUnit5 (#1489)
* Add JUnit 5 dependency

* Revert unintended
2020-07-31 11:10:27 -07:00
Terry (Tianyu) Wang ad6f9e364c
Implemented TraceConfigZ zPage (#1441)
* Implemented TraceConfigZ zPage (#22)

* Added link to index zpage

* Used AutoValue for TableRow classes

* Changed wording of HTML content

* Changed Builder to interface, fixed build issues

* Removed tableRow classes, added omitEmpty in parseQueryMap

* Added test for invalid inputs

* Changed to use illegalArgumentException
2020-07-30 11:24:50 -07:00
William Hu 09c8c9ed94
Added preliminary documentation for the zPages contrib module (#1455) 2020-07-29 21:19:15 +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
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
William Hu 19da7d01cb
Removed URLEncoder from TracezZPageHandler (#1431)
* Removed URLEncoder

* Fixed typo

* Added URLDecoding

* Included comment for string replacement

* Added unit tests for special characters in span names

* Resolved URL decoding issues

* Moved url decoding to parseQueryMap and updated the corresponding unit tests
2020-07-21 19:24:41 -07:00
Terry (Tianyu) Wang 7c81379393
Removed nullable annotation for ZPagesHandlers container in IndexZPageHandler (#1429)
* Removed nullable annotation for ZPageHandlers container

* Fixed java style issues

* Removed null check
2020-07-17 10:04:39 -07:00
William Hu a938166a07
Added unit tests for SpanBucket (#1424)
* Added unit tests for SpanBucket

* Included a comment to make the last test more clear

* Rewrote the concurrency test

* Removed assertion from exception and added a time limit for the concurrency test case
2020-07-17 08:20:24 -07:00
Terry (Tianyu) Wang df14623402
Implemented index page for zPages (#1423)
* Added two abstract getter method for obtaining page information

* Added page information getter method

* Implemented index zPage handler

* Implemented index page for zPages

* Added unit test for index zPage

* Small style and comment fixes

* Increased font size, code style fix

* Fixed font size issue
2020-07-16 15:55:42 -07:00
Terry (Tianyu) Wang 98cb75695d
Fixed immutable list sorting bug in TraceZ zPage (#1420)
* Fixed immutable list sorting bug

* Added more test covering SpanDetails section

* Used ImmutableList.sortedCopyOf instead of ArrayList, added a test for unknown ztype

* Switched to immutableMap and immutableList
2020-07-16 10:08:40 -07:00
John Watson cb04118a21
Fix errorprone errors. (#1417) 2020-07-15 19:46:37 +02:00
Terry (Tianyu) Wang 373fbf4a2e
Implemented base zPages classes and TraceZ zPage (#1380)
* Implemented a span processor for the TraceZ zPage

* Implemented aggregation logic for running and latency based spans,
summary table generation with running span logic

* Implemented aggregation logic for error based spans

* Finished implementation of TraceZ zPage summary table

* Finished implementation of HttpHandler, HttpServer, and TraceZ zPage

* Refactored the sdk_contrib folder to follow updated syntax

* Removed duplicate function

* Changed inline base64 images

* Fixed copyright statement

* Modified the TracezSpanProcessor to only allow for a limited number of completed spans (#17)

* Modified the TracezSpanProcessor to only allow for a limited number of completed spans

* Renamed count functions and reduced logic in addToBucket

* Fixed typos and turned SpanProcessor and DataAggregator to package private

* Separated SpanBuckets and LatencyBoundaries from TracezDataAggregator

* Switched to PrintStream, removed bufferWritter, removed factory and changed to package private constructor, added documentation for getTracerzHandler behavior, and other small fixes

* Fixed package name

* Changed way of registering handlers, changed atomicBoolean to final, removed unnecessary lock

* Changed registerTracezZPageHandler to package private

* Fixed javadoc styling and wording

* Added constants for splitters, changed httpserver to compileOnly dependency

* Removed FQNs from backend files

* Removed style errors

* Updated TracezSpanProcessor to maintain a set of span names incrementally

* Added visibleForTesting tag, adjusted HTML expression

* Removed unused functions in the data aggregator

* Made TracezSpanBuckets thread-safe

* Changed test to use Mockitorule, removed unnecessary Formatter, unrolled attribute value

* Changed test with @Mock to use Mockito test runner

* Renamed LatencyBoundaries to LatencyBoundary and cleaned up code

* Replaced the EvictingQueue with a faster SpanBucket class and modified checks in TracezDataAggregatorTest

* Addressed additional comments

* Migrated images to resources, used logger to log errors, and other minor fixes

* Moved a variable to within a class in TracezZPageHandler

* Removed printStackTrace, added test for query parameter

* Changed logger to static field, used log method to log detailed stackTrace

* Made minor fixes

* Resolved unmodifiable list error with getOkSpans and getErrorSpans

* Changed map @Mock to empty map, added more test

* Changed test runner

Co-authored-by: williamhu99 <wilhu@google.com>
Co-authored-by: William Hu <32604217+williamhu99@users.noreply.github.com>
2020-07-15 08:51:29 -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
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
Lei Wang 4008f7d515
support aws plugins EC2/ECS/Beanstalk (#1369)
* support aws plugins EC2/ECS/Beanstalk

* support aws plugins EC2/ECS/Beanstalk

* change to Guava Files, change Map to Attributes

* Remove DockerHelper until has container.id in sematic conventions.
2020-06-25 16:17:26 -07:00
jarebudev 3273841899
stop description test from immediately exiting before the sampler is retrieved by rpc (#1364) 2020-06-22 08:03:56 -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 76ef38955a
Start using real java8 in tests. (#1352)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-06-18 09:09:28 -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 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
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
Nikita Salnikov-Tarnovski c558a9651b
Rename contrib to extensions (#1335) 2020-06-17 16:51:14 +02:00