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

Add /pods endpoint support in kubeletstats receiver to add extra labels #569

Merged

Conversation

dmitryax
Copy link
Member

Description:
This commits adds ability to optionally fetch extra metadata from /pods endpoint in kubeletstats receiver and use that data to set additional labels on metric resource. For now only container.id label is supported

Testing: Unit tests and manual testing

Documentation: Additional section in README.md

@dmitryax dmitryax requested a review from a team as a code owner July 27, 2020 21:04
@project-bot project-bot bot added this to In progress in Collector Jul 27, 2020
@codecov
Copy link

codecov bot commented Jul 27, 2020

Codecov Report

Merging #569 into master will increase coverage by 15.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #569       +/-   ##
===========================================
+ Coverage   71.09%   86.13%   +15.03%     
===========================================
  Files          14      189      +175     
  Lines         602    10213     +9611     
===========================================
+ Hits          428     8797     +8369     
- Misses        150     1093      +943     
- Partials       24      323      +299     
Flag Coverage Δ
#integration 71.09% <ø> (ø)
#unit 85.96% <100.00%> (?)

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

Impacted Files Coverage Δ
receiver/kubeletstatsreceiver/factory.go 100.00% <100.00%> (ø)
...ceiver/kubeletstatsreceiver/kubelet/accumulator.go 100.00% <100.00%> (ø)
receiver/kubeletstatsreceiver/kubelet/client.go 95.83% <100.00%> (ø)
receiver/kubeletstatsreceiver/kubelet/metadata.go 100.00% <100.00%> (ø)
.../kubeletstatsreceiver/kubelet/metadata_provider.go 100.00% <100.00%> (ø)
receiver/kubeletstatsreceiver/kubelet/metrics.go 100.00% <100.00%> (ø)
receiver/kubeletstatsreceiver/kubelet/resource.go 100.00% <100.00%> (ø)
receiver/kubeletstatsreceiver/receiver.go 80.00% <100.00%> (ø)
receiver/kubeletstatsreceiver/runnable.go 100.00% <100.00%> (ø)
exporter/newrelicexporter/transformer.go 94.84% <0.00%> (ø)
... and 179 more

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 b0e40a0...0e49957. Read the comment docs.

@dmitryax dmitryax force-pushed the kubeletstats-container-id branch 3 times, most recently from d768350 to 42f934c Compare July 27, 2020 22:51
Copy link
Member

@pmcollins pmcollins left a comment

Choose a reason for hiding this comment

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

LGTM Dmitrii, thanks for taking care of this.

This commits adds ability to optionally fetch extra metadata from /pods endpoint in kubeletstats receiver and use that data to set additional labels on metric resource. For now only container.id label is supported
Collector automation moved this from In progress to Reviewer approved Jul 28, 2020
@bogdandrutu bogdandrutu merged commit 5913a7a into open-telemetry:master Jul 28, 2020
Collector automation moved this from Reviewer approved to Done Jul 28, 2020
dyladan referenced this pull request in dynatrace-oss-contrib/opentelemetry-collector-contrib Jan 29, 2021
Fix build links
ljmsc referenced this pull request in ljmsc/opentelemetry-collector-contrib Feb 21, 2022
This PR changes the circleci build config to build the project in both go-1.13 and go-1.14 versions.

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Collector
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants