Span Protocol

We'll introduce a new “span” envelope item, which the SDK uses to emit a segment span and its children. And in the future, a batch of spans. The payload of each envelope item follows the OpenTelemetry Protocol, which introduced typed attributes and will ease the conversion in our POtel SDKs.

Copied
{
	"event_id":"9ec79c33ec9942ab8353589fcb2e04dc"
}
{
	"type": "span"
}
{
  	"traceId": "32d3c7cb501fbddbe3ce1016a72d50b5",
  	"spanId": "e91d37480970523b",
  	"name": "GET /",
  	"startTime": "1544712660",
  	"endTime": "1544712680",
  	"attributes": [
		{
			"key": "sentry.op",
	      	"value": {
	        	"stringValue": "http.sever",
	      	}
		},
    	{
	    	"key": "http.response.status_code",
      		"value": {
	      		"intValue": "200",
	    	}
	  	}
  	]
}
{
	"type": "span"
}
{
	"traceId": "32d3c7cb501fbddbe3ce1016a72d50b5",
  	"spanId": "6b22b3af586e777a",
  	"parentSpanId": "e91d37480970523b",
  	"name": "UserMiddleware",
  	"startTimeUnix": "1544712665",
  	"endTimeUnix": "1544712675",
  	"attributes": [
	  	{
	    	"key": "sentry.op",
      		"value": {
	      		"stringValue": "middleware.handle",
	    	}
	  	},
	  	{
	    	"key": "user.email",
      		"value": {
	    		"stringValue": "jane.doe@example.com",
	    	}
	  	}
	]
}
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").