census_8h.html 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.6"/>
  7. <title>GRPC Core: include/grpc/census.h File Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/search.js"></script>
  13. <script type="text/javascript">
  14. $(document).ready(function() { searchBox.OnSelectItem(0); });
  15. </script>
  16. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  17. </head>
  18. <body>
  19. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  20. <div id="titlearea">
  21. <table cellspacing="0" cellpadding="0">
  22. <tbody>
  23. <tr style="height: 56px;">
  24. <td style="padding-left: 0.5em;">
  25. <div id="projectname">GRPC Core
  26. &#160;<span id="projectnumber">4.0.0</span>
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.6 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  42. <li><a href="modules.html"><span>Modules</span></a></li>
  43. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  44. <li class="current"><a href="files.html"><span>Files</span></a></li>
  45. <li>
  46. <div id="MSearchBox" class="MSearchBoxInactive">
  47. <span class="left">
  48. <img id="MSearchSelect" src="search/mag_sel.png"
  49. onmouseover="return searchBox.OnSearchSelectShow()"
  50. onmouseout="return searchBox.OnSearchSelectHide()"
  51. alt=""/>
  52. <input type="text" id="MSearchField" value="Search" accesskey="S"
  53. onfocus="searchBox.OnSearchFieldFocus(true)"
  54. onblur="searchBox.OnSearchFieldFocus(false)"
  55. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  56. </span><span class="right">
  57. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  58. </span>
  59. </div>
  60. </li>
  61. </ul>
  62. </div>
  63. <div id="navrow2" class="tabs2">
  64. <ul class="tablist">
  65. <li><a href="files.html"><span>File&#160;List</span></a></li>
  66. <li><a href="globals.html"><span>Globals</span></a></li>
  67. </ul>
  68. </div>
  69. <!-- window showing the filter options -->
  70. <div id="MSearchSelectWindow"
  71. onmouseover="return searchBox.OnSearchSelectShow()"
  72. onmouseout="return searchBox.OnSearchSelectHide()"
  73. onkeydown="return searchBox.OnSearchSelectKey(event)">
  74. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  75. <!-- iframe showing the search results (closed by default) -->
  76. <div id="MSearchResultsWindow">
  77. <iframe src="javascript:void(0)" frameborder="0"
  78. name="MSearchResults" id="MSearchResults">
  79. </iframe>
  80. </div>
  81. <div id="nav-path" class="navpath">
  82. <ul>
  83. <li class="navelem"><a class="el" href="dir_bda73758a0a4d8c0ff603a7983866e1c.html">include</a></li><li class="navelem"><a class="el" href="dir_8ae8e534eeef321a81935092729b7078.html">grpc</a></li> </ul>
  84. </div>
  85. </div><!-- top -->
  86. <div class="header">
  87. <div class="summary">
  88. <a href="#nested-classes">Data Structures</a> &#124;
  89. <a href="#define-members">Macros</a> &#124;
  90. <a href="#typedef-members">Typedefs</a> &#124;
  91. <a href="#enum-members">Enumerations</a> &#124;
  92. <a href="#func-members">Functions</a> </div>
  93. <div class="headertitle">
  94. <div class="title">census.h File Reference</div> </div>
  95. </div><!--header-->
  96. <div class="contents">
  97. <div class="textblock"><code>#include &lt;<a class="el" href="grpc_8h_source.html">grpc/grpc.h</a>&gt;</code><br/>
  98. </div>
  99. <p><a href="census_8h_source.html">Go to the source code of this file.</a></p>
  100. <table class="memberdecls">
  101. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
  102. Data Structures</h2></td></tr>
  103. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcensus__tag.html">census_tag</a></td></tr>
  104. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A tag is a key:value pair. <a href="structcensus__tag.html#details">More...</a><br/></td></tr>
  105. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcensus__context__status.html">census_context_status</a></td></tr>
  107. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">An instance of this structure is kept by every context, and records the basic information associated with the creation of that context. <a href="structcensus__context__status.html#details">More...</a><br/></td></tr>
  108. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcensus__context__iterator.html">census_context_iterator</a></td></tr>
  110. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure used for iterating over the tags in a context. <a href="structcensus__context__iterator.html#details">More...</a><br/></td></tr>
  111. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcensus__timestamp.html">census_timestamp</a></td></tr>
  113. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The concept of "operation" is a fundamental concept for Census. <a href="structcensus__timestamp.html#details">More...</a><br/></td></tr>
  114. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcensus__rpc__name__info.html">census_rpc_name_info</a></td></tr>
  116. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represent functions to map RPC name ID to service/method names. <a href="structcensus__rpc__name__info.html#details">More...</a><br/></td></tr>
  117. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcensus__trace__record.html">census_trace_record</a></td></tr>
  119. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trace record. <a href="structcensus__trace__record.html#details">More...</a><br/></td></tr>
  120. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcensus__value.html">census_value</a></td></tr>
  122. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A single value to be recorded comprises two parts: an ID for the particular resource and the value to be recorded against it. <a href="structcensus__value.html#details">More...</a><br/></td></tr>
  123. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. </table><table class="memberdecls">
  125. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  126. Macros</h2></td></tr>
  127. <tr class="memitem:ac3fa459cd0c1621953c46b07bac2faa7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ac3fa459cd0c1621953c46b07bac2faa7">CENSUS_MAX_TAG_KV_LEN</a>&#160;&#160;&#160;255</td></tr>
  128. <tr class="memdesc:ac3fa459cd0c1621953c46b07bac2faa7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum length of a tag's key or value. <a href="#ac3fa459cd0c1621953c46b07bac2faa7">More...</a><br/></td></tr>
  129. <tr class="separator:ac3fa459cd0c1621953c46b07bac2faa7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:a487ca94a4b349f1a7d3d28a21b154f4e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a487ca94a4b349f1a7d3d28a21b154f4e">CENSUS_MAX_PROPAGATED_TAGS</a>&#160;&#160;&#160;255</td></tr>
  131. <tr class="memdesc:a487ca94a4b349f1a7d3d28a21b154f4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of propagatable tags. <a href="#a487ca94a4b349f1a7d3d28a21b154f4e">More...</a><br/></td></tr>
  132. <tr class="separator:a487ca94a4b349f1a7d3d28a21b154f4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. <tr class="memitem:ac116a5843bd29f43a949c56ef5ae619a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ac116a5843bd29f43a949c56ef5ae619a">CENSUS_TAG_PROPAGATE</a>&#160;&#160;&#160;1 /** Tag should be propagated over RPC */</td></tr>
  134. <tr class="memdesc:ac116a5843bd29f43a949c56ef5ae619a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tag flags. <a href="#ac116a5843bd29f43a949c56ef5ae619a">More...</a><br/></td></tr>
  135. <tr class="separator:ac116a5843bd29f43a949c56ef5ae619a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. <tr class="memitem:ab3c3a66a8c2f392d4a14e75dc44e8931"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ab3c3a66a8c2f392d4a14e75dc44e8931">CENSUS_TAG_STATS</a>&#160;&#160;&#160;2 /** Tag will be used for statistics aggregation */</td></tr>
  137. <tr class="separator:ab3c3a66a8c2f392d4a14e75dc44e8931"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a070dd8c57a1a31ced0c7ead5a5910df7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a070dd8c57a1a31ced0c7ead5a5910df7">CENSUS_TAG_RESERVED</a>&#160;&#160;&#160;4 /** Reserved for internal use. */</td></tr>
  139. <tr class="separator:a070dd8c57a1a31ced0c7ead5a5910df7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  140. <tr class="memitem:afa3a818c132d55bb1f0afb7442d8f848"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#afa3a818c132d55bb1f0afb7442d8f848">CENSUS_TAG_IS_PROPAGATED</a>(flags)&#160;&#160;&#160;(flags &amp; <a class="el" href="census_8h.html#ac116a5843bd29f43a949c56ef5ae619a">CENSUS_TAG_PROPAGATE</a>)</td></tr>
  141. <tr class="memdesc:afa3a818c132d55bb1f0afb7442d8f848"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flag values 4,8,16,32,64,128 are reserved for future/internal use. <a href="#afa3a818c132d55bb1f0afb7442d8f848">More...</a><br/></td></tr>
  142. <tr class="separator:afa3a818c132d55bb1f0afb7442d8f848"><td class="memSeparator" colspan="2">&#160;</td></tr>
  143. <tr class="memitem:aaca94b54b685c481236dfb913fef8b4c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#aaca94b54b685c481236dfb913fef8b4c">CENSUS_TAG_IS_STATS</a>(flags)&#160;&#160;&#160;(flags &amp; <a class="el" href="census_8h.html#ab3c3a66a8c2f392d4a14e75dc44e8931">CENSUS_TAG_STATS</a>)</td></tr>
  144. <tr class="separator:aaca94b54b685c481236dfb913fef8b4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  145. <tr class="memitem:acb35403ed23ba2615457fabaa0b430e7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#acb35403ed23ba2615457fabaa0b430e7">CENSUS_TRACE_RECORD_START_OP</a>&#160;&#160;&#160;((uint32_t)0)</td></tr>
  146. <tr class="separator:acb35403ed23ba2615457fabaa0b430e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. <tr class="memitem:a003fb5bda98c95408a21d3a47571a1e9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a003fb5bda98c95408a21d3a47571a1e9">CENSUS_TRACE_RECORD_END_OP</a>&#160;&#160;&#160;((uint32_t)1)</td></tr>
  148. <tr class="separator:a003fb5bda98c95408a21d3a47571a1e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  149. </table><table class="memberdecls">
  150. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
  151. Typedefs</h2></td></tr>
  152. <tr class="memitem:a27fc8788690179599713226f1f054736"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a></td></tr>
  153. <tr class="memdesc:a27fc8788690179599713226f1f054736"><td class="mdescLeft">&#160;</td><td class="mdescRight">A Census Context is a handle used by Census to represent the current tracing and stats collection information. <a href="#a27fc8788690179599713226f1f054736">More...</a><br/></td></tr>
  154. <tr class="separator:a27fc8788690179599713226f1f054736"><td class="memSeparator" colspan="2">&#160;</td></tr>
  155. </table><table class="memberdecls">
  156. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
  157. Enumerations</h2></td></tr>
  158. <tr class="memitem:abe92e59c22481b0de3742673cbbb1bf8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#abe92e59c22481b0de3742673cbbb1bf8">census_features</a> { <br/>
  159. &#160;&#160;<a class="el" href="census_8h.html#abe92e59c22481b0de3742673cbbb1bf8aac1986834f37851b8d899c4a08c8e3ab">CENSUS_FEATURE_NONE</a> = 0,
  160. <a class="el" href="census_8h.html#abe92e59c22481b0de3742673cbbb1bf8ab0722326e730113d5be97f643c3e6718">CENSUS_FEATURE_TRACING</a> = 1,
  161. <a class="el" href="census_8h.html#abe92e59c22481b0de3742673cbbb1bf8a84c772b868e53ee3487c7bfc8e8b2f1a">CENSUS_FEATURE_STATS</a> = 2,
  162. <a class="el" href="census_8h.html#abe92e59c22481b0de3742673cbbb1bf8a4808bff624e2377596b86a6f58ab04b5">CENSUS_FEATURE_CPU</a> = 4,
  163. <br/>
  164. &#160;&#160;<a class="el" href="census_8h.html#abe92e59c22481b0de3742673cbbb1bf8aba96a94fb7af8cf1144ca14edc0b1f0c">CENSUS_FEATURE_ALL</a>
  165. <br/>
  166. }</td></tr>
  167. <tr class="memdesc:abe92e59c22481b0de3742673cbbb1bf8"><td class="mdescLeft">&#160;</td><td class="mdescRight">RPC-internal Census API's. <a href="census_8h.html#abe92e59c22481b0de3742673cbbb1bf8">More...</a><br/></td></tr>
  168. <tr class="separator:abe92e59c22481b0de3742673cbbb1bf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  169. <tr class="memitem:ad4ff7b1db813ee5318871121bb4281cc"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ad4ff7b1db813ee5318871121bb4281cc">census_trace_mask_values</a> { <a class="el" href="census_8h.html#ad4ff7b1db813ee5318871121bb4281cca21afa23a531e5d54e70d44ec3c18cfb3">CENSUS_TRACE_MASK_NONE</a> = 0,
  170. <a class="el" href="census_8h.html#ad4ff7b1db813ee5318871121bb4281ccaadcf28b76de06181051506c96996255a">CENSUS_TRACE_MASK_IS_SAMPLED</a> = 1
  171. }</td></tr>
  172. <tr class="memdesc:ad4ff7b1db813ee5318871121bb4281cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Distributed traces can have a number of options. <a href="census_8h.html#ad4ff7b1db813ee5318871121bb4281cc">More...</a><br/></td></tr>
  173. <tr class="separator:ad4ff7b1db813ee5318871121bb4281cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  174. </table><table class="memberdecls">
  175. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  176. Functions</h2></td></tr>
  177. <tr class="memitem:a850c1ca105245a514e76519d5edaad2c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a850c1ca105245a514e76519d5edaad2c">census_initialize</a> (int features)</td></tr>
  178. <tr class="memdesc:a850c1ca105245a514e76519d5edaad2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shutdown and startup census subsystem. <a href="#a850c1ca105245a514e76519d5edaad2c">More...</a><br/></td></tr>
  179. <tr class="separator:a850c1ca105245a514e76519d5edaad2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  180. <tr class="memitem:ad21073b22ae5c30cad63a29340f54048"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ad21073b22ae5c30cad63a29340f54048">census_shutdown</a> (void)</td></tr>
  181. <tr class="separator:ad21073b22ae5c30cad63a29340f54048"><td class="memSeparator" colspan="2">&#160;</td></tr>
  182. <tr class="memitem:ae22d3c8dfe3bfac5e831b0135ff7a536"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ae22d3c8dfe3bfac5e831b0135ff7a536">census_supported</a> (void)</td></tr>
  183. <tr class="memdesc:ae22d3c8dfe3bfac5e831b0135ff7a536"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the features supported by the current census implementation (not all features will be available on all platforms). <a href="#ae22d3c8dfe3bfac5e831b0135ff7a536">More...</a><br/></td></tr>
  184. <tr class="separator:ae22d3c8dfe3bfac5e831b0135ff7a536"><td class="memSeparator" colspan="2">&#160;</td></tr>
  185. <tr class="memitem:a6964222b3c20833883d7d05ab6b6e67e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a6964222b3c20833883d7d05ab6b6e67e">census_enabled</a> (void)</td></tr>
  186. <tr class="memdesc:a6964222b3c20833883d7d05ab6b6e67e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the census features currently enabled. <a href="#a6964222b3c20833883d7d05ab6b6e67e">More...</a><br/></td></tr>
  187. <tr class="separator:a6964222b3c20833883d7d05ab6b6e67e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  188. <tr class="memitem:a63289de665c241f31e9c32666310ec3a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a63289de665c241f31e9c32666310ec3a">census_context_create</a> (const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *base, const <a class="el" href="structcensus__tag.html">census_tag</a> *tags, int ntags, <a class="el" href="structcensus__context__status.html">census_context_status</a> const **status)</td></tr>
  189. <tr class="memdesc:a63289de665c241f31e9c32666310ec3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new context, adding and removing tags from an existing context. <a href="#a63289de665c241f31e9c32666310ec3a">More...</a><br/></td></tr>
  190. <tr class="separator:a63289de665c241f31e9c32666310ec3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  191. <tr class="memitem:a6e29f72138aac3eac75ef13a7bd25560"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a6e29f72138aac3eac75ef13a7bd25560">census_context_destroy</a> (<a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context)</td></tr>
  192. <tr class="memdesc:a6e29f72138aac3eac75ef13a7bd25560"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a context. <a href="#a6e29f72138aac3eac75ef13a7bd25560">More...</a><br/></td></tr>
  193. <tr class="separator:a6e29f72138aac3eac75ef13a7bd25560"><td class="memSeparator" colspan="2">&#160;</td></tr>
  194. <tr class="memitem:a12077dda197a10bf2198203eac1a348a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> const <br class="typebreak"/>
  195. <a class="el" href="structcensus__context__status.html">census_context_status</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a12077dda197a10bf2198203eac1a348a">census_context_get_status</a> (const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context)</td></tr>
  196. <tr class="memdesc:a12077dda197a10bf2198203eac1a348a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a pointer to the original status from the context creation. <a href="#a12077dda197a10bf2198203eac1a348a">More...</a><br/></td></tr>
  197. <tr class="separator:a12077dda197a10bf2198203eac1a348a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  198. <tr class="memitem:ac19f91fc3442073217752ce4abf5dfc4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ac19f91fc3442073217752ce4abf5dfc4">census_context_initialize_iterator</a> (const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context, <a class="el" href="structcensus__context__iterator.html">census_context_iterator</a> *iterator)</td></tr>
  199. <tr class="memdesc:ac19f91fc3442073217752ce4abf5dfc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a census_tag_iterator. <a href="#ac19f91fc3442073217752ce4abf5dfc4">More...</a><br/></td></tr>
  200. <tr class="separator:ac19f91fc3442073217752ce4abf5dfc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  201. <tr class="memitem:a756d86b68b73a9ad9dacdfdaeb2a865c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a756d86b68b73a9ad9dacdfdaeb2a865c">census_context_next_tag</a> (<a class="el" href="structcensus__context__iterator.html">census_context_iterator</a> *iterator, <a class="el" href="structcensus__tag.html">census_tag</a> *tag)</td></tr>
  202. <tr class="memdesc:a756d86b68b73a9ad9dacdfdaeb2a865c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the contents of the "next" tag in the context. <a href="#a756d86b68b73a9ad9dacdfdaeb2a865c">More...</a><br/></td></tr>
  203. <tr class="separator:a756d86b68b73a9ad9dacdfdaeb2a865c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  204. <tr class="memitem:a610c654980b00da26ed7b2becca79f94"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a610c654980b00da26ed7b2becca79f94">census_context_get_tag</a> (const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context, const char *key, <a class="el" href="structcensus__tag.html">census_tag</a> *tag)</td></tr>
  205. <tr class="memdesc:a610c654980b00da26ed7b2becca79f94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a context tag by key. <a href="#a610c654980b00da26ed7b2becca79f94">More...</a><br/></td></tr>
  206. <tr class="separator:a610c654980b00da26ed7b2becca79f94"><td class="memSeparator" colspan="2">&#160;</td></tr>
  207. <tr class="memitem:a054424f7ca74d513c4dba55dd20d92f2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a054424f7ca74d513c4dba55dd20d92f2">census_context_encode</a> (const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context, char *buffer, size_t buf_size)</td></tr>
  208. <tr class="memdesc:a054424f7ca74d513c4dba55dd20d92f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tag set encode/decode functionality. <a href="#a054424f7ca74d513c4dba55dd20d92f2">More...</a><br/></td></tr>
  209. <tr class="separator:a054424f7ca74d513c4dba55dd20d92f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  210. <tr class="memitem:aaccea127635aaf9200e776eff7c7ba5d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#aaccea127635aaf9200e776eff7c7ba5d">census_context_decode</a> (const char *buffer, size_t size)</td></tr>
  211. <tr class="memdesc:aaccea127635aaf9200e776eff7c7ba5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode context buffer encoded with <a class="el" href="census_8h.html#a054424f7ca74d513c4dba55dd20d92f2" title="Tag set encode/decode functionality. ">census_context_encode()</a>. <a href="#aaccea127635aaf9200e776eff7c7ba5d">More...</a><br/></td></tr>
  212. <tr class="separator:aaccea127635aaf9200e776eff7c7ba5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  213. <tr class="memitem:a2a2dfc973cd259d93b0901c8b32e8f34"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a2a2dfc973cd259d93b0901c8b32e8f34">census_trace_mask</a> (const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context)</td></tr>
  214. <tr class="memdesc:a2a2dfc973cd259d93b0901c8b32e8f34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current trace mask associated with this context. <a href="#a2a2dfc973cd259d93b0901c8b32e8f34">More...</a><br/></td></tr>
  215. <tr class="separator:a2a2dfc973cd259d93b0901c8b32e8f34"><td class="memSeparator" colspan="2">&#160;</td></tr>
  216. <tr class="memitem:a2088bf00a48a7a9b0a6e659fa5161ef9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a2088bf00a48a7a9b0a6e659fa5161ef9">census_set_trace_mask</a> (int trace_mask)</td></tr>
  217. <tr class="memdesc:a2088bf00a48a7a9b0a6e659fa5161ef9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the trace mask associated with a context. <a href="#a2088bf00a48a7a9b0a6e659fa5161ef9">More...</a><br/></td></tr>
  218. <tr class="separator:a2088bf00a48a7a9b0a6e659fa5161ef9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  219. <tr class="memitem:a57255eb87c6ade8ee6eb8856d3ecfc11"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="structcensus__timestamp.html">census_timestamp</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a57255eb87c6ade8ee6eb8856d3ecfc11">census_start_rpc_op_timestamp</a> (void)</td></tr>
  220. <tr class="memdesc:a57255eb87c6ade8ee6eb8856d3ecfc11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark the beginning of an RPC operation. <a href="#a57255eb87c6ade8ee6eb8856d3ecfc11">More...</a><br/></td></tr>
  221. <tr class="separator:a57255eb87c6ade8ee6eb8856d3ecfc11"><td class="memSeparator" colspan="2">&#160;</td></tr>
  222. <tr class="memitem:abd6d5aa344819ec9d73c79b9fe6778dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#abd6d5aa344819ec9d73c79b9fe6778dc">census_start_client_rpc_op</a> (const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context, int64_t rpc_name_id, const <a class="el" href="structcensus__rpc__name__info.html">census_rpc_name_info</a> *rpc_name_info, const char *peer, int trace_mask, const <a class="el" href="structcensus__timestamp.html">census_timestamp</a> *start_time)</td></tr>
  223. <tr class="memdesc:abd6d5aa344819ec9d73c79b9fe6778dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a client rpc operation. <a href="#abd6d5aa344819ec9d73c79b9fe6778dc">More...</a><br/></td></tr>
  224. <tr class="separator:abd6d5aa344819ec9d73c79b9fe6778dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  225. <tr class="memitem:ab20a8e42995181004f5fbc9a87e339d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ab20a8e42995181004f5fbc9a87e339d3">census_set_rpc_client_peer</a> (<a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context, const char *peer)</td></tr>
  226. <tr class="memdesc:ab20a8e42995181004f5fbc9a87e339d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add peer information to a context representing a client RPC operation. <a href="#ab20a8e42995181004f5fbc9a87e339d3">More...</a><br/></td></tr>
  227. <tr class="separator:ab20a8e42995181004f5fbc9a87e339d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  228. <tr class="memitem:a18e3c1cddf38f66a5e8cbf79d7084369"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a18e3c1cddf38f66a5e8cbf79d7084369">census_start_server_rpc_op</a> (const char *buffer, int64_t rpc_name_id, const <a class="el" href="structcensus__rpc__name__info.html">census_rpc_name_info</a> *rpc_name_info, const char *peer, int trace_mask, <a class="el" href="structcensus__timestamp.html">census_timestamp</a> *start_time)</td></tr>
  229. <tr class="memdesc:a18e3c1cddf38f66a5e8cbf79d7084369"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a server RPC operation. <a href="#a18e3c1cddf38f66a5e8cbf79d7084369">More...</a><br/></td></tr>
  230. <tr class="separator:a18e3c1cddf38f66a5e8cbf79d7084369"><td class="memSeparator" colspan="2">&#160;</td></tr>
  231. <tr class="memitem:ae1536ef86b12a6904cb1de3a47f0ca1b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ae1536ef86b12a6904cb1de3a47f0ca1b">census_start_op</a> (<a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context, const char *family, const char *name, int trace_mask)</td></tr>
  232. <tr class="memdesc:ae1536ef86b12a6904cb1de3a47f0ca1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a new, non-RPC operation. <a href="#ae1536ef86b12a6904cb1de3a47f0ca1b">More...</a><br/></td></tr>
  233. <tr class="separator:ae1536ef86b12a6904cb1de3a47f0ca1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  234. <tr class="memitem:aee31ac081d81e46746025b06071f1f0e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#aee31ac081d81e46746025b06071f1f0e">census_end_op</a> (<a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context, int status)</td></tr>
  235. <tr class="memdesc:aee31ac081d81e46746025b06071f1f0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">End an operation started by any of the census_start_*_op*() calls. <a href="#aee31ac081d81e46746025b06071f1f0e">More...</a><br/></td></tr>
  236. <tr class="separator:aee31ac081d81e46746025b06071f1f0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  237. <tr class="memitem:aacf722bf9259354d1ab7a81a6c2fd666"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#aacf722bf9259354d1ab7a81a6c2fd666">census_trace_print</a> (<a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context, uint32_t type, const char *buffer, size_t n)</td></tr>
  238. <tr class="memdesc:aacf722bf9259354d1ab7a81a6c2fd666"><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert a trace record into the trace stream. <a href="#aacf722bf9259354d1ab7a81a6c2fd666">More...</a><br/></td></tr>
  239. <tr class="separator:aacf722bf9259354d1ab7a81a6c2fd666"><td class="memSeparator" colspan="2">&#160;</td></tr>
  240. <tr class="memitem:ad78c02761da0d8a7a70bf4add263f91f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ad78c02761da0d8a7a70bf4add263f91f">census_trace_scan_start</a> (int consume)</td></tr>
  241. <tr class="memdesc:ad78c02761da0d8a7a70bf4add263f91f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a scan of existing trace records. <a href="#ad78c02761da0d8a7a70bf4add263f91f">More...</a><br/></td></tr>
  242. <tr class="separator:ad78c02761da0d8a7a70bf4add263f91f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  243. <tr class="memitem:aeb5d22e80a87eabe9880f08c56e95bf1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#aeb5d22e80a87eabe9880f08c56e95bf1">census_get_trace_record</a> (<a class="el" href="structcensus__trace__record.html">census_trace_record</a> *trace_record)</td></tr>
  244. <tr class="memdesc:aeb5d22e80a87eabe9880f08c56e95bf1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a trace record. <a href="#aeb5d22e80a87eabe9880f08c56e95bf1">More...</a><br/></td></tr>
  245. <tr class="separator:aeb5d22e80a87eabe9880f08c56e95bf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  246. <tr class="memitem:a22eb7df4c9b232d8962592d738007ecb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a22eb7df4c9b232d8962592d738007ecb">census_trace_scan_end</a> ()</td></tr>
  247. <tr class="memdesc:a22eb7df4c9b232d8962592d738007ecb"><td class="mdescLeft">&#160;</td><td class="mdescRight">End a scan previously started by <a class="el" href="census_8h.html#ad78c02761da0d8a7a70bf4add263f91f" title="Start a scan of existing trace records. ">census_trace_scan_start()</a> <a href="#a22eb7df4c9b232d8962592d738007ecb">More...</a><br/></td></tr>
  248. <tr class="separator:a22eb7df4c9b232d8962592d738007ecb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  249. <tr class="memitem:a689ea02b5b0907f69ecb0baee371aa55"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a689ea02b5b0907f69ecb0baee371aa55">census_define_resource</a> (const uint8_t *resource_pb, size_t resource_pb_size)</td></tr>
  250. <tr class="memdesc:a689ea02b5b0907f69ecb0baee371aa55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Core stats collection API's. <a href="#a689ea02b5b0907f69ecb0baee371aa55">More...</a><br/></td></tr>
  251. <tr class="separator:a689ea02b5b0907f69ecb0baee371aa55"><td class="memSeparator" colspan="2">&#160;</td></tr>
  252. <tr class="memitem:ac68fd1dbb1767d8e080ec22f4767be89"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#ac68fd1dbb1767d8e080ec22f4767be89">census_delete_resource</a> (int32_t resource_id)</td></tr>
  253. <tr class="memdesc:ac68fd1dbb1767d8e080ec22f4767be89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete a resource created by <a class="el" href="census_8h.html#a689ea02b5b0907f69ecb0baee371aa55" title="Core stats collection API&#39;s. ">census_define_resource()</a>. <a href="#ac68fd1dbb1767d8e080ec22f4767be89">More...</a><br/></td></tr>
  254. <tr class="separator:ac68fd1dbb1767d8e080ec22f4767be89"><td class="memSeparator" colspan="2">&#160;</td></tr>
  255. <tr class="memitem:aeb7f7e4f427236d00446d2eb836c5252"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#aeb7f7e4f427236d00446d2eb836c5252">census_resource_id</a> (const char *name)</td></tr>
  256. <tr class="memdesc:aeb7f7e4f427236d00446d2eb836c5252"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine the id of a resource, given its name. <a href="#aeb7f7e4f427236d00446d2eb836c5252">More...</a><br/></td></tr>
  257. <tr class="separator:aeb7f7e4f427236d00446d2eb836c5252"><td class="memSeparator" colspan="2">&#160;</td></tr>
  258. <tr class="memitem:a26acfcba7f6b3f2b86d0a7fdc45e32ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="census_8h.html#a26acfcba7f6b3f2b86d0a7fdc45e32ba">census_record_values</a> (<a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *context, <a class="el" href="structcensus__value.html">census_value</a> *values, size_t nvalues)</td></tr>
  259. <tr class="memdesc:a26acfcba7f6b3f2b86d0a7fdc45e32ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Record new usage values against the given context. <a href="#a26acfcba7f6b3f2b86d0a7fdc45e32ba">More...</a><br/></td></tr>
  260. <tr class="separator:a26acfcba7f6b3f2b86d0a7fdc45e32ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  261. </table>
  262. <h2 class="groupheader">Macro Definition Documentation</h2>
  263. <a class="anchor" id="a487ca94a4b349f1a7d3d28a21b154f4e"></a>
  264. <div class="memitem">
  265. <div class="memproto">
  266. <table class="memname">
  267. <tr>
  268. <td class="memname">#define CENSUS_MAX_PROPAGATED_TAGS&#160;&#160;&#160;255</td>
  269. </tr>
  270. </table>
  271. </div><div class="memdoc">
  272. <p>Maximum number of propagatable tags. </p>
  273. </div>
  274. </div>
  275. <a class="anchor" id="ac3fa459cd0c1621953c46b07bac2faa7"></a>
  276. <div class="memitem">
  277. <div class="memproto">
  278. <table class="memname">
  279. <tr>
  280. <td class="memname">#define CENSUS_MAX_TAG_KV_LEN&#160;&#160;&#160;255</td>
  281. </tr>
  282. </table>
  283. </div><div class="memdoc">
  284. <p>Maximum length of a tag's key or value. </p>
  285. </div>
  286. </div>
  287. <a class="anchor" id="afa3a818c132d55bb1f0afb7442d8f848"></a>
  288. <div class="memitem">
  289. <div class="memproto">
  290. <table class="memname">
  291. <tr>
  292. <td class="memname">#define CENSUS_TAG_IS_PROPAGATED</td>
  293. <td>(</td>
  294. <td class="paramtype">&#160;</td>
  295. <td class="paramname">flags</td><td>)</td>
  296. <td>&#160;&#160;&#160;(flags &amp; <a class="el" href="census_8h.html#ac116a5843bd29f43a949c56ef5ae619a">CENSUS_TAG_PROPAGATE</a>)</td>
  297. </tr>
  298. </table>
  299. </div><div class="memdoc">
  300. <p>Flag values 4,8,16,32,64,128 are reserved for future/internal use. </p>
  301. <p>Clients should not use or rely on their values. </p>
  302. </div>
  303. </div>
  304. <a class="anchor" id="aaca94b54b685c481236dfb913fef8b4c"></a>
  305. <div class="memitem">
  306. <div class="memproto">
  307. <table class="memname">
  308. <tr>
  309. <td class="memname">#define CENSUS_TAG_IS_STATS</td>
  310. <td>(</td>
  311. <td class="paramtype">&#160;</td>
  312. <td class="paramname">flags</td><td>)</td>
  313. <td>&#160;&#160;&#160;(flags &amp; <a class="el" href="census_8h.html#ab3c3a66a8c2f392d4a14e75dc44e8931">CENSUS_TAG_STATS</a>)</td>
  314. </tr>
  315. </table>
  316. </div><div class="memdoc">
  317. </div>
  318. </div>
  319. <a class="anchor" id="ac116a5843bd29f43a949c56ef5ae619a"></a>
  320. <div class="memitem">
  321. <div class="memproto">
  322. <table class="memname">
  323. <tr>
  324. <td class="memname">#define CENSUS_TAG_PROPAGATE&#160;&#160;&#160;1 /** Tag should be propagated over RPC */</td>
  325. </tr>
  326. </table>
  327. </div><div class="memdoc">
  328. <p>Tag flags. </p>
  329. </div>
  330. </div>
  331. <a class="anchor" id="a070dd8c57a1a31ced0c7ead5a5910df7"></a>
  332. <div class="memitem">
  333. <div class="memproto">
  334. <table class="memname">
  335. <tr>
  336. <td class="memname">#define CENSUS_TAG_RESERVED&#160;&#160;&#160;4 /** Reserved for internal use. */</td>
  337. </tr>
  338. </table>
  339. </div><div class="memdoc">
  340. </div>
  341. </div>
  342. <a class="anchor" id="ab3c3a66a8c2f392d4a14e75dc44e8931"></a>
  343. <div class="memitem">
  344. <div class="memproto">
  345. <table class="memname">
  346. <tr>
  347. <td class="memname">#define CENSUS_TAG_STATS&#160;&#160;&#160;2 /** Tag will be used for statistics aggregation */</td>
  348. </tr>
  349. </table>
  350. </div><div class="memdoc">
  351. </div>
  352. </div>
  353. <a class="anchor" id="a003fb5bda98c95408a21d3a47571a1e9"></a>
  354. <div class="memitem">
  355. <div class="memproto">
  356. <table class="memname">
  357. <tr>
  358. <td class="memname">#define CENSUS_TRACE_RECORD_END_OP&#160;&#160;&#160;((uint32_t)1)</td>
  359. </tr>
  360. </table>
  361. </div><div class="memdoc">
  362. </div>
  363. </div>
  364. <a class="anchor" id="acb35403ed23ba2615457fabaa0b430e7"></a>
  365. <div class="memitem">
  366. <div class="memproto">
  367. <table class="memname">
  368. <tr>
  369. <td class="memname">#define CENSUS_TRACE_RECORD_START_OP&#160;&#160;&#160;((uint32_t)0)</td>
  370. </tr>
  371. </table>
  372. </div><div class="memdoc">
  373. </div>
  374. </div>
  375. <h2 class="groupheader">Typedef Documentation</h2>
  376. <a class="anchor" id="a27fc8788690179599713226f1f054736"></a>
  377. <div class="memitem">
  378. <div class="memproto">
  379. <table class="memname">
  380. <tr>
  381. <td class="memname">typedef struct <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a></td>
  382. </tr>
  383. </table>
  384. </div><div class="memdoc">
  385. <p>A Census Context is a handle used by Census to represent the current tracing and stats collection information. </p>
  386. <p>Contexts should be propagated across RPC's (this is the responsibility of the local RPC system). A context is typically used as the first argument to most census functions. Conceptually, they should be thought of as specific to a single RPC/thread. The user visible context representation is that of a collection of key:value string pairs, each of which is termed a 'tag'; these form the basis against which Census metrics will be recorded. Keys are unique within a context. </p>
  387. </div>
  388. </div>
  389. <h2 class="groupheader">Enumeration Type Documentation</h2>
  390. <a class="anchor" id="abe92e59c22481b0de3742673cbbb1bf8"></a>
  391. <div class="memitem">
  392. <div class="memproto">
  393. <table class="memname">
  394. <tr>
  395. <td class="memname">enum <a class="el" href="census_8h.html#abe92e59c22481b0de3742673cbbb1bf8">census_features</a></td>
  396. </tr>
  397. </table>
  398. </div><div class="memdoc">
  399. <p>RPC-internal Census API's. </p>
  400. <p>These are designed to be generic enough that they can (ultimately) be used in many different RPC systems (with differing implementations). Identify census features that can be enabled via <a class="el" href="census_8h.html#a850c1ca105245a514e76519d5edaad2c" title="Shutdown and startup census subsystem. ">census_initialize()</a>. </p>
  401. <table class="fieldtable">
  402. <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="abe92e59c22481b0de3742673cbbb1bf8aac1986834f37851b8d899c4a08c8e3ab"></a>CENSUS_FEATURE_NONE</em>&#160;</td><td class="fielddoc">
  403. </td></tr>
  404. <tr><td class="fieldname"><em><a class="anchor" id="abe92e59c22481b0de3742673cbbb1bf8ab0722326e730113d5be97f643c3e6718"></a>CENSUS_FEATURE_TRACING</em>&#160;</td><td class="fielddoc">
  405. <p>Do not enable census. </p>
  406. </td></tr>
  407. <tr><td class="fieldname"><em><a class="anchor" id="abe92e59c22481b0de3742673cbbb1bf8a84c772b868e53ee3487c7bfc8e8b2f1a"></a>CENSUS_FEATURE_STATS</em>&#160;</td><td class="fielddoc">
  408. <p>Enable census tracing. </p>
  409. </td></tr>
  410. <tr><td class="fieldname"><em><a class="anchor" id="abe92e59c22481b0de3742673cbbb1bf8a4808bff624e2377596b86a6f58ab04b5"></a>CENSUS_FEATURE_CPU</em>&#160;</td><td class="fielddoc">
  411. <p>Enable Census stats collection. </p>
  412. </td></tr>
  413. <tr><td class="fieldname"><em><a class="anchor" id="abe92e59c22481b0de3742673cbbb1bf8aba96a94fb7af8cf1144ca14edc0b1f0c"></a>CENSUS_FEATURE_ALL</em>&#160;</td><td class="fielddoc">
  414. <p>Enable Census CPU usage collection. </p>
  415. </td></tr>
  416. </table>
  417. </div>
  418. </div>
  419. <a class="anchor" id="ad4ff7b1db813ee5318871121bb4281cc"></a>
  420. <div class="memitem">
  421. <div class="memproto">
  422. <table class="memname">
  423. <tr>
  424. <td class="memname">enum <a class="el" href="census_8h.html#ad4ff7b1db813ee5318871121bb4281cc">census_trace_mask_values</a></td>
  425. </tr>
  426. </table>
  427. </div><div class="memdoc">
  428. <p>Distributed traces can have a number of options. </p>
  429. <table class="fieldtable">
  430. <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ad4ff7b1db813ee5318871121bb4281cca21afa23a531e5d54e70d44ec3c18cfb3"></a>CENSUS_TRACE_MASK_NONE</em>&#160;</td><td class="fielddoc">
  431. </td></tr>
  432. <tr><td class="fieldname"><em><a class="anchor" id="ad4ff7b1db813ee5318871121bb4281ccaadcf28b76de06181051506c96996255a"></a>CENSUS_TRACE_MASK_IS_SAMPLED</em>&#160;</td><td class="fielddoc">
  433. <p>Default, empty flags. </p>
  434. </td></tr>
  435. </table>
  436. </div>
  437. </div>
  438. <h2 class="groupheader">Function Documentation</h2>
  439. <a class="anchor" id="a63289de665c241f31e9c32666310ec3a"></a>
  440. <div class="memitem">
  441. <div class="memproto">
  442. <table class="memname">
  443. <tr>
  444. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a>* census_context_create </td>
  445. <td>(</td>
  446. <td class="paramtype">const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  447. <td class="paramname"><em>base</em>, </td>
  448. </tr>
  449. <tr>
  450. <td class="paramkey"></td>
  451. <td></td>
  452. <td class="paramtype">const <a class="el" href="structcensus__tag.html">census_tag</a> *&#160;</td>
  453. <td class="paramname"><em>tags</em>, </td>
  454. </tr>
  455. <tr>
  456. <td class="paramkey"></td>
  457. <td></td>
  458. <td class="paramtype">int&#160;</td>
  459. <td class="paramname"><em>ntags</em>, </td>
  460. </tr>
  461. <tr>
  462. <td class="paramkey"></td>
  463. <td></td>
  464. <td class="paramtype"><a class="el" href="structcensus__context__status.html">census_context_status</a> const **&#160;</td>
  465. <td class="paramname"><em>status</em>&#160;</td>
  466. </tr>
  467. <tr>
  468. <td></td>
  469. <td>)</td>
  470. <td></td><td></td>
  471. </tr>
  472. </table>
  473. </div><div class="memdoc">
  474. <p>Create a new context, adding and removing tags from an existing context. </p>
  475. <p>This will copy all tags from the 'tags' input, so it is recommended to add as many tags in a single operation as is practical for the client. </p>
  476. <dl class="params"><dt>Parameters</dt><dd>
  477. <table class="params">
  478. <tr><td class="paramname">base</td><td>Base context to build upon. Can be NULL. </td></tr>
  479. <tr><td class="paramname">tags</td><td>A set of tags to be added/changed/deleted. Tags with keys that are in 'tags', but not 'base', are added to the context. Keys that are in both 'tags' and 'base' will have their value/flags modified. Tags with keys in both, but with NULL values, will be deleted from the context. Tags with invalid (too long or short) keys or values will be ignored. If adding a tag will result in more than CENSUS_MAX_PROPAGATED_TAGS in either binary or non-binary tags, they will be ignored, as will deletions of tags that don't exist. </td></tr>
  480. <tr><td class="paramname">ntags</td><td>number of tags in 'tags' </td></tr>
  481. <tr><td class="paramname">status</td><td>If not NULL, will return a pointer to a <a class="el" href="structcensus__context__status.html" title="An instance of this structure is kept by every context, and records the basic information associated ...">census_context_status</a> structure containing information about the new context and status of the tags used in its creation. </td></tr>
  482. </table>
  483. </dd>
  484. </dl>
  485. <dl class="section return"><dt>Returns</dt><dd>A new, valid census_context. </dd></dl>
  486. </div>
  487. </div>
  488. <a class="anchor" id="aaccea127635aaf9200e776eff7c7ba5d"></a>
  489. <div class="memitem">
  490. <div class="memproto">
  491. <table class="memname">
  492. <tr>
  493. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a>* census_context_decode </td>
  494. <td>(</td>
  495. <td class="paramtype">const char *&#160;</td>
  496. <td class="paramname"><em>buffer</em>, </td>
  497. </tr>
  498. <tr>
  499. <td class="paramkey"></td>
  500. <td></td>
  501. <td class="paramtype">size_t&#160;</td>
  502. <td class="paramname"><em>size</em>&#160;</td>
  503. </tr>
  504. <tr>
  505. <td></td>
  506. <td>)</td>
  507. <td></td><td></td>
  508. </tr>
  509. </table>
  510. </div><div class="memdoc">
  511. <p>Decode context buffer encoded with <a class="el" href="census_8h.html#a054424f7ca74d513c4dba55dd20d92f2" title="Tag set encode/decode functionality. ">census_context_encode()</a>. </p>
  512. <p>Returns NULL if there is an error in parsing either buffer. </p>
  513. </div>
  514. </div>
  515. <a class="anchor" id="a6e29f72138aac3eac75ef13a7bd25560"></a>
  516. <div class="memitem">
  517. <div class="memproto">
  518. <table class="memname">
  519. <tr>
  520. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_context_destroy </td>
  521. <td>(</td>
  522. <td class="paramtype"><a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  523. <td class="paramname"><em>context</em></td><td>)</td>
  524. <td></td>
  525. </tr>
  526. </table>
  527. </div><div class="memdoc">
  528. <p>Destroy a context. </p>
  529. <p>Once this function has been called, the context cannot be reused. </p>
  530. </div>
  531. </div>
  532. <a class="anchor" id="a054424f7ca74d513c4dba55dd20d92f2"></a>
  533. <div class="memitem">
  534. <div class="memproto">
  535. <table class="memname">
  536. <tr>
  537. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> size_t census_context_encode </td>
  538. <td>(</td>
  539. <td class="paramtype">const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  540. <td class="paramname"><em>context</em>, </td>
  541. </tr>
  542. <tr>
  543. <td class="paramkey"></td>
  544. <td></td>
  545. <td class="paramtype">char *&#160;</td>
  546. <td class="paramname"><em>buffer</em>, </td>
  547. </tr>
  548. <tr>
  549. <td class="paramkey"></td>
  550. <td></td>
  551. <td class="paramtype">size_t&#160;</td>
  552. <td class="paramname"><em>buf_size</em>&#160;</td>
  553. </tr>
  554. <tr>
  555. <td></td>
  556. <td>)</td>
  557. <td></td><td></td>
  558. </tr>
  559. </table>
  560. </div><div class="memdoc">
  561. <p>Tag set encode/decode functionality. </p>
  562. <p>These functions are intended for use by RPC systems only, for purposes of transmitting/receiving contexts. Encode a context into a buffer. </p>
  563. <dl class="params"><dt>Parameters</dt><dd>
  564. <table class="params">
  565. <tr><td class="paramname">context</td><td>context to be encoded </td></tr>
  566. <tr><td class="paramname">buffer</td><td>buffer into which the context will be encoded. </td></tr>
  567. <tr><td class="paramname">buf_size</td><td>number of available bytes in buffer. </td></tr>
  568. </table>
  569. </dd>
  570. </dl>
  571. <dl class="section return"><dt>Returns</dt><dd>The number of buffer bytes consumed for the encoded context, or zero if the buffer was of insufficient size. </dd></dl>
  572. </div>
  573. </div>
  574. <a class="anchor" id="a12077dda197a10bf2198203eac1a348a"></a>
  575. <div class="memitem">
  576. <div class="memproto">
  577. <table class="memname">
  578. <tr>
  579. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> const <a class="el" href="structcensus__context__status.html">census_context_status</a>* census_context_get_status </td>
  580. <td>(</td>
  581. <td class="paramtype">const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  582. <td class="paramname"><em>context</em></td><td>)</td>
  583. <td></td>
  584. </tr>
  585. </table>
  586. </div><div class="memdoc">
  587. <p>Get a pointer to the original status from the context creation. </p>
  588. </div>
  589. </div>
  590. <a class="anchor" id="a610c654980b00da26ed7b2becca79f94"></a>
  591. <div class="memitem">
  592. <div class="memproto">
  593. <table class="memname">
  594. <tr>
  595. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int census_context_get_tag </td>
  596. <td>(</td>
  597. <td class="paramtype">const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  598. <td class="paramname"><em>context</em>, </td>
  599. </tr>
  600. <tr>
  601. <td class="paramkey"></td>
  602. <td></td>
  603. <td class="paramtype">const char *&#160;</td>
  604. <td class="paramname"><em>key</em>, </td>
  605. </tr>
  606. <tr>
  607. <td class="paramkey"></td>
  608. <td></td>
  609. <td class="paramtype"><a class="el" href="structcensus__tag.html">census_tag</a> *&#160;</td>
  610. <td class="paramname"><em>tag</em>&#160;</td>
  611. </tr>
  612. <tr>
  613. <td></td>
  614. <td>)</td>
  615. <td></td><td></td>
  616. </tr>
  617. </table>
  618. </div><div class="memdoc">
  619. <p>Get a context tag by key. </p>
  620. <p>Returns 0 if the key is not present. </p>
  621. </div>
  622. </div>
  623. <a class="anchor" id="ac19f91fc3442073217752ce4abf5dfc4"></a>
  624. <div class="memitem">
  625. <div class="memproto">
  626. <table class="memname">
  627. <tr>
  628. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_context_initialize_iterator </td>
  629. <td>(</td>
  630. <td class="paramtype">const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  631. <td class="paramname"><em>context</em>, </td>
  632. </tr>
  633. <tr>
  634. <td class="paramkey"></td>
  635. <td></td>
  636. <td class="paramtype"><a class="el" href="structcensus__context__iterator.html">census_context_iterator</a> *&#160;</td>
  637. <td class="paramname"><em>iterator</em>&#160;</td>
  638. </tr>
  639. <tr>
  640. <td></td>
  641. <td>)</td>
  642. <td></td><td></td>
  643. </tr>
  644. </table>
  645. </div><div class="memdoc">
  646. <p>Initialize a census_tag_iterator. </p>
  647. <p>Must be called before first use. </p>
  648. </div>
  649. </div>
  650. <a class="anchor" id="a756d86b68b73a9ad9dacdfdaeb2a865c"></a>
  651. <div class="memitem">
  652. <div class="memproto">
  653. <table class="memname">
  654. <tr>
  655. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int census_context_next_tag </td>
  656. <td>(</td>
  657. <td class="paramtype"><a class="el" href="structcensus__context__iterator.html">census_context_iterator</a> *&#160;</td>
  658. <td class="paramname"><em>iterator</em>, </td>
  659. </tr>
  660. <tr>
  661. <td class="paramkey"></td>
  662. <td></td>
  663. <td class="paramtype"><a class="el" href="structcensus__tag.html">census_tag</a> *&#160;</td>
  664. <td class="paramname"><em>tag</em>&#160;</td>
  665. </tr>
  666. <tr>
  667. <td></td>
  668. <td>)</td>
  669. <td></td><td></td>
  670. </tr>
  671. </table>
  672. </div><div class="memdoc">
  673. <p>Get the contents of the "next" tag in the context. </p>
  674. <p>If there are no more tags, returns 0 (and 'tag' contents will be unchanged), otherwise returns 1. </p>
  675. </div>
  676. </div>
  677. <a class="anchor" id="a689ea02b5b0907f69ecb0baee371aa55"></a>
  678. <div class="memitem">
  679. <div class="memproto">
  680. <table class="memname">
  681. <tr>
  682. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int32_t census_define_resource </td>
  683. <td>(</td>
  684. <td class="paramtype">const uint8_t *&#160;</td>
  685. <td class="paramname"><em>resource_pb</em>, </td>
  686. </tr>
  687. <tr>
  688. <td class="paramkey"></td>
  689. <td></td>
  690. <td class="paramtype">size_t&#160;</td>
  691. <td class="paramname"><em>resource_pb_size</em>&#160;</td>
  692. </tr>
  693. <tr>
  694. <td></td>
  695. <td>)</td>
  696. <td></td><td></td>
  697. </tr>
  698. </table>
  699. </div><div class="memdoc">
  700. <p>Core stats collection API's. </p>
  701. <p>The following concepts are used: Resource: Users record measurements for a single resource. Examples include RPC latency, CPU seconds consumed, and bytes transmitted. Aggregation: An aggregation of a set of measurements. Census supports the following aggregation types: Distribution - statistical distribution information, used for recording average, standard deviation etc. Can include a histogram. Interval - a count of events that happen in a rolling time window. View: A view is a combination of a Resource, a set of tag keys and an Aggregation. When a measurement for a Resource matches the View tags, it is recorded (for each unique set of tag values) using the Aggregation type. Each resource can have an arbitrary number of views by which it will be broken down.</p>
  702. <p>Census uses protos to define each of the above, and output results. This ensures unification across the different language and runtime implementations. The proto definitions can be found in src/proto/census. Define a new resource. <code>resource_pb</code> should contain an encoded Resource protobuf, <code>resource_pb_size</code> being the size of the buffer. Returns a -ve value on error, or a positive (&gt;= 0) resource id (for use in <a class="el" href="census_8h.html#ac68fd1dbb1767d8e080ec22f4767be89" title="Delete a resource created by census_define_resource(). ">census_delete_resource()</a> and <a class="el" href="census_8h.html#a26acfcba7f6b3f2b86d0a7fdc45e32ba" title="Record new usage values against the given context. ">census_record_values()</a>). In order to be valid, a resource must have a name, and at least one numerator in its unit type. The resource name must be unique, and an error will be returned if it is not. </p>
  703. </div>
  704. </div>
  705. <a class="anchor" id="ac68fd1dbb1767d8e080ec22f4767be89"></a>
  706. <div class="memitem">
  707. <div class="memproto">
  708. <table class="memname">
  709. <tr>
  710. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_delete_resource </td>
  711. <td>(</td>
  712. <td class="paramtype">int32_t&#160;</td>
  713. <td class="paramname"><em>resource_id</em></td><td>)</td>
  714. <td></td>
  715. </tr>
  716. </table>
  717. </div><div class="memdoc">
  718. <p>Delete a resource created by <a class="el" href="census_8h.html#a689ea02b5b0907f69ecb0baee371aa55" title="Core stats collection API&#39;s. ">census_define_resource()</a>. </p>
  719. </div>
  720. </div>
  721. <a class="anchor" id="a6964222b3c20833883d7d05ab6b6e67e"></a>
  722. <div class="memitem">
  723. <div class="memproto">
  724. <table class="memname">
  725. <tr>
  726. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int census_enabled </td>
  727. <td>(</td>
  728. <td class="paramtype">void&#160;</td>
  729. <td class="paramname"></td><td>)</td>
  730. <td></td>
  731. </tr>
  732. </table>
  733. </div><div class="memdoc">
  734. <p>Return the census features currently enabled. </p>
  735. </div>
  736. </div>
  737. <a class="anchor" id="aee31ac081d81e46746025b06071f1f0e"></a>
  738. <div class="memitem">
  739. <div class="memproto">
  740. <table class="memname">
  741. <tr>
  742. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_end_op </td>
  743. <td>(</td>
  744. <td class="paramtype"><a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  745. <td class="paramname"><em>context</em>, </td>
  746. </tr>
  747. <tr>
  748. <td class="paramkey"></td>
  749. <td></td>
  750. <td class="paramtype">int&#160;</td>
  751. <td class="paramname"><em>status</em>&#160;</td>
  752. </tr>
  753. <tr>
  754. <td></td>
  755. <td>)</td>
  756. <td></td><td></td>
  757. </tr>
  758. </table>
  759. </div><div class="memdoc">
  760. <p>End an operation started by any of the census_start_*_op*() calls. </p>
  761. <p>The context used in this call will no longer be valid once this function completes.</p>
  762. <dl class="params"><dt>Parameters</dt><dd>
  763. <table class="params">
  764. <tr><td class="paramname">context</td><td>Context associated with operation which is ending. </td></tr>
  765. <tr><td class="paramname">status</td><td>status associated with the operation. Not interpreted by census. </td></tr>
  766. </table>
  767. </dd>
  768. </dl>
  769. </div>
  770. </div>
  771. <a class="anchor" id="aeb5d22e80a87eabe9880f08c56e95bf1"></a>
  772. <div class="memitem">
  773. <div class="memproto">
  774. <table class="memname">
  775. <tr>
  776. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int census_get_trace_record </td>
  777. <td>(</td>
  778. <td class="paramtype"><a class="el" href="structcensus__trace__record.html">census_trace_record</a> *&#160;</td>
  779. <td class="paramname"><em>trace_record</em></td><td>)</td>
  780. <td></td>
  781. </tr>
  782. </table>
  783. </div><div class="memdoc">
  784. <p>Get a trace record. </p>
  785. <p>The data pointed to by the trace buffer is guaranteed stable until the next <a class="el" href="census_8h.html#aeb5d22e80a87eabe9880f08c56e95bf1" title="Get a trace record. ">census_get_trace_record()</a> call (if the consume argument to census_trace_scan_start was non-zero) or <a class="el" href="census_8h.html#a22eb7df4c9b232d8962592d738007ecb" title="End a scan previously started by census_trace_scan_start() ">census_trace_scan_end()</a> is called (otherwise). </p>
  786. <dl class="params"><dt>Parameters</dt><dd>
  787. <table class="params">
  788. <tr><td class="paramname">trace_record</td><td>structure that will be filled in with oldest trace record. </td></tr>
  789. </table>
  790. </dd>
  791. </dl>
  792. <dl class="section return"><dt>Returns</dt><dd>-1 if an error occurred (e.g. no previous call to <a class="el" href="census_8h.html#ad78c02761da0d8a7a70bf4add263f91f" title="Start a scan of existing trace records. ">census_trace_scan_start()</a>), 0 if there is no more trace data (and trace_record will not be modified) or 1 otherwise. </dd></dl>
  793. </div>
  794. </div>
  795. <a class="anchor" id="a850c1ca105245a514e76519d5edaad2c"></a>
  796. <div class="memitem">
  797. <div class="memproto">
  798. <table class="memname">
  799. <tr>
  800. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int census_initialize </td>
  801. <td>(</td>
  802. <td class="paramtype">int&#160;</td>
  803. <td class="paramname"><em>features</em></td><td>)</td>
  804. <td></td>
  805. </tr>
  806. </table>
  807. </div><div class="memdoc">
  808. <p>Shutdown and startup census subsystem. </p>
  809. <p>The 'features' argument should be the OR (|) of census_features values. If census fails to initialize, then <a class="el" href="census_8h.html#a850c1ca105245a514e76519d5edaad2c" title="Shutdown and startup census subsystem. ">census_initialize()</a> will return -1, otherwise the set of enabled features (which may be smaller than that provided in the <code>features</code> argument, see <a class="el" href="census_8h.html#ae22d3c8dfe3bfac5e831b0135ff7a536" title="Return the features supported by the current census implementation (not all features will be availabl...">census_supported()</a>) is returned. It is an error to call <a class="el" href="census_8h.html#a850c1ca105245a514e76519d5edaad2c" title="Shutdown and startup census subsystem. ">census_initialize()</a> more than once (without an intervening <a class="el" href="census_8h.html#ad21073b22ae5c30cad63a29340f54048">census_shutdown()</a>). These functions are not thread-safe. </p>
  810. </div>
  811. </div>
  812. <a class="anchor" id="a26acfcba7f6b3f2b86d0a7fdc45e32ba"></a>
  813. <div class="memitem">
  814. <div class="memproto">
  815. <table class="memname">
  816. <tr>
  817. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_record_values </td>
  818. <td>(</td>
  819. <td class="paramtype"><a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  820. <td class="paramname"><em>context</em>, </td>
  821. </tr>
  822. <tr>
  823. <td class="paramkey"></td>
  824. <td></td>
  825. <td class="paramtype"><a class="el" href="structcensus__value.html">census_value</a> *&#160;</td>
  826. <td class="paramname"><em>values</em>, </td>
  827. </tr>
  828. <tr>
  829. <td class="paramkey"></td>
  830. <td></td>
  831. <td class="paramtype">size_t&#160;</td>
  832. <td class="paramname"><em>nvalues</em>&#160;</td>
  833. </tr>
  834. <tr>
  835. <td></td>
  836. <td>)</td>
  837. <td></td><td></td>
  838. </tr>
  839. </table>
  840. </div><div class="memdoc">
  841. <p>Record new usage values against the given context. </p>
  842. </div>
  843. </div>
  844. <a class="anchor" id="aeb7f7e4f427236d00446d2eb836c5252"></a>
  845. <div class="memitem">
  846. <div class="memproto">
  847. <table class="memname">
  848. <tr>
  849. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int32_t census_resource_id </td>
  850. <td>(</td>
  851. <td class="paramtype">const char *&#160;</td>
  852. <td class="paramname"><em>name</em></td><td>)</td>
  853. <td></td>
  854. </tr>
  855. </table>
  856. </div><div class="memdoc">
  857. <p>Determine the id of a resource, given its name. </p>
  858. <p>returns -1 if the resource does not exist. </p>
  859. </div>
  860. </div>
  861. <a class="anchor" id="ab20a8e42995181004f5fbc9a87e339d3"></a>
  862. <div class="memitem">
  863. <div class="memproto">
  864. <table class="memname">
  865. <tr>
  866. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_set_rpc_client_peer </td>
  867. <td>(</td>
  868. <td class="paramtype"><a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  869. <td class="paramname"><em>context</em>, </td>
  870. </tr>
  871. <tr>
  872. <td class="paramkey"></td>
  873. <td></td>
  874. <td class="paramtype">const char *&#160;</td>
  875. <td class="paramname"><em>peer</em>&#160;</td>
  876. </tr>
  877. <tr>
  878. <td></td>
  879. <td>)</td>
  880. <td></td><td></td>
  881. </tr>
  882. </table>
  883. </div><div class="memdoc">
  884. <p>Add peer information to a context representing a client RPC operation. </p>
  885. </div>
  886. </div>
  887. <a class="anchor" id="a2088bf00a48a7a9b0a6e659fa5161ef9"></a>
  888. <div class="memitem">
  889. <div class="memproto">
  890. <table class="memname">
  891. <tr>
  892. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_set_trace_mask </td>
  893. <td>(</td>
  894. <td class="paramtype">int&#160;</td>
  895. <td class="paramname"><em>trace_mask</em></td><td>)</td>
  896. <td></td>
  897. </tr>
  898. </table>
  899. </div><div class="memdoc">
  900. <p>Set the trace mask associated with a context. </p>
  901. </div>
  902. </div>
  903. <a class="anchor" id="ad21073b22ae5c30cad63a29340f54048"></a>
  904. <div class="memitem">
  905. <div class="memproto">
  906. <table class="memname">
  907. <tr>
  908. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_shutdown </td>
  909. <td>(</td>
  910. <td class="paramtype">void&#160;</td>
  911. <td class="paramname"></td><td>)</td>
  912. <td></td>
  913. </tr>
  914. </table>
  915. </div><div class="memdoc">
  916. </div>
  917. </div>
  918. <a class="anchor" id="abd6d5aa344819ec9d73c79b9fe6778dc"></a>
  919. <div class="memitem">
  920. <div class="memproto">
  921. <table class="memname">
  922. <tr>
  923. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a>* census_start_client_rpc_op </td>
  924. <td>(</td>
  925. <td class="paramtype">const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  926. <td class="paramname"><em>context</em>, </td>
  927. </tr>
  928. <tr>
  929. <td class="paramkey"></td>
  930. <td></td>
  931. <td class="paramtype">int64_t&#160;</td>
  932. <td class="paramname"><em>rpc_name_id</em>, </td>
  933. </tr>
  934. <tr>
  935. <td class="paramkey"></td>
  936. <td></td>
  937. <td class="paramtype">const <a class="el" href="structcensus__rpc__name__info.html">census_rpc_name_info</a> *&#160;</td>
  938. <td class="paramname"><em>rpc_name_info</em>, </td>
  939. </tr>
  940. <tr>
  941. <td class="paramkey"></td>
  942. <td></td>
  943. <td class="paramtype">const char *&#160;</td>
  944. <td class="paramname"><em>peer</em>, </td>
  945. </tr>
  946. <tr>
  947. <td class="paramkey"></td>
  948. <td></td>
  949. <td class="paramtype">int&#160;</td>
  950. <td class="paramname"><em>trace_mask</em>, </td>
  951. </tr>
  952. <tr>
  953. <td class="paramkey"></td>
  954. <td></td>
  955. <td class="paramtype">const <a class="el" href="structcensus__timestamp.html">census_timestamp</a> *&#160;</td>
  956. <td class="paramname"><em>start_time</em>&#160;</td>
  957. </tr>
  958. <tr>
  959. <td></td>
  960. <td>)</td>
  961. <td></td><td></td>
  962. </tr>
  963. </table>
  964. </div><div class="memdoc">
  965. <p>Start a client rpc operation. </p>
  966. <p>This function should be called as early in the client RPC path as possible. This function will create a new context. If the context argument is non-null, then the new context will inherit all its properties, with the following changes:</p>
  967. <ul>
  968. <li>create a new operation ID for the new context, marking it as a child of the previous operation.</li>
  969. <li>use the new RPC path and peer information for tracing and stats collection purposes, rather than those from the original context</li>
  970. </ul>
  971. <p>If the context argument is NULL, then a new root context is created. This is particularly important for tracing purposes (the trace spans generated will be unassociated with any other trace spans, except those downstream). The trace_mask will be used for tracing operations associated with the new context.</p>
  972. <p>In some RPC systems (e.g. where load balancing is used), peer information may not be available at the time the operation starts. In this case, use a NULL value for peer, and set it later using the <a class="el" href="census_8h.html#ab20a8e42995181004f5fbc9a87e339d3" title="Add peer information to a context representing a client RPC operation. ">census_set_rpc_client_peer()</a> function.</p>
  973. <dl class="params"><dt>Parameters</dt><dd>
  974. <table class="params">
  975. <tr><td class="paramname">context</td><td>The parent context. Can be NULL. </td></tr>
  976. <tr><td class="paramname">rpc_name_id</td><td>The rpc name identifier to be associated with this RPC. </td></tr>
  977. <tr><td class="paramname">rpc_name_info</td><td>Used to decode rpc_name_id. </td></tr>
  978. <tr><td class="paramname">peer</td><td>RPC peer. If not available at the time, NULL can be used, and a later <a class="el" href="census_8h.html#ab20a8e42995181004f5fbc9a87e339d3" title="Add peer information to a context representing a client RPC operation. ">census_set_rpc_client_peer()</a> call made. </td></tr>
  979. <tr><td class="paramname">trace_mask</td><td>An OR of census_trace_mask_values values. Only used in the creation of a new root context (context == NULL). </td></tr>
  980. <tr><td class="paramname">start_time</td><td>A timestamp returned from <a class="el" href="census_8h.html#a57255eb87c6ade8ee6eb8856d3ecfc11" title="Mark the beginning of an RPC operation. ">census_start_rpc_op_timestamp()</a>. Can be NULL. Used to set the true time the operation begins.</td></tr>
  981. </table>
  982. </dd>
  983. </dl>
  984. <dl class="section return"><dt>Returns</dt><dd>A new census context. </dd></dl>
  985. </div>
  986. </div>
  987. <a class="anchor" id="ae1536ef86b12a6904cb1de3a47f0ca1b"></a>
  988. <div class="memitem">
  989. <div class="memproto">
  990. <table class="memname">
  991. <tr>
  992. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a>* census_start_op </td>
  993. <td>(</td>
  994. <td class="paramtype"><a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  995. <td class="paramname"><em>context</em>, </td>
  996. </tr>
  997. <tr>
  998. <td class="paramkey"></td>
  999. <td></td>
  1000. <td class="paramtype">const char *&#160;</td>
  1001. <td class="paramname"><em>family</em>, </td>
  1002. </tr>
  1003. <tr>
  1004. <td class="paramkey"></td>
  1005. <td></td>
  1006. <td class="paramtype">const char *&#160;</td>
  1007. <td class="paramname"><em>name</em>, </td>
  1008. </tr>
  1009. <tr>
  1010. <td class="paramkey"></td>
  1011. <td></td>
  1012. <td class="paramtype">int&#160;</td>
  1013. <td class="paramname"><em>trace_mask</em>&#160;</td>
  1014. </tr>
  1015. <tr>
  1016. <td></td>
  1017. <td>)</td>
  1018. <td></td><td></td>
  1019. </tr>
  1020. </table>
  1021. </div><div class="memdoc">
  1022. <p>Start a new, non-RPC operation. </p>
  1023. <p>In general, this function works very similarly to census_start_client_rpc_op, with the primary difference being the replacement of host/path information with the more generic family/name tags. If the context argument is non-null, then the new context will inherit all its properties, with the following changes:</p>
  1024. <ul>
  1025. <li>create a new operation ID for the new context, marking it as a child of the previous operation.</li>
  1026. <li>use the family and name information for tracing and stats collection purposes, rather than those from the original context</li>
  1027. </ul>
  1028. <p>If the context argument is NULL, then a new root context is created. This is particularly important for tracing purposes (the trace spans generated will be unassociated with any other trace spans, except those downstream). The trace_mask will be used for tracing operations associated with the new context.</p>
  1029. <dl class="params"><dt>Parameters</dt><dd>
  1030. <table class="params">
  1031. <tr><td class="paramname">context</td><td>The base context. Can be NULL. </td></tr>
  1032. <tr><td class="paramname">family</td><td>Family name to associate with the trace </td></tr>
  1033. <tr><td class="paramname">name</td><td>Name within family to associate with traces/stats </td></tr>
  1034. <tr><td class="paramname">trace_mask</td><td>An OR of census_trace_mask_values values. Only used if context is NULL.</td></tr>
  1035. </table>
  1036. </dd>
  1037. </dl>
  1038. <dl class="section return"><dt>Returns</dt><dd>A new census context. </dd></dl>
  1039. </div>
  1040. </div>
  1041. <a class="anchor" id="a57255eb87c6ade8ee6eb8856d3ecfc11"></a>
  1042. <div class="memitem">
  1043. <div class="memproto">
  1044. <table class="memname">
  1045. <tr>
  1046. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="structcensus__timestamp.html">census_timestamp</a> census_start_rpc_op_timestamp </td>
  1047. <td>(</td>
  1048. <td class="paramtype">void&#160;</td>
  1049. <td class="paramname"></td><td>)</td>
  1050. <td></td>
  1051. </tr>
  1052. </table>
  1053. </div><div class="memdoc">
  1054. <p>Mark the beginning of an RPC operation. </p>
  1055. <p>The information required to call the functions to record the start of RPC operations (both client and server) may not be callable at the true start time of the operation, due to information not being available (e.g. the census context data will not be available in a server RPC until at least initial metadata has been processed). To ensure correct CPU accounting and latency recording, RPC systems can call this function to get the timestamp of operation beginning. This can later be used as an argument to census_start_{client,server}_rpc_op(). NB: for correct CPU accounting, the system must guarantee that the same thread is used for all request processing after this function is called.</p>
  1056. <dl class="section return"><dt>Returns</dt><dd>A timestamp representing the operation start time. </dd></dl>
  1057. </div>
  1058. </div>
  1059. <a class="anchor" id="a18e3c1cddf38f66a5e8cbf79d7084369"></a>
  1060. <div class="memitem">
  1061. <div class="memproto">
  1062. <table class="memname">
  1063. <tr>
  1064. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a>* census_start_server_rpc_op </td>
  1065. <td>(</td>
  1066. <td class="paramtype">const char *&#160;</td>
  1067. <td class="paramname"><em>buffer</em>, </td>
  1068. </tr>
  1069. <tr>
  1070. <td class="paramkey"></td>
  1071. <td></td>
  1072. <td class="paramtype">int64_t&#160;</td>
  1073. <td class="paramname"><em>rpc_name_id</em>, </td>
  1074. </tr>
  1075. <tr>
  1076. <td class="paramkey"></td>
  1077. <td></td>
  1078. <td class="paramtype">const <a class="el" href="structcensus__rpc__name__info.html">census_rpc_name_info</a> *&#160;</td>
  1079. <td class="paramname"><em>rpc_name_info</em>, </td>
  1080. </tr>
  1081. <tr>
  1082. <td class="paramkey"></td>
  1083. <td></td>
  1084. <td class="paramtype">const char *&#160;</td>
  1085. <td class="paramname"><em>peer</em>, </td>
  1086. </tr>
  1087. <tr>
  1088. <td class="paramkey"></td>
  1089. <td></td>
  1090. <td class="paramtype">int&#160;</td>
  1091. <td class="paramname"><em>trace_mask</em>, </td>
  1092. </tr>
  1093. <tr>
  1094. <td class="paramkey"></td>
  1095. <td></td>
  1096. <td class="paramtype"><a class="el" href="structcensus__timestamp.html">census_timestamp</a> *&#160;</td>
  1097. <td class="paramname"><em>start_time</em>&#160;</td>
  1098. </tr>
  1099. <tr>
  1100. <td></td>
  1101. <td>)</td>
  1102. <td></td><td></td>
  1103. </tr>
  1104. </table>
  1105. </div><div class="memdoc">
  1106. <p>Start a server RPC operation. </p>
  1107. <p>Returns a new context to be used in future census calls. If buffer is non-NULL, then the buffer contents should represent the client context, as generated by census_context_serialize(). If buffer is NULL, a new root context is created.</p>
  1108. <dl class="params"><dt>Parameters</dt><dd>
  1109. <table class="params">
  1110. <tr><td class="paramname">buffer</td><td>Buffer containing bytes output from census_context_serialize(). </td></tr>
  1111. <tr><td class="paramname">rpc_name_id</td><td>The rpc name identifier to be associated with this RPC. </td></tr>
  1112. <tr><td class="paramname">rpc_name_info</td><td>Used to decode rpc_name_id. </td></tr>
  1113. <tr><td class="paramname">peer</td><td>RPC peer. </td></tr>
  1114. <tr><td class="paramname">trace_mask</td><td>An OR of census_trace_mask_values values. Only used in the creation of a new root context (buffer == NULL). </td></tr>
  1115. <tr><td class="paramname">start_time</td><td>A timestamp returned from <a class="el" href="census_8h.html#a57255eb87c6ade8ee6eb8856d3ecfc11" title="Mark the beginning of an RPC operation. ">census_start_rpc_op_timestamp()</a>. Can be NULL. Used to set the true time the operation begins.</td></tr>
  1116. </table>
  1117. </dd>
  1118. </dl>
  1119. <dl class="section return"><dt>Returns</dt><dd>A new census context. </dd></dl>
  1120. </div>
  1121. </div>
  1122. <a class="anchor" id="ae22d3c8dfe3bfac5e831b0135ff7a536"></a>
  1123. <div class="memitem">
  1124. <div class="memproto">
  1125. <table class="memname">
  1126. <tr>
  1127. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int census_supported </td>
  1128. <td>(</td>
  1129. <td class="paramtype">void&#160;</td>
  1130. <td class="paramname"></td><td>)</td>
  1131. <td></td>
  1132. </tr>
  1133. </table>
  1134. </div><div class="memdoc">
  1135. <p>Return the features supported by the current census implementation (not all features will be available on all platforms). </p>
  1136. </div>
  1137. </div>
  1138. <a class="anchor" id="a2a2dfc973cd259d93b0901c8b32e8f34"></a>
  1139. <div class="memitem">
  1140. <div class="memproto">
  1141. <table class="memname">
  1142. <tr>
  1143. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int census_trace_mask </td>
  1144. <td>(</td>
  1145. <td class="paramtype">const <a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  1146. <td class="paramname"><em>context</em></td><td>)</td>
  1147. <td></td>
  1148. </tr>
  1149. </table>
  1150. </div><div class="memdoc">
  1151. <p>Get the current trace mask associated with this context. </p>
  1152. <p>The value returned will be the logical OR of census_trace_mask_values values. </p>
  1153. </div>
  1154. </div>
  1155. <a class="anchor" id="aacf722bf9259354d1ab7a81a6c2fd666"></a>
  1156. <div class="memitem">
  1157. <div class="memproto">
  1158. <table class="memname">
  1159. <tr>
  1160. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_trace_print </td>
  1161. <td>(</td>
  1162. <td class="paramtype"><a class="el" href="census_8h.html#a27fc8788690179599713226f1f054736">census_context</a> *&#160;</td>
  1163. <td class="paramname"><em>context</em>, </td>
  1164. </tr>
  1165. <tr>
  1166. <td class="paramkey"></td>
  1167. <td></td>
  1168. <td class="paramtype">uint32_t&#160;</td>
  1169. <td class="paramname"><em>type</em>, </td>
  1170. </tr>
  1171. <tr>
  1172. <td class="paramkey"></td>
  1173. <td></td>
  1174. <td class="paramtype">const char *&#160;</td>
  1175. <td class="paramname"><em>buffer</em>, </td>
  1176. </tr>
  1177. <tr>
  1178. <td class="paramkey"></td>
  1179. <td></td>
  1180. <td class="paramtype">size_t&#160;</td>
  1181. <td class="paramname"><em>n</em>&#160;</td>
  1182. </tr>
  1183. <tr>
  1184. <td></td>
  1185. <td>)</td>
  1186. <td></td><td></td>
  1187. </tr>
  1188. </table>
  1189. </div><div class="memdoc">
  1190. <p>Insert a trace record into the trace stream. </p>
  1191. <p>The record consists of an arbitrary size buffer, the size of which is provided in 'n'. </p>
  1192. <dl class="params"><dt>Parameters</dt><dd>
  1193. <table class="params">
  1194. <tr><td class="paramname">context</td><td>Trace context </td></tr>
  1195. <tr><td class="paramname">type</td><td>User-defined type to associate with trace entry. </td></tr>
  1196. <tr><td class="paramname">buffer</td><td>Pointer to buffer to use </td></tr>
  1197. <tr><td class="paramname">n</td><td>Number of bytes in buffer </td></tr>
  1198. </table>
  1199. </dd>
  1200. </dl>
  1201. </div>
  1202. </div>
  1203. <a class="anchor" id="a22eb7df4c9b232d8962592d738007ecb"></a>
  1204. <div class="memitem">
  1205. <div class="memproto">
  1206. <table class="memname">
  1207. <tr>
  1208. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> void census_trace_scan_end </td>
  1209. <td>(</td>
  1210. <td class="paramname"></td><td>)</td>
  1211. <td></td>
  1212. </tr>
  1213. </table>
  1214. </div><div class="memdoc">
  1215. <p>End a scan previously started by <a class="el" href="census_8h.html#ad78c02761da0d8a7a70bf4add263f91f" title="Start a scan of existing trace records. ">census_trace_scan_start()</a> </p>
  1216. </div>
  1217. </div>
  1218. <a class="anchor" id="ad78c02761da0d8a7a70bf4add263f91f"></a>
  1219. <div class="memitem">
  1220. <div class="memproto">
  1221. <table class="memname">
  1222. <tr>
  1223. <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a3f6006f19ae6445e4a42f9d16b720ad7">CENSUSAPI</a> int census_trace_scan_start </td>
  1224. <td>(</td>
  1225. <td class="paramtype">int&#160;</td>
  1226. <td class="paramname"><em>consume</em></td><td>)</td>
  1227. <td></td>
  1228. </tr>
  1229. </table>
  1230. </div><div class="memdoc">
  1231. <p>Start a scan of existing trace records. </p>
  1232. <p>While a scan is ongoing, addition of new trace records will be blocked if the underlying trace buffers fill up, so trace processing systems should endeavor to complete reading as soon as possible. </p>
  1233. <dl class="params"><dt>Parameters</dt><dd>
  1234. <table class="params">
  1235. <tr><td class="paramname">consume</td><td>if non-zero, indicates that reading records also "consumes" the previously read record - i.e. releases space in the trace log while scanning is ongoing. </td></tr>
  1236. </table>
  1237. </dd>
  1238. </dl>
  1239. <dl class="section return"><dt>Returns</dt><dd>0 on success, non-zero on failure (e.g. if a scan is already ongoing) </dd></dl>
  1240. </div>
  1241. </div>
  1242. </div><!-- contents -->
  1243. <!-- start footer part -->
  1244. <hr class="footer"/><address class="footer"><small>
  1245. Generated on Wed Jun 21 2017 14:13:07 for GRPC Core by &#160;<a href="http://www.doxygen.org/index.html">
  1246. <img class="footer" src="doxygen.png" alt="doxygen"/>
  1247. </a> 1.8.6
  1248. </small></address>
  1249. </body>
  1250. </html>