class JsonSpan(object):
    k = None
    t = 0
    p = None
    s = 0
    ts = 0
    ta = "py"
    d = 0
    n = None
    f = None
    ec = None
    error = None
    data = None
    stack = None

    def __init__(self, **kwds):
        for key in kwds:
            self.__dict__[key] = kwds[key]


class CustomData(object):
    tags = None
    logs = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)


class Data(object):
    baggage = None
    custom = None
    http = None
    rabbitmq = None
    redis = None
    rpc = None
    sdk = None
    service = None
    sqlalchemy = None
    soap = None
    log = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)


class HttpData(object):
    host = None
    url = None
    params = None
    status = 0
    method = None
    path_tpl = None
    error = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)


class MySQLData(object):
    db = None
    host = None
    user = None
    stmt = None
    error = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)


class RabbitmqData(object):
    exchange = None
    queue = None
    sort = None
    address = None
    key = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)


class RedisData(object):
    connection = None
    driver = None
    command = None
    error = None
    subCommands = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)


class RPCData(object):
    flavor = None
    host = None
    port = None
    call = None
    call_type = None
    params = None
    baggage = None
    error = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)


class SQLAlchemyData(object):
    sql = None
    url = None
    eng = None
    error = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)


class SoapData(object):
    action = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)


class SDKData(object):
    name = None

    # Since 'type' and 'return' are a Python builtin and a reserved keyword respectively, these keys (all keys) are
    # lower-case'd in json encoding.  See Agent.to_json
    Type = None
    Return = None

    arguments = None
    custom = None

    def __init__(self, **kwds):
        self.__dict__.update(kwds)

@@ -1,14 +1,15 @@
+%0A
 class 
-Json
+Base
 Span
@@ -14,24 +14,280 @@
 an(object):%0A
+    def __str__(self):%0A        return self.__class__.__str__() + %22: %22 + self.__dict__.__str__()%0A%0A    def __repr__(self):%0A        return self.__dict__.__str__()%0A%0A    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A%0Aclass JsonSpan(BaseSpan):%0A
     k = None
@@ -450,109 +450,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        for key in kwds:%0A            self.__dict__%5Bkey%5D = kwds%5Bkey%5D%0A%0A
 %0Acla
@@ -460,30 +460,32 @@
  CustomData(
-object
+BaseSpan
 ):%0A    tags 
@@ -512,76 +512,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A
 %0Acla
@@ -516,30 +516,32 @@
 %0Aclass Data(
-object
+BaseSpan
 ):%0A    bagga
@@ -728,76 +728,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A
 %0Acla
@@ -736,30 +736,32 @@
 ss HttpData(
-object
+BaseSpan
 ):%0A    host 
@@ -875,76 +875,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A
 %0Acla
@@ -884,30 +884,32 @@
 s MySQLData(
-object
+BaseSpan
 ):%0A    db = 
@@ -983,76 +983,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A
 %0Acla
@@ -995,30 +995,32 @@
 abbitmqData(
-object
+BaseSpan
 ):%0A    excha
@@ -1102,76 +1102,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A
 %0Acla
@@ -1111,30 +1111,32 @@
 s RedisData(
-object
+BaseSpan
 ):%0A    conne
@@ -1230,76 +1230,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A
 %0Acla
@@ -1237,30 +1237,32 @@
 ass RPCData(
-object
+BaseSpan
 ):%0A    flavo
@@ -1398,76 +1398,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A
 %0Acla
@@ -1412,30 +1412,32 @@
 AlchemyData(
-object
+BaseSpan
 ):%0A    sql =
@@ -1494,76 +1494,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A
 %0Acla
@@ -1502,30 +1502,32 @@
 ss SoapData(
-object
+BaseSpan
 ):%0A    actio
@@ -1540,76 +1540,8 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A%0A
 %0Acla
@@ -1551,22 +1551,24 @@
 SDKData(
-object
+BaseSpan
 ):%0A    n
@@ -1830,71 +1830,4 @@
 ne%0A%0A
-    def __init__(self, **kwds):%0A        self.__dict__.update(kwds)%0A

Unify common span functionality into a base class (#149)