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 missing handler to make FirehoseExporter work again #88

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

benjaminguttmann-avtq
Copy link
Contributor

Before adjustments in this commit 80a716b the following lines used router as Handler.


	if *tlsCertFile != "" && *tlsKeyFile != "" {
		log.Infoln("Listening TLS on", *listenAddress)
		log.Fatal(http.ListenAndServeTLS(*listenAddress, *tlsCertFile, *tlsKeyFile, router))
	} else {
		log.Infoln("Listening on", *listenAddress)
		log.Fatal(http.ListenAndServe(*listenAddress, router))
	}

when adjusting the section to use http.server router was dropped as handler and default was used which leads to the different endpoints of the exporter not working anymore

	server := &http.Server{
		Addr:              *listenAddress,
		ReadTimeout:       time.Second * 5,
		ReadHeaderTimeout: time.Second * 10,
	}

	if *tlsCertFile != "" && *tlsKeyFile != "" {
		log.Infoln("Listening TLS on", *listenAddress)
		err = server.ListenAndServeTLS(*tlsCertFile, *tlsKeyFile)
	} else {
		log.Infoln("Listening on", *listenAddress)
		err = server.ListenAndServe()
	}

	log.Fatal(err)
}


@benjaminguttmann-avtq
Copy link
Contributor Author

Fixes #89

Copy link
Contributor

@mdimiceli mdimiceli left a comment

Choose a reason for hiding this comment

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

ok for me, thanks !

@mdimiceli mdimiceli merged commit 53c84bf into master Sep 14, 2023
2 checks passed
@benjaminguttmann-avtq benjaminguttmann-avtq deleted the fix-firehose-exporter branch September 14, 2023 19:25
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.

2 participants