Closed donkeykong91 closed 1 year ago
Bump
I am recieveing the logs but getting the same error in the console. This error
LogDNA Browser Logger is unable to send logs to LogDNA.
is due to sending too many request at once. After throttling the log function everywhing works as expected.
My problem was due to using the incorrect url
. I updated the url
to the correct one given to me by the LogDNA account and now it is working.
Thank you, also, @svrakata for the comment because I was also noticing that error on my end. I'll add a throttle for peace of mind.
Hello,
When I pass in the
url
parameter in theoptions
object in theinit
function and then use the logger withlogdna.debug('hello')
, ~I get a CORS error to amezmo
url that I did not use.~ I get an error saying that I have not whitelisted the URL even though I already have (yesterday) in the Manage Organizations > CORS Origins page.Edit: Regarding the mezmo URL, never mind. It seems, after waiting till the next day, it's now taking the URL I give it in the
options
object when I use theinit
function.I'm currently using a
logdna
-based URL (I'm assuming it's the old way?). Exactly this:https://logs.us-south.logging.cloud.ibm.com/logs/ingest
.~But, in the error, I keep seeing it's trying to hit this URL:~
This is the URL that's trying to be hit with a POST call:
https://logs.us-south.logging.cloud.ibm.com/logs/ingest?hostname=logdna-browser-logger&now=1671551408621&tags=LogDNA-Browser
This is how I use the
init
function:Here are the errors I see in the console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://logs.us-south.logging.cloud.ibm.com/logs/ingest?hostname=logdna-browser-logger&now=1671551408621&tags=LogDNA-Browser. (Reason: CORS request did not succeed). Status code: (null).
and
LogDNA Browser Logger is unable to send logs to LogDNA.
Possible issues:
- Your web apps url (https://localhost:4000/) is not listed in your LogDNA account's CORS whitelist domains
- Ingestion key is incorrect
- The configured LogDNA ingestion url is incorrect
- LogDNA ingestion endpoint is down. https://status.mezmo.com/
Error: NetworkError when attempting to fetch resource.
I'm not sure if it's slow to update the CORS whitelist on IBM Cloud's side?
I would love some help on this!
Thank you!