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 support for Prometheus compatible APIs in amp service #2658

Closed
2 tasks
zoonage opened this issue May 28, 2024 · 5 comments
Closed
2 tasks

Add support for Prometheus compatible APIs in amp service #2658

zoonage opened this issue May 28, 2024 · 5 comments
Assignees
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@zoonage
Copy link

zoonage commented May 28, 2024

Describe the feature

To do https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-APIReference-RemoteWrite.html at the moment we'd need to sign requests manually, implement retry logic, and other things that the SDK gives us out of the box

Use Case

We have a Lambda function that needs to write directly to Prometheus, as we can't use our normal setup with the otel collector that we have for ECS we are sending the metrics directly to it.

The alternative is doing Lambda -> CloudWatch EMF -> Metrics stream -> AMP which is a lot of extra hops to avoid a single API call

Proposed Solution

Add a Client.RemoteWrite method (and I guess RemoteRead might as well be there?)

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Go SDK V2 Module Versions Used

v1.25.8

Go version used

go version go1.22.2 darwin/arm64

@zoonage zoonage added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 28, 2024
@RanVaknin RanVaknin self-assigned this May 30, 2024
@RanVaknin
Copy link
Contributor

Hi @zoonage ,

Thanks for reaching out.
The AWS SDKs are all code generated from the various API models of each AWS service. This means that if an AWS service didn't model RemoteWrite and RemoteRead operations on their API, they will not exist in the SDK and the SDK team cannot directly add them.

Admittedly, I'm not familiar with Prometheus, but based on the documentation here, RemoteWrite is configured directly within Prometheus itself, rather than through API calls that could be made via the SDK. This would also explain why RemoteWrite and non of the other AMP’s Prometheus-compatible APIs have been included in the public API model for AMP.

Thanks,
Ran~

@RanVaknin RanVaknin added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. service-api This issue is due to a problem in a service API, not the SDK implementation. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels May 30, 2024
@zoonage
Copy link
Author

zoonage commented May 30, 2024

Hi @RanVaknin

Is there a separate repo to raise this to the relevant service team or is it best raised via our aws account team as a feature request?

You're correct in that the request is made against the specific instance as opposed to the typical endpoint, however services like Neptune have a similar model for the neptunedata API where you configure the endpoint URL for the client which was where my line of thinking was going

@RanVaknin
Copy link
Contributor

Hi @zoonage ,

I have raised a feature request on your behalf (internal ticket ID P132973119). If you have access to AWS support via the developer console you can create another support ticket and reference that ticket ID, an assigned account manager would be able to drive this forward on your behalf.

Otherwise if I hear back anything I will update this thread, but in the meantime, since its not actionable by the SDK team, Im going to close it.

Thanks again for reaching out.
Ran~

@RanVaknin RanVaknin closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@RanVaknin
Copy link
Contributor

@zoonage heard back from the prometheus team:

Prometheus compatible API are not compatible with AWS SDK model and there is no plan to make it available in the SDK.

  1. use ADOT as a layer to write to AMP
  2. use the open-source Prometheus client to remote_write to AMP: https://github.com/prometheus/prometheus/blob/efbd6e41c59ec8d6b7a0791c1fb337fdac53b4f2/storage/remote/client.go#L140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

2 participants