How to add logging 'tags' to stackdriver

Viewed 744

How does BigQuery or any other Google resource add these 'tags' at the top of the stackdriver log entry?

enter image description here

I have successfully added labels to my log, but these don't show up as 'tags' at the top. Here is an example of how I'm creating a log:

    self._queue.put_nowait({
            'info': info,
            'severity': record.levelname,
            'resource': resource,
            'labels': {'test': 'label'},
            'trace': trace,
            'span_id': span_id,
        })

How would I add these tags?

1 Answers

You can do this by clicking "Add field to summary line". For example:

enter image description here

You can find more information in this article about viewing logs and custom fields.

Related