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

Merge with https://github.com/simonpasquier/prometheus-scaleway-sd #2

Closed
simonpasquier opened this issue Aug 2, 2018 · 3 comments

Comments

@simonpasquier
Copy link

This is a meta-issue describing how we could merge https://github.com/simonpasquier/prometheus-scaleway-sd into this repository. I'm more than happy to see this happening!

I had a quick look at the code and here are my initials remarks.

Dealing with stopped/deleted servers

IIUC this project doesn't update the inventory when servers are stopped, deleted, etc. This could leave stale targets in the output file. In prometheus-scaleway-sd, I'm keeping track of the servers at each run so the SD application can notify servers that don't exist anymore.

https://github.com/simonpasquier/prometheus-scaleway-sd/blob/master/main.go#L217-L224

Vendoring

I see that this repository doesn't vendor any dependency delegating it to the developer (cf. README.md).

I see a few problems here:

  • The builds aren't fully reproducible since the dependencies can change at any point in time.
  • The github.com/prometheus/prometheus/discovery/manager is copied in the repository. My guess is that it is to avoid pulling all SD dependencies (eg AWS, GCP, ... packages) but it also means that any fix to the manager package will have to be manually backported here.

Logging

prometheus-scaleway-sd has a wrapper around go-kit/log to grab logs from the Scaleway API client. This may be useful for troubleshooting.

https://github.com/simonpasquier/prometheus-scaleway-sd/blob/master/main.go#L117-L146

Instrumentation

prometheus-scaleway-sd exposes 2 metrics:

  • prometheus_scaleway_sd_request_duration_seconds, histogram of latencies for requests to the Scaleway API.
  • prometheus_scaleway_sd_request_failures_total, total number of failed requests to the Scaleway API.

Thanks to the prometheus/client_golang, it also expose process metrics.

Security

As noted here, the application shouldn't get the token from the command line, reading it from a file is fine.

Release tooling

I've integrated with promu because it eases the generation of binaries across multiple platforms.

Labels

They look more or less the same. No issue there.

@y0hnn
Copy link
Contributor

y0hnn commented Aug 3, 2018

Hello @simonpasquier,

Thanks for you review. What you have done is awesome.
As your project's code is not based on ours (not an initial fork), I see 2 options :

  1. You make a merge request in our repository, containing these changes
  2. We try to merge the two repositories (resulting of course in a lot of copy / paste from your code)

As you already gave a lot of your time contributing to a service discovery for Scaleway, I'm not very confortable asking you to take some time again to prepare the MR. If you are OK with that, it would be perfect.
Else, I think the option 2 is more appropriate. We will do that on our side, and we will give you of course credits for what you've done (in the code headers, Readme, and adding you as a contributor in the project if you want to help maintaining this).

What do you think ? Do you agree with option 2, or do you have some time to submit a MR ?

Thanks again,

@simonpasquier
Copy link
Author

Option 2 is fine for me. No problem for reviewing your PR and helping the project in the longer term.

@y0hnn
Copy link
Contributor

y0hnn commented Aug 23, 2018

Hello @simonpasquier, can you review #3 ? We credited you on the Readme. If this is ok to merge, we will create a new release after merging.
Thank you!

y0hnn added a commit that referenced this issue Aug 24, 2018
…us-scaleway-sd-#2

Merge with simonpasquier prometheus scaleway sd #2
@y0hnn y0hnn closed this as completed Aug 27, 2018
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

No branches or pull requests

2 participants