Package org.sonatype.nexus.analytics

Examples of org.sonatype.nexus.analytics.EventDataBuilder


            log.error("Could not log in anonymous user");
          }
        }

        Response response = null;
        EventDataBuilder builder = null;

        // Maybe record analytics events
        if (eventRecorder != null && eventRecorder.isEnabled()) {
          builder = new EventDataBuilder("Ext.Direct")
              .set("type", method.getType().name())
              .set("name", method.getName())
              .set("action", method.getActionName());
        }

        MDC.put(getClass().getName(), method.getFullName());

        try {
          response = asResponse(super.invokeMethod(method, actionInstance, parameters));
        }
        catch (InvocationTargetException e) {
          response = handleException(method, e.getTargetException());
        }
        catch (Throwable e) {
          response = handleException(method, e);
        }
        finally {
          // Record analytics event
          if (builder != null) {
            if (response != null) {
              builder.set("success", response.isSuccess());
            }
            eventRecorder.record(builder.build());
          }

          MDC.remove(getClass().getName());
        }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.analytics.EventDataBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.