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

[AWS ECS container receiver]Add new metric for stopped container #2383

Merged
merged 10 commits into from
Mar 11, 2021

Conversation

JohnWu20
Copy link
Contributor

Description:
The processors and exporters will drop the data which only has the resource data but without metric data. However, for our ecs container receiver, we get only resource data when the container stopped. We need this data export to backend, so this pr will add a new metric called container.duration to calculate the container's running time for the stopped containers.

Testing:
Unit Test, and local test.

@codecov
Copy link

codecov bot commented Feb 20, 2021

Codecov Report

Merging #2383 (343472c) into main (f45aa80) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2383   +/-   ##
=======================================
  Coverage   90.95%   90.95%           
=======================================
  Files         411      411           
  Lines       20533    20546   +13     
=======================================
+ Hits        18675    18687   +12     
- Misses       1397     1398    +1     
  Partials      461      461           
Flag Coverage Δ
integration 69.22% <ø> (ø)
unit 89.80% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...ricsreceiver/awsecscontainermetrics/accumulator.go 100.00% <100.00%> (ø)
...tricsreceiver/awsecscontainermetrics/translator.go 100.00% <100.00%> (ø)
receiver/carbonreceiver/transport/tcp_server.go 66.00% <0.00%> (-1.00%) ⬇️

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 f45aa80...343472c. Read the comment docs.

@JohnWu20
Copy link
Contributor Author

Can we get this pr merged?

@bogdandrutu
Copy link
Member

@JohnWu20 this is a small hack, we probably should handle this differently in the future. Before merging I want to make sure that you are ok to change this in case we find a better solution to report this.

@JohnWu20
Copy link
Contributor Author

JohnWu20 commented Mar 5, 2021

Sure, I am OK to change this if we have better solutions in the future.

@JohnWu20
Copy link
Contributor Author

JohnWu20 commented Mar 8, 2021

This pr has got approved for a lot of days, can we get it merge now? @bogdandrutu

@bogdandrutu bogdandrutu merged commit 0358399 into open-telemetry:main Mar 11, 2021
kisieland referenced this pull request in kisieland/opentelemetry-collector-contrib Mar 16, 2021
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
pmatyjasek-sumo referenced this pull request in pmatyjasek-sumo/opentelemetry-collector-contrib Apr 28, 2021
* [AWS ECS container receiver]Add new metric for stopped container

* [AWS ECS container receiver]Add new metric for stopped container

* variable name chang

* add more test cases

* Add unit tests

* re-run unit test

* Solve the file conflict

* Update the layout
ljmsc referenced this pull request in ljmsc/opentelemetry-collector-contrib Feb 21, 2022
…2383)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
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.

5 participants