Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add request-id response header #54

Open
ebekker opened this issue Jan 20, 2017 · 4 comments
Open

Add request-id response header #54

ebekker opened this issue Jan 20, 2017 · 4 comments

Comments

@ebekker
Copy link
Collaborator

ebekker commented Jan 20, 2017

The Classic DSC Pull Server always has a request-id header in all its responses. Presumably this is a way to tie back each request/response to some logging or tracing ability. This is a good idea and we should mimic this feature as well as message the ID in our logging and possible store it durably in any back-end store that we use to capture transactions, especially ones that produce errors.

@ebekker
Copy link
Collaborator Author

ebekker commented Jan 20, 2017

Upon closer inspection, it appears these IDs are not ephemeral and are somehow tied to a session or somehow grouping requests from the same node:

Here's a sample from RegisterDscAgent request:

HTTP/1.1 204 No Content 
Cache-Control: no-cache 
Server: Microsoft-IIS/10.0 
ProtocolVersion: 2.0 
X-Content-Type-Options: nosniff 
request-id: 93276c28-5bda-0001-b963-3093da5bd201 
DataServiceVersion: 1.0; 
X-AspNet-Version: 4.0.30319 
X-Powered-By: ASP.NET 
Date: Fri, 20 Jan 2017 11:20:37 GMT 

Here's another for SendReport requests:

HTTP/1.1 200 OK 
Cache-Control: no-cache 
Content-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 
Server: Microsoft-IIS/10.0 
ProtocolVersion: 2.0 
X-Content-Type-Options: nosniff 
request-id: 93276c28-5bda-0001-ba63-3093da5bd201 
DataServiceVersion: 3.0; 
X-AspNet-Version: 4.0.30319 
X-Powered-By: ASP.NET 
Date: Fri, 20 Jan 2017 11:20:37 GMT 
Content-Length: 105 
 

@ebekker
Copy link
Collaborator Author

ebekker commented Jan 20, 2017

Still more puzzling, the ID is not specific to the calling Node, here's a RegisterDscAgent from a completely different Node:

HTTP/1.1 204 No Content
Cache-Control: no-cache
Server: Microsoft-IIS/10.0
ProtocolVersion: 2.0
X-Content-Type-Options: nosniff
request-id: 93276c28-5bda-0001-8a64-3093da5bd201
DataServiceVersion: 1.0;
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 20 Jan 2017 11:36:21 GMT

Here's a GetModule call from still another Node:

HTTP/1.1 200 OK 
Cache-Control: no-cache 
Content-Type: application/octet-stream 
Server: Microsoft-IIS/10.0 
ProtocolVersion: 2.0 
Prefer: return-content 
Checksum: 8FB19218B06E212F1FF251B6F8DE0B261DF3806F0FFD545090E3265A481A9716 
ChecksumAlgorithm: SHA-256 
X-Content-Type-Options: nosniff 
request-id: 93276c28-5bda-0001-8b64-3093da5bd201 
DataServiceVersion: 1.0; 
X-AspNet-Version: 4.0.30319 
X-Powered-By: ASP.NET 
Date: Fri, 20 Jan 2017 11:36:21 GMT 
Content-Length: 331673 

@ebekker
Copy link
Collaborator Author

ebekker commented Jan 20, 2017

This could actually act more like a Server ID, similar to the Agent ID which is generated every time a Node is put into pull mode.

@concentrateddon
Copy link
Contributor

Yeah in all my traces I couldn't find anything consistent on that. Let me ask someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants