Tabnine Logo
JsonCodec.writeSpans
Code IndexAdd Tabnine to your IDE (free)

How to use
writeSpans
method
in
zipkin.internal.JsonCodec

Best Java code snippets using zipkin.internal.JsonCodec.writeSpans (Showing top 4 results out of 315)

origin: Nike-Inc/wingtips

protected void sendSpans(List<zipkin.Span> spanList) {
  try {
    sendSpans(Codec.JSON.writeSpans(spanList));
  } catch (IOException e) {
    Set<String> affectedTraceIds = new HashSet<>(spanList.size());
    for (zipkin.Span span : spanList) {
      affectedTraceIds.add(String.valueOf(span.traceId));
    }
    logger.error("An error occurred attempting to post Zipkin spans to the Zipkin server. affected_trace_ids={}, exception_cause=\"{}\"",
           affectedTraceIds.toString(), e.toString());
  }
}
origin: com.nike.wingtips/wingtips-zipkin

protected void sendSpans(List<zipkin.Span> spanList) {
  try {
    sendSpans(Codec.JSON.writeSpans(spanList));
  } catch (IOException e) {
    Set<String> affectedTraceIds = new HashSet<>(spanList.size());
    for (zipkin.Span span : spanList) {
      affectedTraceIds.add(String.valueOf(span.traceId));
    }
    logger.error("An error occurred attempting to post Zipkin spans to the Zipkin server. affected_trace_ids={}, exception_cause=\"{}\"",
           affectedTraceIds.toString(), e.toString());
  }
}
origin: Nike-Inc/wingtips

@Test
public void sendSpans_with_span_list_delegates_to_sendSpans_with_byte_array() throws IOException {
  // given
  List<zipkin.Span> zipkinSpans = new ArrayList<>();
  for (int i = 0; i < 10; i++) {
    zipkinSpans.add(zipkinSpan(random.nextLong(), UUID.randomUUID().toString()));
  }
  byte[] expectedBytesPayload = Codec.JSON.writeSpans(zipkinSpans);
  // when
  implSpy.sendSpans(zipkinSpans);
  // then
  verify(implSpy).sendSpans(expectedBytesPayload);
}
origin: Nike-Inc/wingtips

  sentSpans.add(zipkinSpan(random.nextLong(), UUID.randomUUID().toString()));
long expectedUncompressedPayloadSize = Codec.JSON.writeSpans(sentSpans).length;
zipkin.internalJsonCodecwriteSpans

Popular methods of JsonCodec

  • readSpans
  • writeSpan
  • readDependencyLink
  • readSpan

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • String (java.lang)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Reference (javax.naming)
  • JFileChooser (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • CodeWhisperer alternatives
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