Commit Graph

1088 Commits

Author SHA1 Message Date
Carlos Alberto Cortez 69bbf6791a Bump version to 0.9.1-SNAPSHOT 2020-10-05 21:17:19 +02:00
Carlos Alberto Cortez c353dcd850 Bump version to 0.9.0 2020-10-05 21:12:55 +02:00
Bogdan Drutu 6c660d92e5
Add overload for setStatus without description, fix usages (#1754)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-05 09:05:46 -07:00
Bogdan Drutu 52477d66bd
Remove helper method withDescription from ImmutableStatus (#1752)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-05 09:04:45 -07:00
Anuraag Agrawal 21fbb36d81
Add an OpenTelemetry context mechanism. (#1658)
* Add an OpenTelemetry context mechanism.

* Moar

* Extracted interfaces

* More context

* Cleanup / tests

* Move and cleanups

* Brackets

* Add example for brave context interop

* Brave in OTel

* Spotless

* Missing folder

* Another

* Spotless
2020-10-05 17:03:11 +09:00
Anuraag Agrawal ed169645f7
Migrate to spotless (#1748)
* Use spotless for formatting / license check

* Apply formatting

* README

* Apply to example

* google-java-format 1.8 for now

* google-java-format 1.7 for now (last supporting Java 8)
2020-10-05 16:41:21 +09:00
Bogdan Drutu eb4a18febc
Remove Status object from API, keep StatusCanonicalCode (#1741)
* Remove Status object from API, keep StatusCanonicalCode

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

* Respond to comments, change more old usages

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

* Fix build, run gojf

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-05 11:33:40 +09:00
Ioannis Mavroukakis 42cdff446c
subsume methods from AttributesKeys to AttributeKey (#1743)
* subsume methods from AttributesKeys to AttributeKey

* remove missed instance of AttributesKeys

* make javadoc wording more representative of method intent
2020-10-04 10:41:37 -07:00
Bogdan Drutu 50a8fbff30
Remove unnecessary methods from api/internal (#1747)
* Remove unnecessary methods from api/internal

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

* Make sdk/StringUtils package protected

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-04 09:50:34 -07:00
Bogdan Drutu 5f5da23add
Fix reference to correlation context (#1746)
* Fix reference to correlation context

Also fix the README components list to use English sentences.

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

* Fix sdk extensions

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

* Fix opentracing shim sentence

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-04 09:05:42 -07:00
Bogdan Drutu b93d1a4d55
Remove Link from API, use SpanData.Link in Sampler (#1739)
* 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>
2020-10-02 10:42:22 -07:00
Bogdan Drutu a706fb3350
Rename EventImpl to ImmutableEvent (#1738)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-02 08:56:12 -07:00
Anuraag Agrawal 9c6f1ff031
Increase deadline for deadline test. (#1736)
* Increase deadline for deadline test.

* Format
2020-10-02 08:39:42 -07:00
dengliming 71ba8e1b87
Use the concise license header without the year (#1623)
* Use the concise license header without the year

* Use the concise license header without the year
2020-10-02 22:42:53 +09:00
Bogdan Drutu 391043fa1f
Remove redundant type argument conversion (#1734)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-01 18:41:56 -07:00
John Watson 0746ddbf68
Expose a new TracerSdkManagement interface on the OpenTelemetrySdk class. (#1723)
* have the TracerSdkProvider return the public interface, rather than a package-access class.

* change the OpenTelemetrySdk to return a management interface, rather than the SDK implementation class directly.

* formatting fix

* rename methods/parameters for the new interface
get rid of almost all production-code references to the TracerSdkProvider

* update some docs that still refer to using the old method/class
2020-10-02 10:39:07 +09:00
Bogdan Drutu 790018f004
Remove addLink that accepts Link interface (#1732)
* 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>
2020-10-01 18:24:02 -07:00
Bogdan Drutu b78fbb31fa
Remove Event interface, and it's usage (#1733)
* 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>
2020-10-02 10:05:28 +09:00
David Poncelow 64c2b8cc65
initial commit of logging support extension (#1524)
* initial commit of logging support extension

* complete move from extensions to sdk_extensions

* address code review comments

* move logging_support to logging/support

* missed test update in last commit

* code format

* change list to queue in implementation, collection in api

* missed making a utility method static

* fix a broken test

* Update sdk_extensions/logging/support/src/main/java/io/opentelemetry/logging/api/LogRecord.java

Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>

* reworked to align with how we batch process spans

* move of CompletableResultCode and formatting

* update AnyValue to use long instead of int

* address code review comments

rename Exporter to LogExporter, move to 'export' package
rename LogExporter.accept(data) to LogExporter.export(data)
decrease flush interval from 5000 to 200ms
return CompletableResultCode from LogExporter.shutdown()
change traceId and spanId types to String from byte[]

* implement BatchLogProcessor.fromConfigMap

* rearrange packages

* add readme

* respond to review feedback, refactored BatchLogProcessor

* added a couple tests

* update to use new Attributes, remove support directory, public LogRecord getters

Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
2020-10-01 16:08:47 +09:00
Anuraag Agrawal 68cb1640ad
Disable cache action remote proxy (#1731) 2020-10-01 11:39:40 +09:00
Anuraag Agrawal 7fe2cd55be
Use awaitility / higher timeout to reduce flakiness. (#1729) 2020-09-30 08:21:24 -07:00
John Watson 231ca02400
Make setting null-valued attributes a no-op, and document that their behavior is undefined. (#1706)
* 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>
2020-09-30 08:08:32 -07:00
Bogdan Drutu 5fa1dbab87
Remove Descriptor from metrics data to be consistent with proto (#1716)
* Remove Descriptor from metrics data to be consistent with proto

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

* Remove references to descriptor

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-09-30 08:07:48 -07:00
Anuraag Agrawal 21aa8afe7f
Add GitHub Actions continuous build to replace CircleCI. (#1730) 2020-09-30 08:06:45 -07:00
Sergei Malafeev c577ee17f7
check traceparent for extra trailing characters for version 00 (#1727)
* 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>
2020-09-30 08:01:46 -07:00
John Watson 9b3222f0b8
update the zipkin and jaeger attributes for the instrumentation library info (#1724)
* update the zipkin and jaeger attributes for the instrumentation library info

* fix the wrong name change
2020-09-30 14:44:30 +09:00
Bogdan Drutu 42aa9ae671
Fix wrong usage of tracing in the sdk's module name trace package (#1715)
* Fix wrong usage of tracing in the sdk trace package

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

* Revert description change

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-09-29 08:20:39 +09:00
John Watson 2959fae1cc
fix the backwards TLS/insecure config options (#1725) 2020-09-29 08:04:23 +09:00
John Watson 287eae9e5c
Update for the more restricted span status codes. (#1701)
* Update for the more restricted span status codes.

* Update status codes to match the proposed proto codes
2020-09-28 10:42:44 -07:00
Nikita Salnikov-Tarnovski e7706d63f9
Fix type for REDIS_DATABASE_INDEX semantic attribute (#1720) 2020-09-28 08:31:55 -07:00
Lei Wang 056e63f354
support aws eks attributes (#1671)
* support aws eks attributes

* call k8s api by java native sdk

* fix code review

* fix code review

* fix code review
2020-09-27 12:24:26 -07:00
Anuraag Agrawal 8b7ea5e366
Add overrides to allow using a long key with an int value. (#1713) 2020-09-27 12:54:24 +09:00
Bogdan Drutu 840ae850ec
Rename CorrelationContext with Baggage (#1691)
* Rename CorrelationContext with Baggage

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

* Fix review comments

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

* Rename contextBuildet to baggageBuilder

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-09-26 08:42:01 -07:00
John Watson 12af6d9fdf
Change the default Propagator in the API to be a no-op (#1709) 2020-09-26 08:34:19 -07:00
John Watson c0969d4680
Remove an unused import from the examples. (#1708) 2020-09-26 15:04:20 +09:00
Christian Neumüller 83b9ba5701
Implement spec change to only accept Context as span parent. (#1611)
* Prototype for Context as span parent.

* Simplify ZipkinSpanExporterEndToEndHttpTest.

* Minimize PR diff.

* Make Codecov happy.

* Fix overcomplicated DefaultTracer.

* Fix build after merge.

* Fix build after merge.

* Revert storage of full Context.

* Lint.

* Clean up OpenTracing SpanBuilderShim.

* Rename Context -> RequestHandlerContext in testbed.
2020-09-25 11:37:37 +09:00
Sergei Malafeev 5498ab2b82
validate version from traceparent according to spec (#1688)
* #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>
2020-09-25 09:05:29 +09:00
Sergei Malafeev fa8b9e1e58
add OpenTracing Shim usage (#1697)
* add OpenTracing Shim usage

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

* specify 2 options to expose tracer

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

* Update opentracing_shim/README.md

Co-authored-by: John Watson <jkwatson@gmail.com>

* Update opentracing_shim/README.md

Co-authored-by: John Watson <jkwatson@gmail.com>

* Update opentracing_shim/README.md

Co-authored-by: John Watson <jkwatson@gmail.com>

* Update opentracing_shim/README.md

Co-authored-by: John Watson <jkwatson@gmail.com>

* Update opentracing_shim/README.md

Co-authored-by: John Watson <jkwatson@gmail.com>

Co-authored-by: John Watson <jkwatson@gmail.com>
2020-09-24 11:19:36 -07:00
Anuraag Agrawal 10ea529fff
Fill cloud.provider for AWS resources. (#1696)
* Fill cloud.provider for AWS resources.

* Extract constant.
2020-09-24 08:16:22 -07:00
Anuraag Agrawal f63c84f4e8
Add incubator module with utilities for mutating SpanData. (#1625)
* Add incubator module with utilities for mutating SpanData.

* Finish
2020-09-24 08:11:55 -07:00
Anuraag Agrawal 903193cda6
Log EC2Resource messages at FINE. (#1695) 2020-09-24 08:10:01 -07:00
Bogdan Drutu 3d72a7d86d
Avoid usage of getSpanWithoutDefault when possible. (#1690)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-09-24 15:17:12 +09:00
Bogdan Drutu 2d146bbbb9
Remove constant labels from instruments and MetricData (#1692)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-09-24 15:14:04 +09:00
John Watson 0b8a2dadbd
round the zipkin span duration up to 1 microsecond, if it's zero. (#1694)
* round the zipkin span duration up to 1 microsecond, if it's zero.

* fix formatting
2020-09-23 18:29:07 -07:00
John Watson 8157af01a1
Update zipkin attribute names to match the spec. (#1693)
* Update zipkin attribute names to match the spec.

* remove out of date comment.
2020-09-23 18:28:44 -07:00
Christian Neumüller d9bd619b55
Add exception.escaped, clean up exception attributes javadoc. (#1672) 2020-09-23 08:50:49 -07:00
Sergei Malafeev f8725333b8
Add w3c context propagation tests (#1653)
* Add w3c context propagation tests

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

* add sleep for printing test results

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

* add Environmental requirements

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

* use far jar to run

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

* run integration tests in circleci

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

* change image

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

* reformat

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

* pip3 to pip

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

* upgrade pip

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

* missing colon

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

* install pip3

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

* do not install pip3

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

* install python 3 and pip3

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

* install python 3 and pip3

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

* install python 3 and pip3

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

* install python 3 and pip3

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

* install python 3 and pip3

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

* install python 3 and pip3

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

* add /usr/local/bin to PATH

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

* call /usr/local/bin/pip3 to PATH

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

* get rid of automation

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

* refactor extractor to pass more tests

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-09-23 08:26:38 -07:00
John Watson 909beb0e3d
Fix example code for 0.8.0, non-snapshot dependency (#1681)
* Update the examples for the 0.9.0-SNAPSHOT changes

* revert back to 0.8.0, non-snapshot
2020-09-23 15:12:48 +09:00
John Watson 136d5b9b7f
Make the getKey method non-nullable (#1682)
This was done by tricking AutoValue with a separate field for the storage.
2020-09-22 21:30:23 -07:00
Jason Plumb cfbe6bfe81
Rename dangling references to MeterRegistry (#1683)
* rename getMeterRegistry() to getMeterProvider() in javadocs.

* rename meterRegistry variable to meterProvider

* reformat
2020-09-22 19:37:47 -07:00