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

Invalid hosts are not listed as an error #29

Open
tpoliaw opened this issue Jun 20, 2024 · 0 comments
Open

Invalid hosts are not listed as an error #29

tpoliaw opened this issue Jun 20, 2024 · 0 comments

Comments

@tpoliaw
Copy link

tpoliaw commented Jun 20, 2024

If the graylog host cannot be resolved, the ConnectionErrors returned by connect is empty, even though it failed to connect to anything.

Example

use tracing::info;
use tracing_gelf::Logger;

#[tokio::main]
pub async fn main() {
    let addr = "not-a-host.example.com";
    let port = 12201;
    let mut handle = Logger::builder().init_tcp((addr, port)).unwrap();
    let connection = tokio::spawn(async move {
        let errs = handle.connect().await;
        println!("{errs:?}");
    });
    info!(message = "Testing graylog tracing");
    let _ = connection.await;
}

The output from the above is ConnectionErrors([]), and the logger silently does nothing. Should the dns lookup failing be an error case, or at least included in the errors returned in ConnectionErrors?

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

1 participant