Commit Graph

1163 Commits

Author SHA1 Message Date
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
John Watson bd51a606a7
Remove the obsolete HTTP_STATUS_TEXT semantic attribute. (#1679) 2020-09-22 10:52:37 -07:00
Sergei Malafeev e8d24a3aed
de-duplicate fields in TraceMultiPropagator (#1667)
* de-duplicate fields in TraceMultiPropagator

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

* reformat

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

* de-duplicate fields in DefaultContextPropagators

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

* use containsExactlyInAnyOrder

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

* use LinkedHashSet to preserve order

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-09-22 08:30:48 -07:00
John Watson 4f613da552
Reverse the precedence on Labels and Attributes to prefer the last one added, rather than the first. (#1656)
* Reverse the precedence on Labels and Attributes to prefer the last one added, rather than the first.

Note: this necessitated changing the way Resources were merged, and the way recordException was implemented.
Added an addAll method to the builder to support efficiently addition of attributes from existing attributes.

* run the formatter

* revert 2 unneeded assertion changes

* Update from rebase
2020-09-21 15:58:03 -07:00
Sergei Malafeev d080cc599b
Change built-in SpanProcessor implementations to ignore more than one shutdown call (#1668)
* Change built-in SpanProcessor implementations to ignore more than one shutdown call

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

* refactor with AtomicBoolean

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-09-21 14:04:27 -07:00
Giovanni Liva 02eef930a2
Update env var names (#1659)
* Update env var names

* Share common property names

* Add license header
2020-09-21 12:22:57 -07:00
John Watson d2b927f420
a little README update (#1669) 2020-09-21 10:38:44 -07:00
John Watson bf52c0af73
Implement the keyed-attributes proposal (#1631)
* Add a generic type for the key on the ImmutableKeyValuePairs.
This necessitated changing the `get` to `getValue` to avoid clashing with the java.util.Map interface.
Also introduced convenience sub-interfaces for consuming labels and attributes, so consumers don't have to worry about the types if they don't want to.

* Make AttributesMap not extend map, and restore the get method name for Attributes.

* key class and implementation

* key class and implementation

* The code compiles

* little tweaks

* some cleanup, tests are passing

* remove AttributeValue and clean up misc. references to it.

* clean up some unused bits

* add a TODO

* a bit of cleanup; fix a todo

* update for changes from the main branch

* Change method to get the underlying key.
Move the key creators to a AttributesKeys class.
Hide the implementation classes and replace with interface use.

* use autovalue for the key implementations

* fix javadoc issues

* update benchmark keys, and a few tweaks from PR review

* Add javadoc notes to encourage using the lower-overhead attribute options.

* Add javadoc clarifying subclass responsibilities around empty keys.

* make the compareTo on AttributeKeyImpl null-safe, for extra safety

* fix formatting
2020-09-21 08:52:40 -07:00
dengliming c571e96bd8
Rename ProbabilitySampler to TraceIdRatioBased (#1666) 2020-09-20 10:40:10 +09:00
John Watson 27090b8336
Switch to java 8 (#1665)
* switch to java 8

* update the READMEs and use Object.equals in a couple of cases to test that we're really compiling for java 8/android 24.

* formatting

* use the newer release options for the build, and change the int test to not be java 7 any more.

* switch back to source/target compatibility

* sure wish I could run docker locally to test this out.
2020-09-19 11:28:13 +09:00
Eunice Kim 0ec2914275
Updated sampling result name (#1661)
* Changed all sampling result names

* Changed all sampling result names - spanbuilderSdkTest

* Changed all sampling result names

* Changed all sampling result names - spanbuilderSdkTest

* fixed formatting violations

* fixed formatting violations

* Update sdk/tracing/src/main/java/io/opentelemetry/sdk/trace/Sampler.java

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

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-09-18 10:36:56 -07:00
Jason Liu 51e93f7273
SDK: Remove Javadocs since tags (for pre 1.0 release) (#1650)
* Add since for SDK (corresponding to the version in API)

* Add since based on release branches

* Remove all since tags in SDK
2020-09-17 13:09:08 +09:00
John Watson 8470d6aaad
remote instructions on generating javadoc (#1654)
add a link in the README to the examples
2020-09-17 13:07:58 +09:00
Giovanni Liva 2f9443b3eb
Case-insensitive names for metric instruments (#1643)
* Fix case-insensitive

* s/NAME_MAX_LENGTH/METRIC_NAME_MAX_LENGTH
2020-09-16 16:31:42 +09:00
Zoe ce9c966f27
Add config to allow disabling of resource providers (#1640)
* Add config to allow disabling of resource providers
2020-09-16 07:47:40 +09:00
Anuraag Agrawal a4cd21ff49
Return result in OpenTelemeterySdk.forceFlush (#1639) 2020-09-14 09:45:54 -07:00
Markus Gaisbauer f2dab17fe5
Fix typo in JavaDoc of TextMapPropagator (#1641) 2020-09-14 09:37:55 -07:00
John Watson ddb38970fa
Move the TraceFlags isSampled boolean into the SpanContext (#1628)
* move TraceFlags into the SpanContext, and expose the relevant flags.

* Cleanup from rebase from main branch

* Address comments from PR review

* Update extensions/trace_propagators/src/main/java/io/opentelemetry/extensions/trace/propagation/AwsXRayPropagator.java

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

* Undo @anuraaga's bad suggestion. ;)

* change the traceFlags input to the TraceContext be a byte, rather than a boolean.

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-09-14 09:28:08 -07:00
Anuraag Agrawal 751177f6f1
Add FaaS attributes. (#1634)
* Add FaaS attributes.

* Move to javadoc
2020-09-11 10:55:07 -07:00
John Watson cb73ccc4e7
Promote Anuraag to maintainer (#1629) 2020-09-11 09:40:12 -07:00
Sergei Malafeev d138908996
#536 add javadoc to InMemoryMetricExporter shutdown() method (#1630)
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-09-09 16:59:36 -07:00
Anuraag Agrawal 7bce323700
Add rationale.md to document design decisions that people may be curi… (#1627)
* Add rationale.md to document design decisions that people may be curious about later.

* Formatting

* OT -> OTel
2020-09-09 07:52:08 -07:00
John Watson d42d4cd9e2
Add a generic type for the key on the ImmutableKeyValuePairs. (#1619)
* Add a generic type for the key on the ImmutableKeyValuePairs.
This necessitated changing the `get` to `getValue` to avoid clashing with the java.util.Map interface.
Also introduced convenience sub-interfaces for consuming labels and attributes, so consumers don't have to worry about the types if they don't want to.

* Add some javadoc to the new interfaces.

* Make AttributesMap not extend map, and restore the get method name for Attributes.

* make ImmutableKeyValuePairs also have a parameterized key type
2020-09-08 19:18:58 -07:00
Anuraag Agrawal 46e1445868
Apply publishing configuration to all projects, including bom and allow it to work with java-platform. (#1626) 2020-09-08 18:05:22 -07:00
Sergei Malafeev f13fd58d25
#1372 Have Propagators expose only a singleton instance (#1622)
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-09-07 10:47:05 -07:00
jarebudev e38fafa610
corrected deadlineSetPerExport test (#1624) 2020-09-07 09:40:37 -07:00