Commit Graph

53 Commits

Author SHA1 Message Date
Felix Scheinost b5ef538e5e
Improve detection of resource attributes on ECS (#4574)
* Improve detection of resource attributes on ECS

This improves the detection of resource attributes on ECS by fetching ECS metadata from `ECS_CONTAINER_METADATA_URI` or `ECS_CONTAINER_METADATA_URI_V4`.

Previously only `CONTAINER_NAME` and `CONTAINER_ID` id were set.

Now we set:

- CONTAINER_ID
- CONTAINER_NAME
- AWS_ECS_CONTAINER_ARN
- CONTAINER_IMAGE_NAME
- CONTAINER_IMAGE_TAG
- aws.ecs.container.image.id
- AWS_LOG_GROUP_ARNS
- AWS_LOG_GROUP_NAMES
- AWS_LOG_STREAM_NAMES
- AWS_ECS_TASK_ARN
- AWS_ECS_TASK_FAMILY
- AWS_ECS_TASK_REVISION

Especially AWS_LOG_GROUP_ARNS is important so that connection of traces to logs works OOTB on X-Ray.

* Change „24“ to „26“ in fixtures for consistency

`CONTAINER_NAME` and `AWS_ECS_TASK_REVISION` should match

* Implement a few more attributes, fix ARNs

This commit adds implementations for the `aws.ecs.launchtype`
and `aws.logs.stream.arns` attributes, as well as fixing
the generation of log group ARNs.

* EcsResource: Record log group without trailing :*

Both with and without trailing `:*` are valid formats but there is a bug in the OpenTelementry collector which can’t handle the trailing `:*` (for now) (see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/13702)

So remove addition of the trailing `:*` for now.

Co-authored-by: Michele Mancioppi <michelem@lumigo.io>
2022-09-08 10:20:58 -05:00
Trask Stalnaker cd2583df6a
Add misspell check (and fix misspellings) (#4290)
* Add misspell check

* Fix misspellings

* Spotless
2022-03-22 15:12:40 +09:00
Anuraag Agrawal 47f7c38ef5
Enable loggers in all tests via slf4j. (#4126)
* Route all test jul logging through slf4j.

* Cleanup and more suppressions
2022-02-02 14:43:25 +09:00
Anuraag Agrawal 03c41ec940
Add a testing-internal module and functionality to SuppressLogger for… (#4130)
* Improve behavior of some tests (#4123)

* Optimize

* Fix logging.properties

* Clean
2022-02-01 16:04:39 +09:00
Anuraag Agrawal dfb4a74ac5
Update errorprone (#4048) 2022-01-06 11:33:00 +09:00
Anuraag Agrawal 57106be7ff
Use OkHttp for AWS resource detectors (#3991) 2021-12-15 11:17:36 +09:00
Anuraag Agrawal 1c1d26483b
Populate cloud.platform in aws resources (#3902) 2021-11-19 11:43:40 +09:00
Anuraag Agrawal 2187950bf8
Replace single usage of databind in AWS extension with parsing (#3774) 2021-10-20 12:49:38 +09:00
Anuraag Agrawal 7c3e22efbc
Fix more nullness (#3655)
* Fix more nullness

* Actually not that improbable

* Null check

* Cleanup
2021-09-28 09:24:42 +09:00
Anuraag Agrawal 98fdf9b4bc
Move ConfigProperties / ConfigurationException to SPI package and consistently pass ConfigProperties (#3558) 2021-08-31 12:55:36 +09:00
Anuraag Agrawal 6ef3091cfb
Copy in spotless-conventions from instrumentation repo (#3554)
* Copy in spotless-conventions from instrumentation repo.

* Reformat

* A few more dotfiles
2021-08-27 08:28:31 -07:00
jack-berg 58c16a9133
Add missing readmes and missing javadoc links (#3500) 2021-08-16 12:36:54 -07:00
jack-berg dd84ccaec7
Fix javadoc (#3499)
* Add javadoc links for otlp-http modules

* Fix otlp module javadoc links

* Fix logging exporter javadoc link

* Fix jaeger exporters javadoc links

* Fix prometheus exporter javadoc link

* Fix zipkin exporter javadoc link

* Fix extension annotations javadoc link

* Fix extension trace propagators javadoc links

* Fix sdk-extensions aws javadoc link

* Fix sdk-extensions async-processor javadoc links
2021-08-16 10:35:42 -07:00
Anuraag Agrawal 87f2b5e0a8
Update error-prone (#3485) 2021-08-13 09:44:29 -07:00
Anuraag Agrawal 08690412c0
Deprecate AwsXrayIdGenerator (#3478) 2021-08-13 09:18:13 -07:00
Trask Stalnaker 60c3c5ca0c
Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09:00
Anuraag Agrawal f90040579e
Allow users to access the default Clock and TestClock (#3363)
* Allow users to access the default Clock and TestClock

* Update TestClock API

* Doc

* Fix

* html

* Less newlines

* Update sdk/common/src/main/java/io/opentelemetry/sdk/common/Clock.java

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

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-07-09 11:26:55 +09:00
John Watson d8999911fc
Remove the AWS XRay sampler code (#3379)
* Remove the AWS XRay sampler code and deprecate the AwsXrayIdGenerator

* de-deprecate the AWS Xray ID Generator
2021-07-09 08:31:39 +09:00
Anuraag Agrawal a36cc90f90
Fix tests on Java 16+ and add 16/17-ea to CI. (#3370)
* Fix tests on Java 16 and add to CI.

* JDK for mockito

* Java 17
2021-07-08 13:41:29 +09:00
Anuraag Agrawal 7134da1277
Add reservoir borrowing and statistics collection to x-ray sampler. (#3355)
* Add reservoir borrowing and statistics collection to x-ray sampler.

* Cleanup
2021-06-30 11:19:58 +09:00
Anuraag Agrawal f83a9531be
Add the actual XRay remote sampler which polls rules and orders / app… (#3343)
* Add the actual XRay remote sampler which polls rules and orders / applies them.

* Test cleanup

* Don't spam logs
2021-06-27 10:46:21 +09:00
Anuraag Agrawal e81e95df78
Add logic for processing a xray remote SamplingRule (#3341)
* Add logic for processing a xray remote SamplingRule

* Cleanup
2021-06-24 08:16:23 +09:00
Anuraag Agrawal 08ec61708a
Add support for fetching xray sampling targets. (#3335)
* Add support for fetching xray sampling targets.

* Cleanup
2021-06-23 08:16:42 +09:00
Anuraag Agrawal ce9c8854c7
Extract publishing and animalsniffer plugins. (#3334) 2021-06-22 08:23:16 +09:00
Anuraag Agrawal c3614b6b23
Add support for fetching xray sampling rules. (#3331)
* Add support for fetching xray sampling rules.

* Small tweak

* Remove unused

* Cleanup

* Creators
2021-06-21 13:26:42 +09:00
John Watson df1f47d929
Add the OpenTelemetry schema URL to the Resource. (#3319)
* Add the OpenTelemetry schema URL to the Resource.

* A few cleanups from PR review.
2021-06-18 08:52:56 -07:00
Anuraag Agrawal 864508983e
Extract JMH conventions plugin. (#3324) 2021-06-17 08:37:49 -07:00
Anuraag Agrawal 7f544416e4
Define an extension for otel-specific configuration of Java. (#3317) 2021-06-17 15:54:25 +09:00
Anuraag Agrawal b9ca09b6c1
Extract java conventions plugin. (#3316) 2021-06-15 12:29:47 -07:00
Anuraag Agrawal 672330bf51
Upgrade to Gradle 7.0 (#3228) 2021-05-13 08:21:22 +09:00
Prathik Kaliyambath 5f32df7b9b
fixed docs (#3028) 2021-03-13 10:36:04 -08:00
John Watson 84052a8ce9
Update the SemanticAttributes and ResourceAttributes for specification v1.1.0 (#3016)
Note: this contains breaking changes to ResourceAttributes.
2021-03-12 07:58:48 -08:00
Anuraag Agrawal 9d4b123174
Fix AWS detectors to initialize singleton after statics (#3008) 2021-03-11 10:20:56 +09:00
Bogdan Drutu 75ea07e597
Fix more api dependencies which should be implementation (#2919)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-23 12:20:06 -08:00
Anuraag Agrawal 0730a9e79c
[Breaking Change] Move ResourceProvider SPI to autoconfigure module (#2837)
* autoconfigure

* Finish

* Refactor

* Fix OsResource to use empty

* Fix BeanstalkResource to use empty

* Fix ResourceTest to use empty

* Fix Ec2Resource to use empty

* Fix EcsResource to use empty

* Fix ProcessRuntimeResource to use empty

* Fix ProcessRuntimeResource to use empty

* Fix EksResource to use empty

* Fix LambdaResource to use empty

* Fix ProcessResource to use empty

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Bogdan Drutu <lazy@splunk.com>
2021-02-17 12:41:07 -08:00
Anuraag Agrawal e4886283a7
Migrate sdk-extensions to kts. (#2814) 2021-02-15 12:21:10 +09:00
Anuraag Agrawal 32a63fb8e3
Migrate to using gradle platform to manage dependency versions instea… (#2586)
* 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
2021-01-27 13:54:58 +09:00
John Watson 66ca483ede
Generate the ResourceAttributes class (#2540)
* Generate the ResourceAttributes class
* deprecate the old one
* convert usages to the new one

* re-use the template with some special logic for the addition

* deprecate the old resource attributes in the wrong class
2021-01-19 23:02:11 -08:00
Anuraag Agrawal adbed0c0fd
Remove remaining 0.14.0 deprecated stuff. (#2544) 2021-01-19 09:21:44 -08:00
Anuraag Agrawal d8c4c86790
Return singleton xray id generator (#2447) 2021-01-07 10:36:57 -08:00
John Watson 015708b7a7
Move the semantic conventions generated code into its own module (#2423)
* 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>
2021-01-06 08:25:17 -08:00
Anuraag Agrawal 8dfdce3fe9
Use http helper class in EC2 Resource. (#2355)
* Use http helper class in EC2 Resource.

* No more todo
2020-12-21 12:01:57 +09:00
Anuraag Agrawal 6954d1f624
Use normal filesystem-based Gradle paths. (#2332)
* Use normal filesystem-based Gradle paths.

* Update workflow by making agnostic to jacoco project name

* More merge
2020-12-18 12:07:33 +09: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 05a2049095
Test AWS HttpClient TLS connection (#2308) 2020-12-16 14:38:29 +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
Anuraag Agrawal 4403923bed
Migrate AWS mock server tests to junit5. (#2287) 2020-12-14 10:20:19 -08: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
Anuraag Agrawal 4762c6a25d
Remove ReadableAttributes (#2187)
* Remove ReadableAttributes

* Don't rewrite history

* Drift
2020-12-03 11:26:24 -08:00
Mateusz Rzeszutek 8bcfaa46bc
Add support for AWS Lambda resource attributes (#2142)
* Add support for AWS Lambda resource attributes

* Fix after rebase

* Minor refactor

* Minor refactor

* Minor refactor
2020-12-02 13:36:44 +09:00