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

App source code included in logs #56

Open
arggh opened this issue May 24, 2018 · 1 comment
Open

App source code included in logs #56

arggh opened this issue May 24, 2018 · 1 comment
Labels

Comments

@arggh
Copy link
Contributor

arggh commented May 24, 2018

I'm wondering, is it intentional to include app source code in the log messages?

 {
    "_id": "eLnvfTgZhHDZtLWQ6",
    "level": 3,
    "message": "t.target.closest is not a function",
    "context": {
        "message_details": {
            "mode": "stack",
            "name": "TypeError",
            "message": "t.target.closest is not a function",
            "stack": [
                {
                    "url": "https://myapp.com/66c8e63c0bcd217ad90172f6c531842452b03a9e.js?meteor_js_resource=true",
"func": "b",
                    "args": [],
                    "line": 193,
                    "column": 240691,
                    "context": [
                        "",
                        "!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,i=Package.meteor.meteorEnv,n=Package.mongo.Mongo,r=Package.modules.meteorInstall,o=Package[\"babel-runtime\"].meteorBabelHelpers,a=Package.promise.Promise,s=Package[\"ecmascript-runtime-client\"].Symbol,l=Package[\"ecmascript-runtime-client\"].Map,u=Package[\"ecmascript-runtime-client\"].Set,d,c,p,f,m,h,y,g,v,b,S,I,w,k,N,E,T,B,C,U,A,x,O,z,j,F,R,P,D,M,L,G,W,V,q,H,K,Y,$,J,Z,Q,X,ee,te,ie,ne,re,oe,ae,se,le,ue,de,ce,pe,fe,me,he,ye,ge,ve,be,Se,Ie,we,ke,Ne,Ee,Te,Be,Ce,Ue,Ae,_e,xe,Oe,ze,je,Fe,Re,P............
@fgm
Copy link
Owner

fgm commented May 24, 2018

I would say it is intentional in the component which captures the stack traces (callsite and/or tracekit): filog does not act on the stacks itself. However, since this can lead to high data volume, you can add a processor to your logger to slice or otherwise reduce the context volume during logging.

Notice that there is ongoing work in #23 and #27 to structure the context better. The current situation, especially for combined logging chains with processors on both client and server, leads to context formats that are a bit strange.

Our main app using filog is being modified these days to have a completely custom context format using a bespoke processor on the server in order to have exactly what we want in logs, and not more, to reduce the work done to post-normalize them in Logstash: this is something you might want to consider too.

@fgm fgm added the question label May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants