* 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>
* 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>
* 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>
* 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
* 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
* 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>