We are attempting to log our HTTP requests in a Fargate container to X-Ray. We see the health-checks getting logged so that is good. We also see that the traces for the other requests are there but X-Ray isn't showing any of the data. Below are some screenshots of what we are seeing:
Here is a diff of a health-check trace (red) and a real call (green)
After looking at all the AWS docs we are not doing anything odd, different, or unique, it is the exact same code. We are using C# running in .net 6 on a linux fargate instance.
is there any node in front of the Fargate node for your real calls? If there is a segment that is the parent of your Fargate segment, that is treated as the "Root" segment and only its HTTP metadata will be shown on the trace overview page. If that root segment doesn't have any HTTP details, unfortunately none will be shown.
As a workaround, you will need to remove the parent node of the Fargate service.
Related
I have a microservice in a non-prod environment which another team is using in another non-prod app that's handed off to 3rd party integrations for testing. That other team unfortunately presents users with the entire failed response of any API calls rather than logging it and returning something generic. Unfortunately, that means that they can see the Authorization header which includes "Bearer {tokenHere}".. This wouldn't normally be an issue in a development environment, but my hands are tied right now and I don't want to completely disable the exception page just because someone else is improperly leveraging that information.
I've looked at the options we have for configuring the developer exception page, but it's very limited. Is there anything I can do to remove the authorization header or all request headers if that's not possible?
note:
In an api call that returns json, this info. is displayed after the stack trace in a new section starting with "HEADERS"
I created my Bot Service using the Azure portal and choose the basic template to use, which had the run.csx file in the "messages" folder. I have updated the folder structure to match my needs better and removed the "messages" folder, replacing it with a folder called "Default" instead.
I tried to update my messaging endpoint to point towards "/api/Default?code=", where was the value previously there when the messaging endpoint pointed towards "/api/messages", but now I am getting a Bad Request error:
BadRequest
{
"Message": "The 'code' query parameter provided in the HTTP request did not match the expected value."
}
I'm not sure how to get this "code" value and what it should be. Logs don't say what it should be and I can't find documentation on this.
Someone mentioned in another forum:
Here are two ways to retrieve the bot service key code:
1) go through the kudo console and find the function's secrets .json file: https://[YourBotId].scm.azurewebsites.net/api/vfs/data/Functions/secrets/messages.json
2) open the function app's blade instead of the bot service blade and then find the function's (messages in bot's case) key/code/secrets
This is similar to some questions on here, but none have seemed to produce an answer that has helped me. I'm calling the graph api from a c#/.Net application to get photos for a particular album, and I'm receiving a 403 error...sometimes.
I've never received the error in my development environment, only in production. I'm also caching the responses for an hour, so the most the application would hit the API in a given hour would be around 20 times, and not all at once. I'm currently swallowing the exception when it errors out and simply not showing the images, but that isn't a long-term solution.
var request = WebRequest.Create("https://graph.facebook.com/ALBUM_ID/photos");
var stream = request.GetResponse().GetResponseStream();
This just started happening about a month ago but I didn't see anything in the breaking changes list that would suggest this behavior. Any insight would be appreciated.
Update
This was hidden away in the response stream.
{"error":{"message":"(#4) Application request limit
reached","type":"OAuthException","code":4}}
I don't see for the life of me how I could be hitting a limit considering I'm only hitting the api a few times.
if you make a GET request to one of FB graph API endpoints that does not require access_token that does not mean you should not include it in request parameter. If you do as FB documentation says as do not include access_token then in FB server side it registers into your server machine. So limit (whatever amount is it exactly) can be reached very easily. If you however, put the user access token into the request (&access_token=XXXXXX) then requests register into the specific user, so the limit hardly ever be reached. You can test it with a simple script that makes 1000 requests with and without user access_token.
NOTE, FB app access token will not be sufficient as you will face the same problem: requests will be registered into app access_token that situation is alike making requests without access_token.
I'm on IIS 6 and I have an ASP.Net 4.0 site that's a single page to serve as a SOAP reverse proxy. I have to modify the return content in order to delete a trouble node from the response and add a tracking node.
In order to facilitate its function as a reverse proxy for all addresses, I have the 404 on the server set to a custom "URL" of "/default.aspx" (the page for my app)
For requests without a payload, it works perfectly - such as for ?WSDL Urls. It requests the proper URL from the target system, gets the response and sends it back - it's pretty utterly transparent in this regard.
However, when a SOAP request is being made with an input payload, the Request.InputStream in the code is always empty. Empty - with one exception - using SOAPUI, I can override the end point and send the request directly to /default.aspx and it will receive the input payload. Thus, I have determined that the custom 404 handler is - when server-side transferring the request - stripping the payload. I know the payload is being sent - I have even wiresharked it on the server to be sure. But then when I add code to log the contents of Request.InputStream it's blank - even though Request.ContentLength shows the right content length for the original request.
I've also been looking for a good way to use ASP.Net to intercept the requests directly rather than allowing the normal IIS 404 handler to take care of it but even with a wildcard mapping, I can't seem to get the settings right nor am I fully confident that it would help. (But I'm hoping it would?)
Finally, I don't have corporate permission to install MVC framework.
Thus, I need either some configuration for IIS I am missing to make this work properly or some other method of ensuring that I get the request payload to my web page.
Thanks!
What about using an HTTP Handler mapped to all requests?
You'll need to add a wildcard application mapping as detailed here and correctly configure your HTTP Handler.
I have a page fetching HTML content from a WCF REST service via AJAX. I started seeing errors on IE to the effect that "This page is accessing information that is not under its control...". For some content, the WCF service will, instead of returning the content directly, return instead an object or iframe tag pointing back to itself with different parameters. The WCF service sees a different URL than was requested, and the discrepancy causes the "security" error as IE thinks it's loading content from a different domain.
So, for example, the XHR request asked for
"http://localhost/Services/Content.svc?id=123..."
or even
"http://mymachine/Services/Content.svc?id=123..."
As soon as the request reaches the WCF service, however, the URL is turned into:
"http://mymachine.mydomain.com/Services/Content.svc?id=123..."
How can I get the originally requested URL within the WCF service? I've inspected theWebOperationContext.Current.IncomingRequest.UriTemplateMatch properties to no avail, there is no remaining trace of "localhost". I've also looked at the following posts and still cannot find the original URL:
What is the WCF equivalent of HttpContext.Current.Request.RawUrl?
http://jstawski.com/archive/2008/05/01/wcf-wsdl-location-address-with-https.aspx
Is there any way to get to it?
Be aware that any service running in IIS will use the host name specified in the IIS bindings. In order to change this, you will need to change the settings in IIS.