162 lines
5.2 KiB
HTML
162 lines
5.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="generator" content="Asciidoctor 1.5.7.1">
|
|
<title>Features</title>
|
|
<link rel="stylesheet" href="css/spring.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
|
|
|
<style>
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.switch {
|
|
border-width: 1px 1px 0 1px;
|
|
border-style: solid;
|
|
border-color: #7a2518;
|
|
display: inline-block;
|
|
}
|
|
|
|
.switch--item {
|
|
padding: 10px;
|
|
background-color: #ffffff;
|
|
color: #7a2518;
|
|
display: inline-block;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.switch--item:not(:first-child) {
|
|
border-width: 0 0 0 1px;
|
|
border-style: solid;
|
|
border-color: #7a2518;
|
|
}
|
|
|
|
.switch--item.selected {
|
|
background-color: #7a2519;
|
|
color: #ffffff;
|
|
}
|
|
</style>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
|
|
<script type="text/javascript">
|
|
function addBlockSwitches() {
|
|
$('.primary').each(function() {
|
|
primary = $(this);
|
|
createSwitchItem(primary, createBlockSwitch(primary)).item.addClass("selected");
|
|
primary.children('.title').remove();
|
|
});
|
|
$('.secondary').each(function(idx, node) {
|
|
secondary = $(node);
|
|
primary = findPrimary(secondary);
|
|
switchItem = createSwitchItem(secondary, primary.children('.switch'));
|
|
switchItem.content.addClass('hidden');
|
|
findPrimary(secondary).append(switchItem.content);
|
|
secondary.remove();
|
|
});
|
|
}
|
|
|
|
function createBlockSwitch(primary) {
|
|
blockSwitch = $('<div class="switch"></div>');
|
|
primary.prepend(blockSwitch);
|
|
return blockSwitch;
|
|
}
|
|
|
|
function findPrimary(secondary) {
|
|
candidate = secondary.prev();
|
|
while (!candidate.is('.primary')) {
|
|
candidate = candidate.prev();
|
|
}
|
|
return candidate;
|
|
}
|
|
|
|
function createSwitchItem(block, blockSwitch) {
|
|
blockName = block.children('.title').text();
|
|
content = block.children('.content').first().append(block.next('.colist'));
|
|
item = $('<div class="switch--item">' + blockName + '</div>');
|
|
item.on('click', '', content, function(e) {
|
|
$(this).addClass('selected');
|
|
$(this).siblings().removeClass('selected');
|
|
e.data.siblings('.content').addClass('hidden');
|
|
e.data.removeClass('hidden');
|
|
});
|
|
blockSwitch.append(item);
|
|
return {'item': item, 'content': content};
|
|
}
|
|
|
|
$(addBlockSwitches);
|
|
</script>
|
|
|
|
</head>
|
|
<body class="book toc2 toc-left">
|
|
<div id="header">
|
|
<div id="toc" class="toc2">
|
|
<div id="toctitle">Table of Contents</div>
|
|
<ul class="sectlevel1">
|
|
<li><a href="#_features">Features</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div id="content">
|
|
<div id="preamble">
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Spring Cloud Sleuth implements a distributed tracing solution for Spring Cloud, borrowing
|
|
heavily from <a href="https://research.google.com/pubs/pub36356.html">Dapper</a>,
|
|
<a href="https://github.com/openzipkin/zipkin">Zipkin</a>, and HTrace. For most users, Sleuth should be
|
|
invisible, and all your interactions with external systems should be instrumented
|
|
automatically. You can capture data in logs or by sending it to a remote collector service.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_features"><a class="link" href="#_features">Features</a></h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>A span is the basic unit of work. For example, sending an RPC is a new span, as is sending
|
|
a response to an RPC. Spans are identified by a unique 64-bit ID for the span and another
|
|
64-bit ID for the trace of which the span is a part. Spans also have other data, such as
|
|
descriptions, key-value annotations, the ID of the span that caused them, and process IDs
|
|
(normally IP addresses). Spans are started and stopped, and they keep track of their
|
|
timing information. Once you create a span, you must stop it at some point in the future.
|
|
A set of spans (which form a tree-like structure) is called a trace. For example, if you
|
|
run a distributed big-data store, a trace might be formed by a <code>PUT</code> request.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Spring Cloud Sleuth:</p>
|
|
</div>
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p>Adds trace and span IDs to the Slf4J MDC so that you can extract all the logs from a
|
|
given trace or span in a log aggregator.</p>
|
|
</li>
|
|
<li>
|
|
<p>Provides an abstraction over common distributed tracing data models: traces, spans
|
|
(forming a DAG), annotations, and key-value annotations. This is loosely based on HTrace
|
|
but is Zipkin (Dapper) compatible.</p>
|
|
</li>
|
|
<li>
|
|
<p>Instruments common ingress and egress points from Spring applications (servlet filter,
|
|
rest template, scheduled actions, message channels, zuul filters, and the feign client).</p>
|
|
</li>
|
|
<li>
|
|
<p>If <code>spring-cloud-sleuth-zipkin</code> is available, the app generates and collects
|
|
Zipkin-compatible traces over HTTP. By default, it sends them to a Zipkin collector
|
|
service on localhost (port 9411). You can configure the location of the service using
|
|
<code>spring.zipkin.baseUrl</code>.</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript" src="js/tocbot/tocbot.min.js"></script>
|
|
<script type="text/javascript" src="js/toc.js"></script>
|
|
<link rel="stylesheet" href="js/highlight/styles/atom-one-dark-reasonable.min.css">
|
|
<script src="js/highlight/highlight.min.js"></script>
|
|
<script>hljs.initHighlighting()</script>
|
|
</body>
|
|
</html> |