Commit Graph

147 Commits

Author SHA1 Message Date
Anuraag Agrawal 7ecb2e260e
Only check one part of trace ID is valid since it guarantees a value … (#3291)
* Only check one part of trace ID is valid since it guarantees a value full ID.

* Valid 64-bit IDs.
2021-06-10 21:47:36 +09:00
Anuraag Agrawal 0a9e77f751
Small tweak to name of internal method. (#3292)
* Small tweak to name of internal method.

* Apply
2021-06-08 17:00:55 +09:00
Anuraag Agrawal 4a691cf567
Use switch instead of enummap for status creation (#3290)
* Use switch instead of enummap for status creation

* Combine tests
2021-06-08 16:49:48 +09:00
Anuraag Agrawal cf1fa9f9fe
Fix drift in SpanLimits comments. (#3293)
* Fix drift in SpanLimits comments.

* Nope
2021-06-08 16:38:54 +09:00
Anuraag Agrawal d191424379
Copy simplespanprocessor warning to factory method too and scope it down to logging. (#3289) 2021-06-07 08:31:27 -07:00
Anuraag Agrawal 37cd112e9d
Don't use AutoValue for TraceIdRatio sampler (#3275) 2021-06-03 08:01:00 -07:00
Nikita Salnikov-Tarnovski e86680cd13
Update otel.yaml (#3270) 2021-05-31 09:00:51 -07:00
Anuraag Agrawal 782e38fe6e
Remove unneeded forEach from AttributesMap. (#3266) 2021-05-30 08:21:33 -07:00
John Watson ed99ea357f
Fix the SpanPipelineBenchmark so that it runs. (#3264)
* Fix the SpanPipelineBenchmark so that it runs.
I also updated it to create 100 spans, rather than just a single span, so we can amortize the cost of the Resource, etc.

* Be sure to flush the SDK.

* formatting
2021-05-30 11:44:45 +09:00
Nikita Salnikov-Tarnovski ae3860e069
Add benchmark for recording exception on a span (#3262)
* Add benchmark for recording exception on a span

* Spotless
2021-05-27 11:20:41 -07:00
Nikita Salnikov-Tarnovski fc4b154dcb
Add a benchmark comparing OTLP and Jaeger exporter (#3261)
* Add a benchmark comparing OTLP and Jaeger exporter

* Spotless
2021-05-27 08:12:49 -07:00
Anuraag Agrawal 608f431479
Remove null checks from SdkSpanBuilder (#3244) 2021-05-21 13:45:26 -07:00
Anuraag Agrawal 672330bf51
Upgrade to Gradle 7.0 (#3228) 2021-05-13 08:21:22 +09:00
John Watson 15a1160e56
clean up the package-level docs for the sdk trace export package. (#3208)
Resolves #2903
2021-05-07 08:15:41 +09:00
John Watson 7c9ea8b0f6
default the tracer name to an empty string (#3170) 2021-04-28 10:24:17 -07:00
HaloFour 7d31cddf19
Add Span#setAllAttributes method to add Attributes to a Span (#2799) 2021-04-27 14:41:26 -07:00
John Watson f5c1e0d799
Auto-detect Android and use an Android-friendly IdGenerator instance. (#3176)
* Auto-detect Android and use an Android-friendly IdGenerator instance.

* simplify the random initialization

* Make the AndroidFriendlyRandomIdGenerator even simpler by just keeping a single Random instance
2021-04-27 15:37:02 +09:00
Harshita Srinivas 4bb99964c1
Updated TestClientServer timer execution in Java8 (#3159)
* fixed timer execution in Java 8

* spotless apply

* Updated ClientServer

* Optimised ClientServer timer execution
2021-04-16 13:09:31 +09:00
Anuraag Agrawal c4f612ee5e
Update dependencies (#3105) 2021-04-05 08:49:05 -07:00
Anuraag Agrawal 2f2af19358
Replace ArrayBlockingQueue with jctools queue. (#3034)
* Replace ArrayBlockingQueue with jctools queue.

* Finish

* ArrayQueue

* Fix dependency

* Drift

* Memory note

* Iteration
2021-03-31 15:09:25 +09:00
John Watson 14fd81a8b9
Rename GlobalMetricsProvider to GlobalMeterProvider (#3048) 2021-03-29 08:09:24 -07:00
sbandadd 085eb9d87c
Optimize batch span processor (#2983)
* Optimize batch span processor

Description:
Batch span processor currently is aggressive in the sense that any new spans are sent to the exporter,
this involves lots of overhead from signaling under heavy load and overhead from constant polling by exporter thread
under less load. This PR makes exporter thread wait for maxExportBatchSize to avoid busy polling of the queue.

BatchSpanProcessorMultiThreadBenchmark.java result
![image](https://user-images.githubusercontent.com/62265954/111420486-893c7300-86a8-11eb-8f87-feb2f86f00fc.png)

BatchSpanProcessorCpuBenchmark.java result
![image](https://user-images.githubusercontent.com/62265954/111420492-8e012700-86a8-11eb-800e-7de1fbe2c2b1.png)

* More predictable signaling
2021-03-19 11:47:59 +09:00
sbandadd 23ce8fe392
Add batch span processor benchmarks (#3017)
Description:
This PR adds two benchmarks.

1. Current benchmark executs forceFlush() on every loop and creates a bottleneck which results in not stressing batch span processor. Current benchmark only
measures throughput which is not helpful on its own since number of spans getting exported is also important. BatchSpanProcessorMultiThreadBenchmark is created to address this issue.
2. Measuring CPU usage of exporter thread is also important, but the current benchmarks consumes as much CPU as possible which makes the measurement not meaningful.
To maintain a steady state, this PR creates a benchmark that generates 10k spans per second per thread. One would need to attach a profiler such as yourkit or JProfiler
to the benchmark run to understand the processor's CPU usage. BatchSpanProcessorCpuBenchmark is created for this purpose.

This PR also fixes a bug in calculating number of dropped/export spans. Earlier dropped and exported spans were actually counting the other one.

This PR also fixes a big in calculating number of dropped/export spans. Earlier dropped and exported spans were actually counting the other ones.
2021-03-17 14:47:41 +09:00
Anuraag Agrawal f113c03483
Ignore null / invalid spancontext and handle null attributes for links. (#2985)
* Ignore null / invalid spancontext and handle null attributes for links.

* Cleanup

* Fix
2021-03-07 09:03:33 -08:00
Anuraag Agrawal edf08d7bc1
Have SimpleSpanProcessor keep track of pending exports and wait for t… (#2989)
* Have SimpleSpanProcessor keep track of pending exports and wait for them when flushed.

* Fix CompletableResultCode.ofAll(empty)

* Cleanup
2021-03-07 09:02:45 -08:00
Anuraag Agrawal f553aa0a6b
Add an internal GuardedBy annotation to enable our own error prone ch… (#2978)
* Add an internal GuardedBy annotation to enable our own error prone checker without affecting downstream.

* Method
2021-03-05 11:37:24 +09:00
John Watson a14dfd9f46
fix the BatchSpanProcessorDroppedSpansBenchmark for metrics SDK updates (#2981)
* fix the BatchSpanProcessorDroppedSpansBenchmark for metrics SDK updates

* formatting
2021-03-04 15:43:20 -08:00
Anuraag Agrawal 64ed0415d2
Don't copy events toSpanData if ended. (#2979) 2021-03-04 08:13:39 -08:00
Anuraag Agrawal a33a4ed036
Don't fail on timeout / interrupted since the result isn't really don… (#2957)
* Don't fail on timeout / interrupted since the result isn't really done yet.

* Fix test

* warning
2021-03-03 13:48:51 -08:00
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
Anuraag Agrawal 0d467ab670
Pass unmodifiable list to exporters (#2938) 2021-02-26 07:47:34 -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
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 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
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
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
Anuraag Agrawal ebaceb74a1
Simplify ParentBased equals/hashcode and add coverage. (#2823) 2021-02-17 08:41:21 +09: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
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 5c0ea253a5
Add docs about recommendations regarding traceidratiobased sampler (#2791) 2021-02-09 19:47:12 -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