Commit Graph

840 Commits

Author SHA1 Message Date
John Watson e9200e6aa8
Introduce an abstract super class for aggregators. (#898)
* Introduce an abstract super class for aggregators.
This is to hold the boilerplate logic and get it out of the specific implementations.

* tighten up the access modifiers and flip the assignable logic to be correct
2020-02-20 17:14:31 -08:00
Bogdan Drutu 637a99387a
Add a MeterSharedState class that includes the InstrumentationLibraryInfo (#901)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-20 15:16:23 -08:00
John Watson ab63b1ce04
Add the enclosing interface references to remove javadoc errors (#902) 2020-02-20 15:14:41 -08:00
Uladzislau Kiva 1c7da07432
feat: make invalid span context public (#896) 2020-02-20 22:05:59 +01:00
Bogdan Drutu aadea3d5a1
Use a static method to access EMPTY InstrumentationLibraryInfo. (#897)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-20 09:47:31 -08:00
Giovanni Liva 986a22e0fa
Change Sampler interface (#881)
* Change Sampler interface

* Fix sampler interface
2020-02-20 09:46:10 -08:00
John Watson d31441ae2d
Add instrumentation to the BatchSpansProcessor to count the number of dropped spans (#889)
* Add instrumentation to the BatchSpansProcessor to count the number of dropped spans.
2020-02-20 16:39:17 +01:00
Giovanni Liva b0d42dd4cc
Rename TracerRegistry -> Tracer Provider (#879)
* Rename TracerRegistry -> Tracer Provider

* Add comment to address the provider name

* gradlew goJF
2020-02-20 07:26:13 -08:00
Armin Ruech c6d9da000a
Fix Javadoc about EnvVarResource (#894)
* Fix Javadoc in EnvVarResource.java

* Update package-info.java
2020-02-20 07:24:50 -08:00
Giovanni Liva 7d51abc5f9
Move metric check for name length (#893) 2020-02-20 07:24:06 -08:00
Carlos Alberto Cortez f4dea297be
Use Collections.emptyList() directly. (#892) 2020-02-19 21:27:23 -08:00
Bogdan Drutu 9aa6d1ebb1
Add AllLabels Batcher and install default Barcher for Counters (#831)
* Bound registry work in progress

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Add comment about protecting a collection cycle by a lock

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-19 16:23:41 -08:00
Bogdan Drutu b84bf39cd3
Extract descriptor fields for Instrument and use autovalue (#865)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-19 13:56:55 -08:00
Bogdan Drutu 4b727e4d27
Add an abstract helper class for all instruments with bindings (#873)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-19 13:21:20 -08:00
Bogdan Drutu 9e1882f06a
Fix errorprone errors and re-enable errorprone for jmh (#887)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-19 10:57:16 -08:00
Bogdan Drutu c3909045c3
Fix javadoc in Aggregations class (#886)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-19 10:54:08 -08:00
Bogdan Drutu 9f02e0dcc2
Fix javadoc in MetricExporter class (#885)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-19 10:53:01 -08:00
Bogdan Drutu fe41166c5f
Rename MeterSharedState with MeterProviderSharedState (#875)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-19 09:55:17 -08:00
Bogdan Drutu 873922a262
Move AbstractInstrumentBuilder to AbstractInstrument.Builder (#884)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-19 09:40:22 -08:00
Giovanni Liva edbee8a19c
align valid metric names with spec (#877) 2020-02-19 08:11:02 -08:00
Bogdan Drutu a5caea7620
Make Abstract{}Builder inner classes Abstract{}.Builder (#874)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-19 00:14:33 -08:00
Uladzislau Kiva 1fced4898f
Http trace context benchmark (#815)
* test: add benchmarks for http trace context extract and inject

* test: add benchmarks for http trace context extract and inject

* docs: add docs

* style: apply google code style

* style: format jmh.gradle, use not deprecated archiveFileName

* test: add params for trace id and span id

* fix: fix merge conflicts

* feat: use HashMap move params to inner state

* feat: use same measurement params

* fix: apply google code style

* fix: extract span creation for more clear benchmark

* test: use vector of traceparents, increase iterations to 50k

* style: apply google code style

* feat: use vector of traceparents in inject benchmark
2020-02-18 14:36:06 -08:00
Bogdan Drutu e8c00feaf2
AbstractBoundInstrument should be bound when creating. (#867)
* AbstractBoundInstrument should be bound when creating.

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Remove mistakenly added method.
2020-02-18 10:40:34 -08:00
Uladzislau Kiva 19713db928
jmhCompile should not compile with compiler arg -Werror (#866)
* style: format jmh.gradle, use not deprecated archiveFileName

* fix:  jmhCompile should not compile with compiler arg -Werror

* build: add ./gradlew jmhCompile to ci

* build: add ./gradlew jmhCompile to ci

* fix: jmhCompile -> compileJmhJava

* ci: separate target for benchmark

* fix: becnhmark -> benchmark
2020-02-18 10:40:20 -08:00
Giovanni Liva 9ae05f77b0
Rename MeterRegistry -> MeterProvider (#870)
* Rename MeterRegistry -> MeterProvider

* Remove extra code for independent PR

* Address review comments
2020-02-18 10:36:19 -08:00
Bogdan Drutu e3bc56c334
Return LabelSetSdk to allow using getLabels in tests and internally (#868)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-18 07:48:24 -08:00
Bogdan Drutu de4a5e25e1
Add abstract methods for every instrument type (#864)
* Add abstract methods for every instrument type

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Fix bug in AbstractCounter and add tests

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-16 13:58:53 -08:00
John Watson b0d6258bfe
Add a module for auto-instrumentation agent configuration bridge code. (#862)
* Add a module for auto-instrumentation agent configuration bridge code.

* add the new module as a sub-module of all
2020-02-15 09:18:55 -08:00
John Watson 2784431639
Add compileJmhJava to the errorprone configuration (#863) 2020-02-14 13:11:52 -08:00
Uladzislau Kiva 4c194c45e4
Jmh report plugin (#861)
* style: format jmh.gradle, use not deprecated archiveFileName

* feat: add jmhReport plugin
2020-02-14 10:56:50 -08:00
John Watson 7e348511c6
switch CI to use java11, rather than java9 (#860) 2020-02-13 17:03:48 -08:00
Bogdan Drutu 84f44437b1
Plugin Resource, LibraryInfo and instrument types (#859)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-13 14:56:27 -08:00
Bogdan Drutu 3f2ad43f78
Add MetricProducer interface and explain how to use (#856)
* Add MetriProducer interface and explain how to use

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Clarify comment fro MetriExport.

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Fix imports in pull example

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-13 14:30:24 -08:00
Bogdan Drutu ea8f1d3dda
Move Aggregation and connect it with Aggregator. (#857)
* Move Aggregation and connect it with Aggregator.

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Add tests for Sum aggregation

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Add more tests and fix comments

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-13 13:03:38 -08:00
Bogdan Drutu 7bc2a58d8b
Add Resource and InstrumentationLibraryInfo to metrics (#858)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-13 12:56:14 -08:00
John Watson 9206c6506d
Upgrade errorprone to enable java 11 builds (#852)
* upgrade errorprone to enable java 11 builds

* temporarily add --info to see what's going on with the build failures.

* try turning off the daemon usage

* try giving the builds more memory

* crank the memory down a bit to see if we can avoid OOM killing

* how low can we go?
2020-02-13 12:17:39 -08:00
Bogdan Drutu 7d5183db86
Add AggregatorFactory and tests. (#855)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-13 12:11:46 -08:00
John Watson 1e7239e74c
add the missing enclosing interface (#854) 2020-02-13 08:58:40 -08:00
Bogdan Drutu d0bd0b5e5a
Fix import in MetricExporter to fix build. (#851)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-12 15:39:38 -08:00
Bogdan Drutu 11e0fb0b64
AbstractBoundInstrument refcounts and keeps the state of mapped. (#842)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-12 15:19:19 -08:00
Yang Song 047d43ef34
Add metric.export package to SDK (#541)
* Add metric.export package to SDK

Also copy the MetricExporter interface from OpenCensus.

* Replace Metric proto with MetricData. Fix review comments.
2020-02-12 11:07:47 -08:00
Bogdan Drutu 4cff8cc358
Propagate shared state to the instruments (#850)
* Propagate shared state to the instruments

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Mark MeterSharedState as immutable

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-12 09:43:41 -08:00
John Watson 96cd311b87
Add a labelset to the creation of the batch recorder (#844)
* add a labelset to the creation of the batch recorder.

* add a tiny additional comment on the javadoc
2020-02-12 09:19:57 -08:00
Bogdan Drutu 547ea75756
Move Aggregator and implementation to aggregators package (#845)
* Move Aggregator and implementation to aggregators package

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Fix comment imports

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* aggregators -> aggregator

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-12 09:01:18 -08:00
Bogdan Drutu 38d9352a84
Move SpanData to data package, consistent with metrics. (#848)
* Move SpanData to data package, consistent with metrics.

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>

* Update SpanDataTest.java
2020-02-11 17:53:23 -08:00
Bogdan Drutu 2ced542730
Use try-with-resource in SDK where possible (#847)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-11 13:33:50 -08:00
Bogdan Drutu 52831e7c0d
Move MetricData and add labels to the points (#843)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-11 12:35:55 -08:00
Bogdan Drutu 2b19a1d913
Use ThreadLocalRandom insted of our own class. (#846)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-11 12:35:25 -08:00
John Watson 69b9c09d60
Remove the Android API level enforcement. (#823)
* Remove the Android API level enforcement.
Keep the Java 7 enforcement.

* put android 14 enforcement back onto the API

* update based on PR comments

* put back android verification at api level 24
2020-02-11 06:29:32 -08:00
John Watson 0014fff95b
Add counters to the batch recorder. (#838)
* Add counters to the batch recorder.
Also, allow non-monotonic batch recordings.

* remove the throws on the javadoc

* put the proper since tags on the new methods

* remove an import that seems only necessary for IDEA

* formatting
2020-02-11 06:27:32 -08:00