code: @Override
  	public void init(FilterConfig config) throws ServletException {
  		final long start = System.currentTimeMillis(); // NOPMD
  		final String contextPath = Parameters.getContextPath(config.getServletContext());
  		if (!instanceEnabled) {
  			if (!CONTEXT_PATHS.contains(contextPath)) {
  				// si jars dans tomcat/lib, il y a plusieurs instances mais dans des webapps différentes (issue 193)
  				instanceEnabled = true;
  			} else {
  				return;
  			}
  		}
  		CONTEXT_PATHS.add(contextPath);
  		this.filterConfig = config;
  		this.servletApi2 = config.getServletContext().getMajorVersion() < 3;
  		Parameters.initialize(config);
  		monitoringDisabled = Parameter.DISABLED.getValueAsBoolean();
  		if (monitoringDisabled) {
  			return;
  		}
  
  		LOG.debug("JavaMelody filter init started");
  
  		this.filterContext = new FilterContext(getApplicationType());
  		this.httpAuth = new HttpAuth();
  		config.getServletContext().setAttribute(ReportServlet.FILTER_CONTEXT_KEY, filterContext);
  		final Collector collector = filterContext.getCollector();
  		this.httpCounter = collector.getCounterByName(Counter.HTTP_COUNTER_NAME);
  		this.errorCounter = collector.getCounterByName(Counter.ERROR_COUNTER_NAME);
  
  		logEnabled = Parameter.LOG.getValueAsBoolean();
  		rumEnabled = Parameter.RUM_ENABLED.getValueAsBoolean();
  		if (Parameter.URL_EXCLUDE_PATTERN.getValue() != null) {
  			// lance une PatternSyntaxException si la syntaxe du pattern est invalide
  			urlExcludePattern = Pattern.compile(Parameter.URL_EXCLUDE_PATTERN.getValue());
  		}
  
  		final long duration = System.currentTimeMillis() - start;
  		LOG.debug("JavaMelody filter init done in " + duration + " ms");
  	}
docs: {@inheritDoc}