Commit Graph

1088 Commits

Author SHA1 Message Date
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
Anuraag Agrawal c3a893a88c
Remove auto-config (#1620) 2020-09-03 18:01:05 -07:00
John Watson 485cc52c6f
SpanContext hides the TraceId/SpanId implementations (#1594)
*  This is a combination of 2 commits.
 This is the 1st commit message:

WIP on converting to String-based SpanContext

don't hand out the byte arrays publicly, but require making copies

make sure to hand out fresh invalid byte arrays.

Use strings for span and trace ids.

Switch over to CharSequence instead of String for the ids

Fix a couple of places that were casting to String

Add some simple wrappers for the generated longs to save converting until the last moment to the character-based representation.

introduce a reusable threadlocal char buffer for generating random ids.

update for changes from upstream

Change the SpanContext to store the ids as Strings internally
Change the id access methods on SpanContext to be clearly labeled as the base16 representations
Add a new create method that allows specifying offsets for traceId and spanId CharSequences

Provide an option for creating a SpanContext from longs or Strings, optionally.

fix a typo

update from upstream

 The commit message #2 will be skipped:

 don't hand out the byte arrays publicly, but require making copies

* WIP on converting to String-based SpanContext

* Update the SpanContext to only store Strings internally for Trace and Span ids.

* remove dead files

* cleanup some CharSequence usages to String

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

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

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

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

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

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

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

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

* updates from PR suggestion fubars

* some cleanup from PR feedback

* Switch back to String from CharSequence

* Get rid of the overload with the offsets

* Lots of bits of cleanup from PR feedback.

* more renaming of base16 to hex

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-09-03 10:03:41 -07:00
Giovanni Liva 304f55a7ab
Remove link and parent sampling decision from Probability sampler (#1557)
* Remove link and parent sampling decision from Probability sampler

* Update tests to ParentBased
2020-09-03 10:00:52 -07:00
John Watson 721a7cdf2e
Create a simple example of using the OTLP exporters (#1616)
* Create a simple otlp example, with a docker-compose collector setup.

* Add metrics into the example

* formatting

* remove the go metrics load generator

* remove unneeded pieces of the docker config; switch to using the BSP in the example code.

* Update examples/otlp/docker/otel-collector-config-demo.yaml

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

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-09-02 20:17:24 -07:00
John Watson 22b8837dba
Add some clarifying notes to the release instructions. (#1618) 2020-09-02 14:22:37 -07:00
Christian Neumüller 8418753af7
Fix noParent being ignored after explicit parent. (#1617) 2020-09-02 10:28:44 -07:00
John Watson 225acce822
Update the README and CHANGELOG for 0.8.0 (#1614)
* draft of the changelog for 0.8.0

* add the proto/otlp exporter update

* update the README for 0.8.0

* a couple more updates
2020-09-01 13:25:33 -07:00
Bogdan Drutu 8b81baff9c
Update readme to be consistent with other repos (#1615) 2020-09-01 13:20:26 -07:00
John Watson 11ea60563d
Start the 0.9.0 development cycle (#1612) 2020-09-01 12:27:48 -07:00
Anuraag Agrawal 69478c2d8b
Update opentelemetry-proto to latest version. (#1600)
* Update opentelemetry-proto

* Fix SDK

* Update proto
2020-09-01 08:35:06 -07:00
Anuraag Agrawal c325736b16
Fix typo in metrics export error message (#1610) 2020-09-01 08:31:08 -07:00
sullis 7c6b100381
enable Dependabot v2 (#1605)
https://github.blog/2020-06-01-keep-all-your-packages-up-to-date-with-dependabot/
2020-08-31 18:44:34 -07:00
sullis 3af4b35bfa
add Gradle wrapper validation (#1606)
https://blog.gradle.org/gradle-wrapper-checksum-verification-github-action
2020-08-31 08:31:32 -07:00
John Watson 0024aa9bee
Fix for a mashed up PR merge. (#1602) 2020-08-28 18:39:12 -07:00
dengliming ed08e9f287
Add an overload to the recordException method to support additional attributes (#1599)
* Add an overload to the recordException method to support additional attributes

* Fix Codecov

* Fix review

* Fix review
2020-08-28 12:41:36 -07:00
Anuraag Agrawal c6c179c267
Make sure forceFlush / shutdown can have callers wait for them to be done by returning CompletableResultCode. (#1571)
* Make sure forceFlush / shutdown can have callers wait for them to be done by returning CompletableResultCode.

* Merge
2020-08-28 10:51:39 -07:00
dengliming f680094039
Rename ParentOrElse to ParentBased and generalize to support all cases (#1577)
* Rename ParentOrElse to ParentBased

* Update samplers to match spec.

* Fix check style

* Fix check style

* Fix review

* Separate test for parentOrElse sampler

* Provide ParentBased.Builder

* Fix code style

* Fix java doc.

* Update javadoc

* Builder use set instead of with

* Rename newParentBasedBuilder to parentBasedBuilder
2020-08-28 10:43:38 -07:00
Anuraag Agrawal bac71938bc
Use asyncronous calls for exporting from Zipkin and Jaeger exporters. (#1596) 2020-08-27 12:10:38 -07:00
John Watson ef7796a962
Clean up and update the examples for the latest API changes. (#1593) 2020-08-27 11:28:52 -07:00
John Watson c3ac67bb85
Preserve the ParentOrElse behavior when changing sampling probability via configuration. (#1595) 2020-08-27 10:13:48 -07:00
John Watson a021a59b94
Update metric description in the BatchSpanProcessor (#1592) 2020-08-26 08:44:24 -07:00
Nikita Salnikov-Tarnovski af39f35086
More aggresive version of BatchSpanProcessor (#1579)
* More aggresive version of BatchSpanProcessor

* Add benchmark

* Polish

* Polish

* Incorporated some changes from #1571

* Rollback one test change

* Polish

* Polish
2020-08-26 08:22:39 -07:00
Sergei Malafeev 88582202c4
Rename 'HttpTextFormat' to 'TextMapPropagator' (#1586)
* #1581 Rename 'HttpTextFormat' to 'TextMapPropagator'

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

* fix long line

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

* add change log entry

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

* add change log entry

Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
2020-08-26 08:19:48 -07:00
jarebudev 20669f48b6
1556 change resourceconstants to resourceattributes (#1590)
* renamed ResourceConstants to ResourceAttributes, and change to use attributesetter pattern

* tidy up javadoc

* tidy up javadoc
2020-08-25 21:08:44 -07:00
John Watson 1175997dd1
Remove two unused internal methods. (#1591) 2020-08-25 21:06:31 -07:00