* Removes one custom interface and uses BiConsumer as all the other places.
* Builder no longer needs to create new objects from parent and can reshare them.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Migrate to using gradle platform to manage dependency versions instead of global variables.
* Remove unused and fix test
* Revert test yolo
* Workaround test ordering issue by just merging them
* Spot
* Move the semantic conventions generated code into its own module
* remove un-needed dependencies
* move the semconv module to the top level, out of the API namespace
* Update README.md
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* move SemanticAttributes to a more appropriate package and deprecate the old ones in the api package.
* Apply suggestions from code review
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* 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.
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>
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>
* 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
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>
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>
* 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
* 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
* 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>
- changes the return type of the fields() method in TextMapPropagator from List<String> to Collection<String>
and updated all implementations for consistency
CHANGELOG: Invalid TraceState entries will now be ignored, rather than causing the entire TraceState to be invalidated.
* Ignore invalid usage of TraceState instead of throwing.
* Format
* Missed a test
* Make the OpenTelemetrySdk a subclass of DefaultOpenTelemetry
* Remove SPI from the explicit OpenTelemetrySdk builder usage.
Add a (super ugly) test to make sure that the clock and resource are getting set.
* Update sdk/all/src/test/java/io/opentelemetry/sdk/OpenTelemetrySdkTest.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Update sdk/all/src/test/java/io/opentelemetry/sdk/OpenTelemetrySdkTest.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* address code review comments; add tests
* Require the MeterProvider to be a MeterSdkProvider
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
CHANGELOG: Deprecated the `getCanonicalCode` method on `SpanBuilder` ; replaced with `getStatusCode`
* Some cleanup in span land.
* Clean up the SpanBuilder javadoc to match the current APIs
* Scrub mentions of canonical status code
* Deprecate the getCanonicalCode method on SpanBuilder and replace with getStatusCode
* rename an internal method to make more sense
* Update api/src/main/java/io/opentelemetry/api/trace/SpanBuilder.java
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
* Update api/src/main/java/io/opentelemetry/api/trace/SpanBuilder.java
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
* Update api/src/main/java/io/opentelemetry/api/trace/SpanBuilder.java
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
* add tests for the deprecated method
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
* Replace all assertions with AssetJ's assertThat
Remove uses of JUnit 4 and JUnit 5 assert* where a functional equivalent exists in AssertJ. JUnit 5's assertThrows remains.
Fixes#1994
* fixup! Replace all assertions with AssetJ's assertThat
* Initial implementation of a jaeger thrift exporter.
* some cleanups/renaming
* fix? the formatting
* Fix the default endpoint.
* Update exporters/jaeger_thrift/README.md
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Update exporters/jaeger_thrift/README.md
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Update exporters/jaeger_thrift/src/main/java/io/opentelemetry/exporters/jaeger/Adapter.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Update exporters/jaeger_thrift/src/main/java/io/opentelemetry/exporters/jaeger/JaegerThriftSpanExporter.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* cleanup from PR review
* fix from upstream change
* add assertions about the results of the exports
and fix the code to make sure the results were included.
* update for api repackaging
* add some fuzzing tests for the id <-> long conversions
* change SpanId interface to match the TraceId one.
* Made a test method non-public
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
Rename TraceShim factory to OpenTracingShim
Remove factory method from OpenTracingShim which used mixed pieces of the openTelemetry components.
Made the constructor for W3CBaggagePropagator private.
Updated OpenTracingShim README
* Add a method to the Baggage interface to return the current baggage in the context.
* formatting
* Fix tests broken by not clearing state
* don't try to code while overly tired. the result is scopes that aren't closed.
* remove the scope to make sure the root scope has no baggage
* Serialize the entire trace flags not only the sample bit
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Add test for more than just sampling bit in the context
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Update api/src/test/java/io/opentelemetry/trace/propagation/HttpTraceContextTest.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Extract an interface for the OpenTelemetry API to later allow an SDK to implement it.
* Cleanups
* mine
* final
* Fix shortcuts
* Fix javadoc
* More merge
* Make the baggage API fully functional in the API
and get rid of the BaggageManager that was needed previously.
* javadoc cleanup
* more javadoc cleanup
* make the ImmutableBaggage package access
* Remove getCurrentContext and withSpan from Tracer
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Remove old java7 example
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Turn the Baggage metadata into a simple wrapper for a String.
* whoops missing final modifier
* remove unneeded nullable annotation
* Remove the method to parent via Baggage.
Parenting is still implemented via the Context.
Also, renamed many old variables and method to use the new baggage name.
* update for context changeover
* Remove the method to parent via Baggage.
Parenting is still implemented via the Context.
Also, renamed many old variables and method to use the new baggage name.
* Basic implementation of baggage header extraction.
* inject implemented
* cleanup checks
* update for context changeover
* Turn the Baggage metadata into a simple wrapper for a String.
* whoops missing final modifier
* remove unneeded nullable annotation
* Remove the method to parent via Baggage.
Parenting is still implemented via the Context.
Also, renamed many old variables and method to use the new baggage name.
* small javadoc tweak
* update for context changeover
* Turn the Baggage metadata into a simple wrapper for a String.
* whoops missing final modifier
* javadoc cleanup
* use the empty metadata as the OT Shim default
* remove unneeded nullable annotation
* subsume methods from AttributesKeys to AttributeKey
* remove missed instance of AttributesKeys
* make javadoc wording more representative of method intent
* Remove Link from API, use SpanData.Link in Sampler
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Fix tracing_incubator
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Remove addLink that accepts Link interface
Currently the Link interface cannot easily be removed, used in the Sampler interface,
will do a separate PR for that.
Based on the specs we don't have to offer a "lazy" formatted Link API (was removed some time ago).
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Copy javadoc instead of reference
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
* Remove Event interface, and it's usage
Based on the specification we are not required to expose this interface or have APIs that accept this interface.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Fix links to Event
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Fix more javadocs references to Event
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
* Make setting null-valued attributes a no-op, and document that their behavior is undefined.
* also have the span itself ignore null attribute values
* Update api/src/main/java/io/opentelemetry/common/Attributes.java
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
* Set the non-null-by-default annotation on the package level for the common code.
* add no-op validating tests with a caveat
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
* check traceparent for extra trailing characters for version 00
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* add tests and make "00" a constant
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* #1674 validate version from traceparent according to spec
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* add test
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* add test
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* rename TraceVersion to WireFormatUtils
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* rename test method
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* use precalculated versions
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* get rid of unneded class
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* get rid of empty lines
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* fix style
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>