Commit Graph

584 Commits

Author SHA1 Message Date
jason plumb c82646e44b
stop gap measure to fix api and sdk pom breakage dependency on metrics. (#2346) 2020-12-17 14:00:31 -08:00
jason plumb 2aa1eb2f54
Metrics are alpha take 2 (#2329)
* omit metrics artifacts (alpha) from the bill of materials (bom)

* Hack the version number for maven publications that end in -metrics.

* Remove the failed attempt.
2020-12-16 20:10:06 -08:00
Anuraag Agrawal 17fa4e9c97
Only apply java-library to projects and configure reactively. (#2319)
* Use java-library

* Only apply java-library to projects and configure reactively.

* Consistency

* Cleanup
2020-12-17 09:11:44 +09:00
Anuraag Agrawal 8a369e3695
Make public src/main classes final where possible. (#2309)
* Make public src/main classes final where possible.

* methods

* Spot
2020-12-16 13:13:04 +09:00
jason plumb 5a93b77524
inject alpha into the version for metrics api and sdk. (#2311) 2020-12-16 12:29:54 +09:00
Bogdan Drutu dbb1ae91f9
Deprecate metrics from opentelemetry-api, add a global version in metrics api (#2279)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-15 15:14:50 -08:00
Bogdan Drutu 37afb33659
Split global functionality into a separate class (#2233) (#2239)
This ensure clear separation of functionality. This PR does not change any functionality, it just restructures the code to separate global functionality from
the Default implementation. Also helps to ensure that Global initialization does not happen by mistake when working only with the default implementation.

Also it helps with methods like `OpenTelemetry.get()` and `OpenTelemetry.set()` to understand they are interacting with global instance

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-15 13:05:46 -08:00
Bogdan Drutu 25bf879df7
Split global functionality into a separate class (#2233)
This ensure clear separation of functionality. This PR does not change any functionality, it just restructures the code to separate global functionality from
the Default implementation. Also helps to ensure that Global initialization does not happen by mistake when working only with the default implementation.

Also it helps with methods like `OpenTelemetry.get()` and `OpenTelemetry.set()` to understand they are interacting with global instance

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-15 10:27:35 -08:00
Anuraag Agrawal 44186bc110
Suppress checkstyle javadoc check from non-main source sets. (#2307)
* Suppress checkstyle javadoc check from non-main source sets.

* Update checkstyle-suppressions.xml
2020-12-15 09:39:33 -08:00
Frank Spitulski c108f62158
fix(semantic-attributes): update to dec 14 2020 master (#2302) 2020-12-15 08:42:33 -08:00
Anuraag Agrawal e802b8ab35
Detect invalid use of makeCurrent in Kotlin coroutine. (#2227)
* Detect invalid use of makeCurrent in Kotlin coroutine.

* Fix and check suspending function too.

* Newline

* Doc

* Some comments

* teency
2020-12-15 15:09:34 +09:00
Anuraag Agrawal 262dd7a866
Use key as AttributeKey.toString (#2175)
* Use key as AttributeKey.toString

* Fix / more tests

* Add toString test for SpanWrapper

* Quote string values

* Fix
2020-12-15 12:49:45 +09:00
Anuraag Agrawal 13e6485a63
Add Context.toString (#2289) 2020-12-15 11:57:36 +09:00
Anuraag Agrawal 6f97da1261
Make AttributeKey compare normally with both type/key. (#2284)
* Make AttributeKey compare normally with both type/key.

* Say hi to murphy
2020-12-14 09:56:56 -08:00
Bogdan Drutu 8a8799ec9e
Small nit in internal members order (#2232)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-12 16:18:38 -08:00
Bogdan Drutu c8f1f27f07
Remove OpenTelemetryBuilder interface, every implementation will have it's own builder (#2275)
This PR also fixes the DefaultOpenTelemetry builder to be it's own class and not a sub-class.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-12 13:09:58 +09:00
Prashant Srivastava f88e207f09
Adding instructions to run benchmarks (#2271)
* benchmark readme for opentelemetry-sdk

* benchmark instructions for all the modules

* Fixing typo
2020-12-11 14:40:16 +09:00
Bogdan Drutu ca1f31dfb5
Use standard Java interfaces instead of defining custom ones (#2261)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-10 09:16:24 -08:00
Bogdan Drutu 78d1ad5cce
Remove unnecessary generic argument from AsynchronousInstrument (#2260)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-10 08:20:36 -08:00
Anuraag Agrawal f199e133fa
Implement more Span default methods. (#2242)
* Implement more Span default methods.

* A bit more
2020-12-09 13:08:52 -08:00
Bogdan Drutu a439ca6da1
Move small internal package under common (#2219)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-09 13:45:10 +09:00
Bogdan Drutu 087f58da1d
Remove references to TracingContextUtils (#2238)
* Remove references to TracingContextUtils

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

* Update api/trace/src/main/java/io/opentelemetry/api/trace/Tracer.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-12-08 16:56:49 -08:00
John Watson 704dfe270b
add some basic benchmarks for various baggage operations (#2197)
* add some basic benchmarks for various baggage operations

* update for changes from upstream; pre-allocate the strings in the benchmark.

* allocate the strings statically because we can
2020-12-08 11:00:54 -08:00
Bogdan Drutu efd6b9f3e4
Remove deprecated setCallback, change SDK to avoid volatile (#2216)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 18:37:45 -08:00
Bogdan Drutu 67b6339c70
Small nits in api packages (#2220)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 18:10:58 -08:00
Bogdan Drutu 65acc09c46
Add unit tests for isValidMetricName (#2218)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-08 09:22:20 +09:00
Bogdan Drutu be9c31ecad
Remove internal public validateLabelPairs, move to the class that uses it (#2215)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 14:42:23 -08:00
Bogdan Drutu 69208f8f79
Remove version of checkArgument not used (#2213)
This PR fixes an inconsistency that MaxLengthOfAttributeValues was allowed to be set to 0, then thrown internal exception.
We should check for arguments only at public APIs.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 13:39:33 -08:00
Bogdan Drutu 50c8f1f5c6
Move obfuscated to sdk, make it package protected (#2208)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 12:47:01 -08:00
Bogdan Drutu 7460f92bc8
Remove deprecated methods/classes before 1.0 release (#2205)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 11:33:17 -08:00
Bogdan Drutu 57263bf44a
Move TemporaryBuffers to be a package protected class, no need to expose this class (#2206)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 11:31:03 -08:00
Bogdan Drutu 3a7c0086c2
Remove deadcode from internal package (#2209)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-07 11:30:39 -08:00
Anuraag Agrawal 2770d46191
Add array implementation of Context. (#2191)
* Add array implementation of Context.

* More test
2020-12-07 12:39:35 +09:00
Anuraag Agrawal 469900eb34
Add a system property that can enable strict context checking for staging environments. (#2195) 2020-12-07 12:38:27 +09:00
Anuraag Agrawal f51332bd25
Add Labels.asMap and hide the builder implementation. (#2189)
* Add Labels.asMap and hide the builder implementation.

* Not public

* Spot

* More merge
2020-12-07 11:35:41 +09:00
Bogdan Drutu 26124ad075
Split API packages, move context in the same directory (#2199)
There are some things left to be done:
* Decide if context package should also be opentelemetry-api-context.
* Cleanup internal packages, things that are used by only one artifact should be moved there.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-05 08:33:20 -08:00
Anuraag Agrawal 8697de9afa
Detect GC leaks of scopes in StrictContextStorage. (#2164)
* Detect GC leaks of scopes in StrictContextStorage.

* More

* Finish

* Force GC more aggressively

* Cleanup

* Vendor code directly

* Copy test too

* Try waiting more

* ep

* oops

* Remove from build.gradle

* Drift

* Log on multiple

* Cleaner ourselves.

* EP

* Move into if

* Revert accidental
2020-12-04 13:04:27 +09:00
Anuraag Agrawal 643b697106
Add TraceState.asMap (#2190)
* Add TraceState.asMap

* Javadoc

* Spot
2020-12-04 12:40:11 +09:00
Anuraag Agrawal 4762c6a25d
Remove ReadableAttributes (#2187)
* Remove ReadableAttributes

* Don't rewrite history

* Drift
2020-12-03 11:26:24 -08:00
Anuraag Agrawal f8b9f0ac6a
Expose BaggageEntry / Metadata as interfaces and add asMap (#2177)
* Expose BaggageEntry / Metadata as interfaces and add asMap

* Disclaimer
2020-12-02 10:40:46 -08:00
Armin Ruech 5585e73611
Remove "semver" prefix from instrumentation library version (#2180) 2020-12-02 10:29:11 -08:00
John Watson ba9f9c09a2
Fix a bug with all tracers & meters being delegated to the global tracer. (#2176) 2020-12-02 18:06:28 +09:00
Anuraag Agrawal cf5b582c5b
Replace AttributeConsumer with BiConsumer (#2174)
* Replace AttributeConsumer with BiConsumer

* Forgot to delete
2020-12-02 16:52:06 +09:00
John Watson e90a6a886b
Convert Attributes to an interface (#2134)
* Convert Attributes to an interface

* Add javadoc explaining Attributes implementation requirements.

* Convert the AttributesBuilder into an interface.

* update from upstream changes

* move the implementation class out of the interface

* clean up some javadoc that referenced non-public classes
2020-12-01 15:54:07 -08:00
Mateusz Rzeszutek dc91c95e63
Fix buildscripts/semantic-convention/generate.sh script (#2144)
* Fix buildscripts/semantic-convention/generate.sh script

Including:
* update spec version to latest commit
* regenerate SemanticAttributes

* Code review comments

* Reference spec date
2020-12-01 11:18:32 -08:00
Anuraag Agrawal 0163a8c121
Split SpanContext into interface / impl (#1935)
* Split SpanContext into interface / impl

* Remove javadoc from impl to reduce drift change.

* Add warning

* More
2020-12-01 11:06:48 -08:00
John Watson 6be633701f
Convert Labels to be an interface. (#2137)
* Convert Labels to be an interface.

* Convert the LabelsBuilder into an interface.
2020-12-01 08:46:34 -08:00
John Watson 036f7f1477
Convert TraceState to be an interface (#2138)
* convert TraceState to an interface

* don't expose the impl

* Remove the un-needed TraceState Entry objects.

* Add additional javadoc documenting requirements for interface implementors.

* make the implementation non-public

* remove un-needed test docs

* Update api/src/main/java/io/opentelemetry/api/trace/TraceState.java

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

* Update api/src/main/java/io/opentelemetry/api/trace/TraceState.java

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

* formatting fix

* Convert the TraceStateBuilder into an interface.

* Introduce an intermediate class to get around classloading cycles.

* extract a method to remove an entry from the builder

* add a comment about the possible inefficiency in the implementation

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-12-01 08:21:36 -08:00
Anuraag Agrawal 7ed6d8d4e4
Remove Status.value (#2147)
* Remove Status.value

* Deprecate for now
2020-12-01 13:46:26 +09:00
Anuraag Agrawal 052b17f9b1
Add asMap for Attributes. (#2145)
* Add asMap for Attributes.

* AttributesMap too

* Test empty too.

* checkstyle
2020-12-01 13:27:14 +09:00