Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[resourcedetectionprocessor] Add task revision to ECS resource detector #2814

Merged
merged 2 commits into from
Mar 24, 2021

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Mar 22, 2021

Description:

Add task Revision field, defined as

The revision of the Amazon ECS task definition for the task.

It is available in both the v3 and v4 endpoints.

Link to tracking Issue: n/a

Testing: Updated unit tests.

Documentation: Added to README

@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #2814 (c7adeb5) into main (4013aed) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2814   +/-   ##
=======================================
  Coverage   91.57%   91.57%           
=======================================
  Files         447      447           
  Lines       22077    22078    +1     
=======================================
+ Hits        20216    20217    +1     
  Misses       1392     1392           
  Partials      469      469           
Flag Coverage Δ
integration 69.15% <ø> (+0.06%) ⬆️
unit 90.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...etectionprocessor/internal/aws/ecs/metadata_ecs.go 69.23% <ø> (ø)
...resourcedetectionprocessor/internal/aws/ecs/ecs.go 85.48% <100.00%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4013aed...c7adeb5. Read the comment docs.

@mx-psi mx-psi marked this pull request as ready for review March 22, 2021 14:51
@mx-psi mx-psi requested a review from a team March 22, 2021 14:51
@@ -65,6 +65,7 @@ ec2:
* aws.ecs.cluster.arn
* aws.ecs.task.arn
* aws.ecs.task.family
* aws.ecs.task.revision
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 70 to +72
attr.InsertString("aws.ecs.task.arn", tmdeResp.TaskARN)
attr.InsertString("aws.ecs.task.family", tmdeResp.Family)
attr.InsertString("aws.ecs.task.revision", tmdeResp.Revision)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please define these in go.opentelemetry.io/collector/translator/conventions

Copy link
Member Author

@mx-psi mx-psi Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open-telemetry/opentelemetry-collector#2816, waiting on the spec PR to mark as ready. I will do a PR to update all these strings once that is merged

@tigrannajaryan tigrannajaryan merged commit 7bf2298 into open-telemetry:main Mar 24, 2021
@mx-psi mx-psi deleted the mx-psi/ecs-task-revision branch March 24, 2021 15:30
pmatyjasek-sumo referenced this pull request in pmatyjasek-sumo/opentelemetry-collector-contrib Apr 28, 2021
…or (#2814)

Add task `Revision` field, defined as

> The revision of the Amazon ECS task definition for the task.

It is available in both the [v3](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v3.html) and [v4](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v4.html) endpoints.

**Link to tracking Issue:** n/a

**Testing:** Updated unit tests.

**Documentation:** Added to README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants