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

Expose a HTTP endpoint with the last $N events for polling #18

Open
paddycarey opened this issue Nov 29, 2018 · 3 comments
Open

Expose a HTTP endpoint with the last $N events for polling #18

paddycarey opened this issue Nov 29, 2018 · 3 comments

Comments

@paddycarey
Copy link

I was wondering if it would be desirable for fluxcloud to expose a HTTP endpoint which would return a list of the events it's received (limited to some user configurable value for memory reasons) that could be polled by an external service?

We have a use case where we'd like to receive flux events in a system where we can't accept inbound connections (so webhooks don't work) but we can make outbound connections to other services.

I'm not sure if this even makes sense for fluxcloud or should be its own service that fluxcloud can talk to via webhooks. Maybe even something like a redis/kafka/whatever exporter would work (fluxcloud writes events to redis, we poll redis for new events 🤷‍♂️ ).

Wanted to find out what you think before trying to implement this.

@oliviabarrick
Copy link
Owner

This is an interesting use-case. My main apprehension there is we would need to maintain some state to ensure you could retrieve events even after a restart. I think adding an exporter for a some queue that you use would be the best bet.

I’m happy to write the Redis exporter - but not sure when I’ll be able to get to it, so if you want it sooner I’m happy to accept the contribution!

@oliviabarrick
Copy link
Owner

We could also expose detailed prometheus metrics?

@sfrique
Copy link

sfrique commented Dec 4, 2018

I like the prometheus metric part!

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

3 participants