Skip to content

feat: Add test_connection/1 for Syslog#3333

Open
ruslandoga wants to merge 4 commits intoLogflare:mainfrom
ruslandoga:rd/syslog-test_connection
Open

feat: Add test_connection/1 for Syslog#3333
ruslandoga wants to merge 4 commits intoLogflare:mainfrom
ruslandoga:rd/syslog-test_connection

Conversation

@ruslandoga
Copy link
Copy Markdown
Contributor

@ruslandoga ruslandoga commented Apr 2, 2026

This PR adds the test_connection/1 callback to the Syslog backend and updates the Better Stack integration guide. I've also extracted the socket functions into a separate module that's now used both from the pool and the new test_connection/1.

@ruslandoga ruslandoga force-pushed the rd/syslog-test_connection branch from 33bc998 to f2a2dff Compare April 4, 2026 01:10
@ruslandoga ruslandoga marked this pull request as ready for review April 4, 2026 01:28
import BetterStackLogs from "./syslog/03_betterstack_logs.png";
import LogflareTestConnection from "./syslog/02_logflare_test_connection.png";
import LogflareEnableBackend from "./syslog/03_logflare_enable_backend.png";
import BetterStackLogs from "./syslog/04_betterstack_logs.png";
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've also tinified the images a bit more.


import Kernel, except: [send: 2]
alias Logflare.Backends.Cache, as: BackendsCache
alias Logflare.Backends.Adaptor.SyslogAdaptor.Socket
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've extracted all socket-related logic into a separate module.

@impl Logflare.Backends.Adaptor
def test_connection(backend) do
result =
with {:ok, socket} <- Socket.connect(backend.config, to_timeout(second: 3)) do
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Using a shorter timeout since it's a user action.

@ruslandoga ruslandoga changed the title Add test_connection/1 for Syslog feat: Add test_connection/1 for Syslog Apr 4, 2026
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.

1 participant