loggly / loggly-jslogger

Client-side (browser) logger to use with Loggly v2
79 stars 52 forks source link

Image Warnings... #3

Closed bradschafer closed 9 years ago

bradschafer commented 10 years ago

I am getting a lot of image warnings in Chrome...

Resource interpreted as Image but transferred with MIME type text/html: "http://logs-01.loggly.com/inputs/d62c2db7-48fa-4105-a0ca.....

It seems we're requesting an image but getting back text/html...

hudsonhyunlim commented 10 years ago

@bradschafer are you still having this issue? The tracker uses tracking gif and the response MIME type should be image/gif.

bradschafer commented 10 years ago

yup... I replaced actual key and params w/ xxxx for security... but it seems we're still getting text/html header response type.

REQUEST HEADERS Remote Address:54.236.68.122:80 Request URL:http://logs-01.loggly.com/inputs/xxxxxxxxxxxxxxxxxx/tag/localhost,Console,ExtJs4,casino_2/.gif?PLAINTEXT=xxxxxxxxxxxxxxxxxx Request Method:GET Status Code:200 OK Request Headersview source Accept:image/webp,/;q=0.8 Accept-Encoding:gzip,deflate,sdch

RESPONSE HEADERS Connection:keep-alive Content-Length:19 Content-Type:text/html Date:Wed, 03 Sep 2014 16:02:28 GMT Server:nginx/1.1.19

hudsonhyunlim commented 10 years ago

@bradschafer Ah, I see what's going on. Unfortunately, we don't support tags for tracking pixel url endpoints right now. The current tracking pixel format we support is:

https://logs-01.loggly.com/inputs/.gif?PLAINTEXT=

It seems that the url in the tracker utility lib was modified to a different data collector url with tags in there. To get around the lack of tags support in tracking pixel GET, you can send tags as a separate field as part of the data. When we implement proper tagging at the endpoint, this library will be updated for tags as well then.

bradschafer commented 10 years ago

Yeah.. I think I rewrote that trying to segment the data sources.. since TAGS not data can be separated. Likely we'll need to wait until the endpoint is re-written.. as the client won't goto production with errors and will need to segment the data.

bradschafer commented 10 years ago

For what it's worth.. other than the mime/type error.. the logging of the tags to that endpoint actually works..

hudsonhyunlim commented 10 years ago

Oh nice! For now, I'll keep this issue open, and update it when we get around to changing the endpoint. This isn't the first time proper tagging support has been requested. Thanks!

kellycampbell commented 9 years ago

I get these warnings even if I don't set the tag. It uses the default tag of 'jslogger'.

davidcai commented 9 years ago

I changed the URL to https://logs-01.loggly.com/inputs/token/.gif?PLAINTEXT=..., but I still get the warnings.

varshneyjayant commented 9 years ago

@kellycampbell it looks like that you are using older version of the script as current script does not use any tag

varshneyjayant commented 9 years ago

@davidcai I have tested with the latest script. It does not show any image warnings.

varshneyjayant commented 9 years ago

Try #25

varshneyjayant commented 9 years ago

@bradschafer Seems this to be fixed in the latest update.