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 watch_logs API operation #51

Merged
merged 5 commits into from
Sep 3, 2024
Merged

✨ Add watch_logs API operation #51

merged 5 commits into from
Sep 3, 2024

Conversation

linkdd
Copy link
Contributor

@linkdd linkdd commented Sep 3, 2024

Decision Record

In order to improve inter-operability, we add a new watch_logs API operation which implements Sever-Sent Events, as a streaming response with text/event-stream content type.

Users are able to watch logs of a specific stream in real time:

$ curl -H "Authorization: Bearer <token>" http://localhost:5080/api/v1/streams/{stream}/logs/watch
id: <log key>
event: log
data: {"timestamp": "...", "fields": {...}}

...

Changes

  • ✨ Add LogNotifier background task
  • ✨ Make pipelines send a message to the LogNotifier when ingesting a log into a stream
  • ✨ Add watch_logs API operation which subscribes to a stream via the LogNotifier

License Agreement

  • I guarantee that I have the rights on the code submitted in this PR
  • I accept that this contribution will be released under the terms of the MIT License

@linkdd linkdd added this to the 1.0.0 milestone Sep 3, 2024
@linkdd linkdd self-assigned this Sep 3, 2024
@linkdd linkdd merged commit d5ab884 into main Sep 3, 2024
2 checks passed
@linkdd linkdd deleted the watch-logs-endpoint branch September 3, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant