congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
com.yahoo.bard.webservice.logging
Code IndexAdd Tabnine to your IDE (free)

How to use com.yahoo.bard.webservice.logging

Best Java code snippets using com.yahoo.bard.webservice.logging (Showing top 20 results out of 315)

origin: yahoo/fili

/**
 * Retrieves {@link com.yahoo.bard.webservice.logging.blocks.BardQueryInfo} from
 * {@link com.yahoo.bard.webservice.logging.RequestLog}.
 *
 * @return {@link com.yahoo.bard.webservice.logging.blocks.BardQueryInfo} from
 * {@link com.yahoo.bard.webservice.logging.RequestLog}
 */
public static BardQueryInfo getBardQueryInfo() {
  return ((BardQueryInfo) RequestLog.retrieve(BardQueryInfo.class));
}
origin: yahoo/fili

/**
 * Registers the duration of this timer with the RequestLog.
 * <p>
 * It is highly recommended that you {@link TimedPhase#stop()}} the timer first. Otherwise, the timings may
 * be inaccurate. To both stop and register the timer at once see {@link TimedPhase#close}.
 *
 * @see TimedPhase#stop()
 * @see TimedPhase#close()
 */
public void registerTime() {
  RequestLog.registerTime(this);
}
origin: yahoo/fili

  /**
   * Stops the timer, and registers the timer with the RequestLog.
   * <p>
   *  This is primarily meant to be used by the try-with-resources block, which both stops the timer and registers it
   *  with the RequestLog, though it can of course be called manually as well. If you want to stop the timer, but
   *  don't want to register the timer just yet, then see {@link TimedPhase#stop}.
   *
   * @see TimedPhase#stop()
   * @see TimedPhase#registerTime()
   */
  @Override
  public void close() {
    stop();
    registerTime();
  }
}
origin: yahoo/fili

/**
 * Exports current thread's request log object as a formatted string without resetting it.
 *
 * @return log object as a formatted string
 */
public static String export() {
  RequestLog current = RLOG.get();
  record(new Durations(current.aggregateDurations()));
  record(new Threads(current.threadIds));
  return LogFormatterProvider.getInstance().format(current.info);
}
origin: yahoo/fili

  @Override
  public void filter(ClientRequestContext request, ClientResponseContext response) {
    RequestLog.stopTiming("TestLogWrapper");
    RequestLog.log();
  }
}
origin: yahoo/fili

  /**
   * Stop the request timer, start the response timer, and then invoke the failure callback code.
   *
   * @param error  The error that caused the failure
   */
  default void dispatch(Throwable error) {
    RequestLog.stopTiming(REQUEST_WORKFLOW_TIMER);
    RequestLog.startTiming(RESPONSE_WORKFLOW_TIMER);
    invoke(error);
  }
}
origin: com.yahoo.fili/fili-core

@Override
public void filter(final ContainerRequestContext request) {
  RequestLog.startTiming("TestLogWrapper");
}
origin: yahoo/fili

/**
 * Sends the response back to the user.
 *
 * @param response  The response to send to the user
 * @param asyncResponse  The channel over which to send the response
 */
private void send(Response response, AsyncResponse asyncResponse) {
  if (RequestLog.isRunning(RESPONSE_WORKFLOW_TIMER)) {
    RequestLog.stopTiming(RESPONSE_WORKFLOW_TIMER);
  }
  asyncResponse.resume(response);
}
origin: yahoo/fili

/**
 * Return the duration of the timer in nanoseconds.
 *
 * @return The duration of the timer in nanoseconds
 */
public long getDuration() {
  if (isRunning()) {
    LOG.warn("Timer '{}' is still running. Timings may be incorrect.", getName());
  }
  return duration;
}
origin: yahoo/fili

/**
 * Prepend an id prefix to generated druid query id.
 *
 * @param idPrefix  Prefix for queryId sent to druid
 */
public static void addIdPrefix(String idPrefix) {
  RequestLog current = RLOG.get();
  String newId = idPrefix + getId();
  current.info = current.info.withUuid(newId);
  current.logId = newId;
  MDC.put(ID_KEY, newId);
}
origin: yahoo/fili

/**
 * Exports a snapshot of the request log of the current thread and also resets the request log for that thread.
 *
 * @return the log context of the current thread
 */
public static RequestLog dump() {
  RequestLog current = RLOG.get();
  RequestLog copy = new RequestLog(current);
  current.clear();
  RLOG.remove();
  return copy;
}
origin: com.yahoo.fili/fili-core

@Override
public void close() {
  stop();
}
origin: yahoo/fili

/**
 * Append a part of logging information defined in this LogBlock.
 *
 * @param phase  A {@link LogInfo} object including the information to be logged.
 */
public void add(LogInfo phase) {
  body.put(phase.getName(), phase);
}
origin: yahoo/fili

@Override
public void filter(ContainerRequestContext request, ContainerResponseContext response) {
  RequestLog.stopTiming("TestLogWrapper");
  RequestLog.log();
}
origin: com.yahoo.fili/fili-core

@Override
public void filter(final ClientRequestContext request) {
  RequestLog.startTiming("TestLogWrapper");
}
origin: yahoo/fili

@Override
public void close() {
  stop();
}
origin: com.yahoo.fili/fili-core

@Override
public void filter(ContainerRequestContext request, ContainerResponseContext response) {
  RequestLog.stopTiming("TestLogWrapper");
  RequestLog.log();
}
origin: yahoo/fili

@Override
public void filter(final ContainerRequestContext request) {
  RequestLog.startTiming("TestLogWrapper");
}
origin: com.yahoo.fili/fili-core

  @Override
  public void filter(ClientRequestContext request, ClientResponseContext response) {
    RequestLog.stopTiming("TestLogWrapper");
    RequestLog.log();
  }
}
origin: yahoo/fili

@Override
public void filter(final ClientRequestContext request) {
  RequestLog.startTiming("TestLogWrapper");
}
com.yahoo.bard.webservice.logging

Most used classes

  • RequestLog
  • LogBlock
  • LogFormatter
  • LogFormatterProvider
  • LogInfo
    Interface for enums or classes that are meant to enclose log related information that can be exporte
  • TimedPhase,
  • BardQueryInfo,
  • DataRequest,
  • DimensionRequest,
  • DruidFilterInfo,
  • DruidResponse,
  • Durations,
  • Epilogue,
  • FeatureFlagRequest,
  • Filter,
  • JobRequest,
  • MetricRequest,
  • Preface,
  • SliceRequest
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now