Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
filters with Honeycomb Java Beeline - Spring Boot Filter version
package org.springframework.samples.petclinic.system;
import io.honeycomb.beeline.DefaultBeeline;
import io.honeycomb.beeline.spring.beans.SpringServletFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.swing.*;
import java.util.Arrays;
@Configuration
public class HoneycombFilterRegistration {
@Bean
public FilterRegistrationBean<SpringServletFilter> filter() {
FilterRegistrationBean<SpringServletFilter> bean = new FilterRegistrationBean<>();
// bean.setFilter(new HoneycombFilter());
DefaultBeeline beeline = DefaultBeeline.getInstance("traces-dataset", "serviceName",
"writekey");
bean.setFilter(
new SpringServletFilter("myService", Arrays.asList("/*"), Arrays.asList(), beeline.getBeeline()));
return bean;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment