Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    tryfer 0.2.0

    Download button

    No screenshots available
    Downloads: 66  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    David Reid | More programs
    The Apache License 2.0 / FREE
    September 19th, 2012, 21:10 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    tryfer description

    Twisted Zipkin Tracing Library

    tryfer is a Twisted/Python client library for Zipkin, a distributed tracing system. It is inspired by the tracing libraries written by Finagle.

    Examples

    In the examples/ subdirectory you'll find two Python scripts (one client and one server) which demonstrate the usage and expected output.

    Start by opening two terminals and going to the tryfer source directory.

    In terminal #1 we can start the server using twistd:

    tryfer > twistd -n -y examples/tracing-server.tac
    2012-09-05 13:22:02-0700 [-] Log opened.
    2012-09-05 13:22:02-0700 [-] twistd 12.1.0 (/Users/dreid/.virtualenvs/tracing/bin/python 2.7.2) starting up.
    2012-09-05 13:22:02-0700 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
    2012-09-05 13:22:02-0700 [-] Site starting on 8080
    2012-09-05 13:22:02-0700 [-] Starting factory < twisted.web.server.Site instance at 0x100e78680 >

    In terminal #2 we will run the client which will make a single HTTP request to the server:

    tryfer > python examples/tracing-client.py
    [
     {
     "annotations": [
     {
     "type": "string",
     "value": "http://localhost:8080/README.rst",
     "key": "http.uri"
     },
     {
     "type": "timestamp",
     "value": 1346876525257644,
     "key": "cs"
     },
     {
     "type": "timestamp",
     "value": 1346876525270536,
     "key": "cr"
     }
     ],
     "trace_id": "00e5f721d19e25fa",
     "name": "GET",
     "span_id": "007fe79f2c63db97"
     }
    ]
    Received 200 response.


    Here we see some output from the DebugTracer which simply prints all annotations it's asked to trace to stdout in json format. Here we've included our first annotation which is the http.uri we are requesting.

    Now in terminal #1 we should see the following:

    2012-09-05 13:22:05-0700 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [05/Sep/2012:20:22:05 +0000] "GET /README.rst HTTP/1.1" 200 4829 "-" "-"
    2012-09-05 13:22:05-0700 [EndAnnotationTracer] Sending trace: (64729494289524218, 36001992872811415) w/ (< tryfer.trace.Annotation object at 0x100e7bb90 >,)
    [
     {
     "annotations": [
     {
     "host": {
     "service_name": "tracing-server-example",
     "ipv4": "127.0.0.1",
     "port": 8080
     },
     "type": "timestamp",
     "value": 1346876525268525,
     "key": "sr"
     },
     {
     "host": {
     "service_name": "tracing-server-example",
     "ipv4": "127.0.0.1",
     "port": 8080
     },
     "type": "timestamp",
     "value": 1346876525270173,
     "key": "ss"
     }
     ],
     "trace_id": "00e5f721d19e25fa",
     "name": "GET",
     "span_id": "007fe79f2c63db97"
     }
    ]



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    Twisted Zipkin | tracing Library | Python library | Python | Twisted | Zipkin

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM