OpenWrap Server-Side Debugging

Openwrap Server includes a feature to debug requests sent to prebid and all partners, as well as debug responses received from each partner.

When you turn on OpenWrap Server debug, returned responses include a debug object. The debug object contains the resolvedrequest; the OpenRTB request sent by Openwrap to the prebid-server. The resolvedrequest shows all the partner mapping data in the imp.ext object, and you can see the request and response to/from each partner in httpcalls. The sample debug object below shows a response when debug server logs are enabled for your requests:

Sample response with debug
	"debug": {
		"httpcalls": {
			"appnexus": [{
				"requestbody": "{\"id\":\"631e562e-2ea6-4e55-a3f5-61eb32661462\",\"imp\":[{\"id\":\"732018ef-4c8a-4073-8578-909423684284\",\"banner\":{\"format\":[{\"w\":300,\"h\":250}],\"w\":300,\"h\":250},\"tagid\":\"/135812570/ampparit/frontpage/app-mob-1\",\"secure\":1,\"ext\":{\"appnexus\":{\"placement_id\":16256353}}}],\"site\":{\"domain\":\"\",\"page\":\"\",\"publisher\":{\"id\":\"118184\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\",\"ip\":\"::1\"},\"at\":1,\"tmax\":489,\"cur\":[\"USD\"],\"source\":{\"tid\":\"631e562e-2ea6-4e55-a3f5-61eb32661462\"},\"ext\":{\"prebid\":{\"aliases\":{\"districtm\":\"appnexus\"},\"debug\":1,\"bidderparams\":{\"pubmatic\":{\"Cookie\":[\"SSCookie=1\"]}}},\"appnexus\":{\"hb_source\":5}}}",
				"responsebody": "",
				"status": 0,
				"uri": ""
			"pubmatic": [{
				"requestbody": "{\"id\":\"631e562e-2ea6-4e55-a3f5-61eb32661462\",\"imp\":[{\"id\":\"732018ef-4c8a-4073-8578-909423684284\",\"banner\":{\"format\":[{\"w\":300,\"h\":250}],\"w\":300,\"h\":250},\"tagid\":\"/135812570/ampparit/frontpage/app-mob-1\",\"secure\":1}],\"site\":{\"domain\":\"\",\"page\":\"\",\"publisher\":{\"id\":\"118184\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36\",\"ip\":\"::1\"},\"at\":1,\"tmax\":489,\"cur\":[\"USD\"],\"source\":{\"tid\":\"631e562e-2ea6-4e55-a3f5-61eb32661462\"},\"ext\":{\"wrapper\":{\"version\":0,\"profile\":1408}}}",
				"responsebody": "{\"id\":\"631e562e-2ea6-4e55-a3f5-61eb32661462\",\"seatbid\":[{\"bid\":[{\"id\":\"BANNER1-CC2E-48A2-BC83-4DD5F38FE9BB\",\"impid\":\"732018ef-4c8a-4073-8578-909423684284\",\"price\":2.0246701,\"adm\":\"\\u003cspan class=\\\"PubAPIAd\\\"  id=\\\"4E733404-CC2E-48A2-BC83-4DD5F38FE9BB\\\"\\u003e\\u003cscript type=\\\"text/javascript\\\"\\u003e document.writeln('\\u003ciframe width=\\\"300\\\" scrolling=\\\"no\\\" height=\\\"250\\\" frameborder=\\\"0\\\" name=\\\"iframe0\\\" allowtransparency=\\\"true\\\" marginheight=\\\"0\\\" marginwidth=\\\"0\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" src=\\\"\\\"\\u003e\\u003c/iframe\\u003e');\\u003c/script\\u003e\\u003ciframe width=\\\"0\\\" scrolling=\\\"no\\\" height=\\\"0\\\" frameborder=\\\"0\\\" src=\\\"\\\" style=\\\"position:absolute;top:-15000px;left:-15000px\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" marginwidth=\\\"0\\\" marginheight=\\\"0\\\" allowtransparency=\\\"true\\\" name=\\\"pbeacon\\\"\\u003e\\u003c/iframe\\u003e\\u003c/span\\u003e \\u003c!-- PubMatic Ad Ends --\\u003e\",\"adomain\":[\"\"],\"cid\":\"16981\",\"crid\":\"471633211122233344987666\",\"dealid\":\"PUBDEAL1\",\"h\":250,\"w\":300,\"ext\":{\"dspid\":6,\"deal_channel\":1}}],\"seat\":\"4098\"}],\"cur\":\"USD\"}",
				"status": 200,
				"uri": ""
		"resolvedrequest": {
			"at": 1,
			"cur": [
			"device": {
				"ip": "::1",
				"ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
			"ext": {
				"prebid": {
					"aliases": {
						"districtm": "appnexus"
					"bidderparams": {
						"pubmatic": {
							"Cookie": [
					"debug": 1
			"id": "631e562e-2ea6-4e55-a3f5-61eb32661462",
			"imp": [{
				"banner": {
					"format": [{
						"h": 250,
						"w": 300
				"ext": {
					"appnexus": {
						"placementId": 16256353
					"pubmatic": {
						"adSlot": "/135812570/ampparit/frontpage/app-mob-1@300x250",
						"publisherId": "118184",
						"wrapper": {
							"profile": 1408,
							"version": 0
				"id": "732018ef-4c8a-4073-8578-909423684284",
				"secure": 1,
				"tagid": "/135812570/ampparit/frontpage/app-mob-1"
			"site": {
				"domain": "",
				"ext": {
					"amp": 0
				"page": "",
				"publisher": {
					"id": "118184"
			"source": {
				"tid": "631e562e-2ea6-4e55-a3f5-61eb32661462"
			"tmax": 489

Enabling debug mode for different endpoints

You can turn on debug mode for various types of endpoints. The expandable sections below describe each type and provide an example.

OpenRTB 2.5 endpoint

Use the 2.5 endpoint for Display and In-App profiles. Enable debug mode by passing, debug=1, to the endpoint:
AMP endpoint

Turn on debug for the AMP endpoint with, pwtvc=1, in the purl field of the request:

From the sample above, the decoded purl and its setting,, enables debug mode.

Video redirect endpoint

Debug a video request with, pwtvc=1, as a query parameter in the video endpoint:
CTV OpenRTB endpoint
Debug CTV video by passing, debug=1, to the endpoint:

CTV VAST endpoint…

Unsupported at this time.

Debug server logs

  • PubMatic provides detailed application logs to check what is actually happening on server-side. Application logs default to error level reporting. You can turn on debug logs without restarting the server application by using a curl call that sets your desired debug level and the duration for which debug mode will run. Authenticate your curl call using the Authorization field with the -H (header) parameter and pass the Base64 encoded value of your DebugAuthKey from the configuration file. The following sample curl call enables log level 1 for 10 minutes. After 10 minutes, the configuration resets to the default log level:

    curl -v '' -H 'Authorization: OThhMjNiNDIzNWM0NQ=='
  • PubMatic's logger package reports errors, warnings, info, and debug level logs based on the LogLevelMaxLogSizeLogRotationTime, and MaxLogFiles values in the configuration file. Your logging configuration might look similar to the sample below:

    Sample log configuration
    LogLevel=4 #DEBUG=1, INFO=2, WARN=3, ERROR=4, CRITICAL=5, FATAL=6
    MaxLogSize=2000000000   #size in bytes
    LogRotationTime=60  # time in minutes
    MaxLogFiles=10   # Number of log files to be retained log path
    DebugLogUpdateTime=5   # time in minutes to update new log level
    DebugAuthKey="98a23b4235c45" # Key to verify Authorization while updating log level

⇧ Top

Do you have feedback on this document? Let us know: email us.

Table of Contents