Ejemplo n.º 1
0
def _traces_mapping_to_pb(traces_mapping):
    """Convert a trace dict to protobuf.

    :type traces_mapping: dict
    :param traces_mapping: A trace mapping.

    :rtype: class:`google.cloud.trace_v1.proto.trace_pb2.Traces`
    :returns: The converted protobuf type traces.
    """
    traces_pb = trace_pb2.Traces()
    ParseDict(traces_mapping, traces_pb)
    return traces_pb
Ejemplo n.º 2
0
def _traces_mapping_to_pb(traces_mapping):
    """
    Convert a trace dict to protobuf.

    Args:
        traces_mapping (dict): A trace mapping.

    Returns:
        The converted protobuf type traces.
    """
    traces_pb = trace_pb2.Traces()
    ParseDict(traces_mapping, traces_pb)
    return traces_pb