Codota Logo
Propagator.extract
Code IndexAdd Codota to your IDE (free)

How to use
extract
method
in
rocks.inspectit.agent.java.sdk.opentracing.propagation.Propagator

Best Java code snippets using rocks.inspectit.agent.java.sdk.opentracing.propagation.Propagator.extract (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: inspectIT/inspectIT

@Test
public void happyPath() {
  when(propagator.extract(carrier)).thenReturn(context);
  tracer.registerPropagator(Format.Builtin.TEXT_MAP, propagator);
  SpanContext extracted = tracer.extract(Format.Builtin.TEXT_MAP, carrier);
  assertThat(extracted, is((SpanContext) context));
  verify(propagator).extract(carrier);
  verifyNoMoreInteractions(propagator);
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@SuppressWarnings("unchecked")
@Override
public <C> SpanContext extract(Format<C> format, C carrier) {
  if ((format == null) || (carrier == null)) {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("Context can not be extracted, both format and carrier must be provided.");
    }
    return null;
  }
  Propagator<C> propagator = (Propagator<C>) propagators.get(format);
  if (null != propagator) {
    SpanContextImpl context = propagator.extract(carrier);
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("Context extracted: " + context);
    }
    return context;
  } else {
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("Context can not be extracted, propagator does not exists for the format " + format.toString() + ".");
    }
    return null;
  }
}
rocks.inspectit.agent.java.sdk.opentracing.propagationPropagatorextract

Javadoc

Extract the span context from the carrier.

Popular methods of Propagator

  • inject
    Injects the span context to the carrier.

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • runOnUiThread (Activity)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now