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

observer extension: Add generic endpoint watcher #427

Merged
merged 5 commits into from Jul 15, 2020

Conversation

asuresh4
Copy link
Member

@asuresh4 asuresh4 commented Jul 10, 2020

Description: Add EndpointsWatcher, a struct with utilities required to poll and track endpoints in a generic manner. It is an implementation of observer.Observable and will help in abstracting some logic that's required by poll based observers. This struct is meant to be embedded by observers that list observer.Endpoint. Will also open a separate PR with changes that make use of this update.

The diff also has some minor refactoring.

Testing: Added unit tests.

Documentation: Added inline comments.

@asuresh4 asuresh4 requested a review from a team as a code owner July 10, 2020 23:02
@project-bot project-bot bot added this to In progress in Collector Jul 10, 2020
extension/observer/endpointswatcher.go Outdated Show resolved Hide resolved
extension/observer/endpointswatcher.go Outdated Show resolved Hide resolved
extension/observer/endpointswatcher.go Show resolved Hide resolved
extension/observer/endpointswatcher.go Outdated Show resolved Hide resolved
extension/observer/endpointswatcher.go Show resolved Hide resolved
extension/observer/endpoints.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 13, 2020

Codecov Report

Merging #427 into master will increase coverage by 0.08%.
The diff coverage is 95.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #427      +/-   ##
==========================================
+ Coverage   84.71%   84.80%   +0.08%     
==========================================
  Files         174      176       +2     
  Lines        9389     9436      +47     
==========================================
+ Hits         7954     8002      +48     
  Misses       1113     1113              
+ Partials      322      321       -1     
Flag Coverage Δ
#integration 71.09% <ø> (ø)
#unit 84.60% <95.55%> (+0.08%) ⬆️
Impacted Files Coverage Δ
extension/observer/endpoints.go 93.75% <93.75%> (ø)
extension/observer/endpointswatcher.go 94.87% <94.87%> (ø)
extension/observer/k8sobserver/handler.go 75.86% <100.00%> (+1.47%) ⬆️
receiver/receivercreator/config_expansion.go 84.31% <100.00%> (ø)
receiver/receivercreator/observerhandler.go 66.12% <100.00%> (+4.83%) ⬆️
receiver/receivercreator/receivermap.go 100.00% <100.00%> (ø)
receiver/receivercreator/rules.go 68.75% <100.00%> (-15.70%) ⬇️

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 554000d...cdf8053. Read the comment docs.

@asuresh4 asuresh4 mentioned this pull request Jul 13, 2020
@asuresh4 asuresh4 requested a review from jrcamp July 14, 2020 18:25
@asuresh4 asuresh4 moved this from In progress to Review in progress in Collector Jul 15, 2020
Collector automation moved this from Review in progress to Reviewer approved Jul 15, 2020
@bogdandrutu bogdandrutu merged commit 96c0625 into open-telemetry:master Jul 15, 2020
Collector automation moved this from Reviewer approved to Done Jul 15, 2020
tigrannajaryan pushed a commit that referenced this pull request Jul 28, 2020
Depends on #427 

**Description:** Add host observer to look for listening network endpoints on host

**Testing:** Unit tests added. Manually tested with `receivercreator` receiver.

**Documentation:** [README.md](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/eabd8d4fe646d7589466c471dc27f96bc0d7c530/extension/observer/hostobserver/README.md).
@asuresh4 asuresh4 deleted the endpoint-watcher branch January 19, 2021 17:03
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