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

Remove prometheus/client_golang replace #682

Merged
merged 5 commits into from
Jul 6, 2023

Conversation

marctc
Copy link
Contributor

@marctc marctc commented Jul 5, 2023

This PR removes the usage of the custom fork of prometheus/client_golang adding MeasureCollectTime.
The function is moved to the exporter itself that IMO makes more sense to exist here than the
the instrumentation library.

This would allow us to include last exporter changes with license issues fixed in grafana agent.

Fixes #574

  • Links to other linked pull requests (optional).

  • Tests passed.
  • Fix conflicts with target branch.
  • Update jira ticket description if needed.
  • Attach screenshots/console output to confirm new behavior to jira ticket, if applicable.

Once all checks pass and the code is ready for review, please add pmm-review-exporters team as the reviewer. That would assign people from the review team automatically. Report any issues on our Forum.

@marctc marctc requested a review from a team as a code owner July 5, 2023 10:49
@marctc marctc requested review from BupycHuk and JiriCtvrtka and removed request for a team July 5, 2023 10:49
@it-percona-cla
Copy link

it-percona-cla commented Jul 5, 2023

CLA assistant check
All committers have signed the CLA.

@marctc marctc changed the title Remove prometheus/client_golang replace Remove prometheus/client_golang replace Jul 5, 2023
@BupycHuk BupycHuk requested a review from ademidoff July 5, 2023 12:53
@marctc
Copy link
Contributor Author

marctc commented Jul 5, 2023

We use the lastest version of client_golang and exporter-toolkit in grafana/agent. This make some compability issues with the exporter. We can either try to upgrade and fix issues here or downgrade in grafana/agent.

Copy link
Member

@ademidoff ademidoff left a comment

Choose a reason for hiding this comment

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

@marctc Awesome, thanks for your contribution!

@ademidoff
Copy link
Member

We use the lastest version of client_golang and exporter-toolkit in grafana/agent. This make some compability issues with the exporter. We can either try to upgrade and fix issues here or downgrade in grafana/agent.

We will have to discuss internally when we can upgrade to the latest version of client_golang , since that has to do with PMM dashboards, that still seem to consume the v1. If it wasn't for supporting v1, we could have gotten rid of it right now.

Thanks anyway!

@marctc
Copy link
Contributor Author

marctc commented Jul 5, 2023

We will have to discuss internally when we can upgrade to the latest version of client_golang , since that has to do with PMM dashboards, that still seem to consume the v1. If it wasn't for supporting v1, we could have gotten rid of it right now.

What does new versions of client_golang have that makes v1 not work?

@marctc
Copy link
Contributor Author

marctc commented Jul 5, 2023

I just bumped exporter-toolkit to v0.10.0 and client_golang to v1.14.0. Also, change these lines. With this I can make agent compile and tests here pass. Is this an acceptable solution for you?

@marctc marctc force-pushed the remove_client_golang_fork branch from a9851d6 to f1c1ce9 Compare July 5, 2023 16:35
@marctc
Copy link
Contributor Author

marctc commented Jul 6, 2023

Thanks again for the fast review @BupycHuk @atymchuk! I just fixed the conflicts in go.mod with main.

@marctc
Copy link
Contributor Author

marctc commented Jul 6, 2023

I believe the failing test is flaky. I tried locally and it worked.

@BupycHuk BupycHuk enabled auto-merge (squash) July 6, 2023 09:18
@BupycHuk BupycHuk merged commit 2843270 into percona:main Jul 6, 2023
7 checks passed
@marctc marctc deleted the remove_client_golang_fork branch July 6, 2023 09:39
adnull pushed a commit to adnull/mongodb_exporter_mt that referenced this pull request Jul 6, 2023
* Remove prometheus/client_golang replace

* Apply formater

* Downgrade client_golang to previous version

* Upgrade exporter-toolkit to v0.10.0
BupycHuk added a commit that referenced this pull request Oct 10, 2023
* added multi target feature

* added connect timeout opts

* added tests

* fixed test

* fixed dockerfile

* Bump github.com/golangci/golangci-lint from 1.47.3 to 1.52.2 in /tools (#639)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.47.3 to 1.52.2.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.47.3...v1.52.2)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/golangci/golangci-lint from 1.52.2 to 1.53.2 in /tools (#665)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.52.2 to 1.53.2.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.52.2...v1.53.2)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove `prometheus/client_golang` replace (#682)

* Remove prometheus/client_golang replace

* Apply formater

* Downgrade client_golang to previous version

* Upgrade exporter-toolkit to v0.10.0

* added multi target feature

* added connect timeout opts

* fixed connect

* formatted code

* fixed linter warnings

* Update README.md

* Update README.md

* updated license

* Update exporter/server.go

Co-authored-by: Nurlan Moldomurov <nurlan.moldomurov@percona.com>

* fixed according to review

* formatted the code

* minor changes according to the linters

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marc Tudurí <marctc@protonmail.com>
Co-authored-by: Jiří Čtvrtka <62988319+JiriCtvrtka@users.noreply.github.com>
Co-authored-by: Nurlan Moldomurov <nurlan.moldomurov@percona.com>
Co-authored-by: Nurlan Moldomurov <bupychuk1989@gmail.com>
@Aleksa-del
Copy link

Hello, @marctc! Thank you for your contributions! We would like to send you a gift from Percona. Please, contact us at community-team@percona.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.

Is the fork of prometheus/client_golang strictly necessary?
5 participants