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

[receiver/riak] Riak Metric Receiver #8548

Merged
merged 10 commits into from Apr 7, 2022

Conversation

armstrmi
Copy link
Contributor

Description: Adding New Component: Riak Metric Receiver,

Link to tracking Issue: New Component: Riak Metric Receiver

Testing: series of testing was added including

  • config_test.go
  • client_test.go
  • scraper_test.go
  • factory_test.go
    As well as sample configs for running local riak receiver and verify that metrics are being received

Documentation: README.md

@armstrmi armstrmi requested a review from a team as a code owner March 17, 2022 17:30
@armstrmi armstrmi requested a review from mx-psi March 17, 2022 17:30
@armstrmi armstrmi changed the title New Component: Riak Metric Receiver Riak Receiver Mar 17, 2022
@armstrmi armstrmi changed the title Riak Receiver [receiver/riak] Riak Metric Receiver Mar 17, 2022
@djaglowski djaglowski assigned djaglowski and unassigned anuraaga Mar 17, 2022
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

Overall looks quite good. A few things need another look though.

We also need to add an integration test like this one.

receiver/riakreceiver/README.md Outdated Show resolved Hide resolved
receiver/riakreceiver/README.md Outdated Show resolved Hide resolved
receiver/riakreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/riakreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/riakreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/riakreceiver/scraper.go Outdated Show resolved Hide resolved
receiver/riakreceiver/scraper.go Outdated Show resolved Hide resolved
receiver/riakreceiver/scraper.go Outdated Show resolved Hide resolved
receiver/riakreceiver/internal/models/models.go Outdated Show resolved Hide resolved
receiver/riakreceiver/internal/model/model.go Outdated Show resolved Hide resolved
receiver/riakreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/riakreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/riakreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/riakreceiver/go.mod Outdated Show resolved Hide resolved
receiver/riakreceiver/integration_test.go Show resolved Hide resolved
receiver/riakreceiver/integration_test.go Outdated Show resolved Hide resolved
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

Please add this module to the CODEOWNERS file with the two of us listed as owners.

receiver/riakreceiver/README.md Outdated Show resolved Hide resolved
receiver/riakreceiver/client_test.go Outdated Show resolved Hide resolved
receiver/riakreceiver/client_test.go Outdated Show resolved Hide resolved
receiver/riakreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/riakreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/riakreceiver/scraper.go Outdated Show resolved Hide resolved
receiver/riakreceiver/scraper_test.go Outdated Show resolved Hide resolved
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

Please add the component to the root go.mod (include a replace directive) and also cmd/configschema tests.

@djaglowski
Copy link
Member

@armstrmi CI is still failing on this:

-package riakreceiver
+package riakreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver"
 
 import (
 	"context"
Porto links are out of date, please run "make goporto" and commit the changes in this PR.
Error: Process completed with exit code 1.

@djaglowski
Copy link
Member

Generated code is out of date, please run "make generate" and commit the changes in this PR.
Error: Process completed with exit code 1.

@djaglowski
Copy link
Member

👍 The integration test is running successfully:

make[2]: Entering directory '/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/riakreceiver'
running go integration test ./... + coverage in /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/riakreceiver
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.47.0
go: downloading go.opentelemetry.io/otel v1.5.0
go: downloading go.opentelemetry.io/otel/trace v1.5.0
go: downloading github.com/docker/docker v20.10.11+incompatible
go: downloading github.com/go-logr/logr v1.2.2
go: downloading google.golang.org/protobuf v1.27.1
=== RUN   TestRiakIntegration
2022/03/29 15:43:26 Starting container id: 7a[713](https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/5741948997?check_suite_focus=true#step:7:713)83af5d7 image: testcontainers/ryuk:0.3.3
2022/03/29 15:43:26 Waiting for container id 7a71383af5d7 image: testcontainers/ryuk:0.3.3
2022/03/29 15:43:26 Container is ready id: 7a71383af5d7 image: testcontainers/ryuk:0.3.3
2022/03/29 15:44:10 Starting container id: 76ec36cf280c image: fd[730](https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/5741948997?check_suite_focus=true#step:7:730)e39-81f1-49f9-b737-8ad62c6435ad:d6f37d0a-607f-42f0-a59d-f91cc9b4019e
2022/03/29 15:44:10 Waiting for container id 76ec36cf280c image: fd730e39-81f1-49f9-b737-8ad62c6435ad:d6f37d0a-607f-42f0-a59d-f91cc9b4019e
2022/03/29 15:44:14 Container is ready id: 76ec36cf280c image: fd730e39-81f1-49f9-b737-8ad62c6435ad:d6f37d0a-607f-42f0-a59d-f91cc9b4019e
--- PASS: TestRiakIntegration (56.54s)
PASS
coverage: 68.5% of statements
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver	56.604s	coverage: 68.5% of statements
?   	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver/internal/metadata	[no test files]
?   	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver/internal/mocks	[no test files]
?   	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver/internal/model	[no test files]
make[2]: Leaving directory '/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/riakreceiver'

Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @armstrmi!

@djaglowski djaglowski added the ready to merge Code review completed; ready to merge by maintainers label Mar 29, 2022
@jpkrohling
Copy link
Member

I'm waiting on the new release to be performed before merging this. It would probably cause this PR to get outdated (like, the changelog and go.mod/sum).

@anuraaga
Copy link
Contributor

I appreciate the thumbs up from the contributors but I definitely wish that maintainers instead took the effort to update existing PRs when they make changes that break them, including releases.

@jpkrohling
Copy link
Member

I agree with you, @anuraaga. I think most of us are trying that, but there are cases where it's not possible/feasible. In this case, the release hasn't been made and I was about to leave for the day, but wanted to make it clear (also to other maintainers) that this wouldn't get merged before the release.

@anuraaga
Copy link
Contributor

Cool sounds like the sentiment is there.

@jpkrohling
Copy link
Member

Forgot another case where we can't do it (which is the case with this PR as well): if contributors don't mark the PR as "maintainers can change it", we can't add commits or force push a change to the PR. The best we can then do is push the branch to our own forks, and offer it to the contributor.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@pmm-sumo pmm-sumo left a comment

Choose a reason for hiding this comment

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

As @djaglowski noticed, changelog needs to be cleaned up from the duplicate entries

@djaglowski djaglowski requested a review from pmm-sumo April 6, 2022 19:45
@bogdandrutu
Copy link
Member

bogdandrutu commented Apr 6, 2022

@djaglowski @jpkrohling do we have an issue for this?

Update: Saw the issue in the description. don't know how you folks can carefully review 5500 lines in a reasonable amount of time :)) probably you spent lots of time...

@armstrmi
Copy link
Contributor Author

armstrmi commented Apr 6, 2022

@bogdandrutu yes we do, #8364

@djaglowski
Copy link
Member

don't know how you folks can carefully review 5500 lines in a reasonable amount of time :)) probably you spent lots of time...

It can easily be done in an unreasonable amount of time :)

More seriously, my strategy has been to approach it as multiple review sessions. Start with obvious issues / gaps. Then focus on config and data model. Then factory and scraper. Double check tests and coverage. Finally checking all minor details.

@djaglowski djaglowski dismissed pmm-sumo’s stale review April 7, 2022 13:26

Necessary changes to address feedback were simple and clear and have been completed.

@djaglowski djaglowski merged commit cd25661 into open-telemetry:main Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants