Skip to content

request data have a mistake #63

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

Closed
EthianWong opened this issue Nov 9, 2016 · 8 comments
Closed

request data have a mistake #63

EthianWong opened this issue Nov 9, 2016 · 8 comments

Comments

@EthianWong
Copy link
Contributor

EthianWong commented Nov 9, 2016

if i use this function

client.submitLog('app.logger', 'submitLog', 'Info')

the request info like this :

[
    {
        "date": "2016-11-09T14:26:39.742Z",
        "type": "log",
        "source": "app.logger",
        "message": "submitLog",
        "data": {
            "@level": "Info",
            "@environment": {
                "processor_count": 4,
                "total_physical_memory": 8485175296,
                "available_physical_memory": 4277342208,
                "command_line": "C:\\Program Files\\nodejs\\node.exe C:\\Users\\WangYunjian\\Desktop\\test\\app.js",
                "process_name": "",
                "process_id": "8564",
                "process_memory_size": 10505040,
                "architecture": "x64",
                "o_s_name": "Windows_NT",
                "o_s_version": "10.0.14393",
                "ip_address": "192.168.20.103",
                "machine_name": "DESKTOP-ABMNEVC",
                "runtime_version": "v4.6.1",
                "data": {
                    "loadavg": [
                        0,
                        0,
                        0
                    ],
                    "platform": "win32",
                    "tmpdir": "C:\\Users\\WANGYU~1\\AppData\\Local\\Temp",
                    "uptime": 8641.2762081,
                    "endianness": "LE"
                }
            }
        },
        "tags": []
    }
]

in dashboard
qq 20161109223050

if i use this function

client.createLog('app.logger', 'createLog then submit', 'Info').submit()

result has change and process_name is unreadable chars

[
    {
        "date": "2016-11-09T14:27:48.224Z",
        "type": "log",
        "source": "app.logger",
        "message": "createLog then submit",
        "data": {
            "@level": "Info",
            "@environment": {
                "processor_count": 4,
                "total_physical_memory": 8485175296,
                "available_physical_memory": 4271304704,
                "command_line": "C:\\Program Files\\nodejs\\node.exe C:\\Users\\WangYunjian\\Desktop\\test\\app.js",
                "process_name": "��(5�\u0001",
                "process_id": "4612",
                "process_memory_size": 10505040,
                "architecture": "x64",
                "o_s_name": "Windows_NT",
                "o_s_version": "10.0.14393",
                "ip_address": "192.168.20.103",
                "machine_name": "DESKTOP-ABMNEVC",
                "runtime_version": "v4.6.1",
                "data": {
                    "loadavg": [
                        0,
                        0,
                        0
                    ],
                    "platform": "win32",
                    "tmpdir": "C:\\Users\\WANGYU~1\\AppData\\Local\\Temp",
                    "uptime": 8709.7455583,
                    "endianness": "LE"
                }
            }
        },
        "tags": []
    }
]

in dashboard

qq 20161109223101

i use windows 10 and language is chinese , file encoding is utf8

@EthianWong
Copy link
Contributor Author

it's so odd...

process.title is different ....

qq 20161109223830

but if i create a js just console process.title the result is normal

@EthianWong
Copy link
Contributor Author

EthianWong commented Nov 9, 2016

i make a demo

var a = process.title;
console.log(process.title || "empty");
console.log(a);
console.log(a === process.title);

"process.title" and "a" is always different ...

i run

node app.js

in atom inner terminal will be always different ...

but if i use cmd run app.js result always is true

so maybe this problem from atom or atom terminal (but atom terminal always use cmd )

maybe you should change function to get process.title
because many people use atom terminal....

or you can tell developer in development environment should set process.title in application....

then in exceptionless dashboard log always like good

@EthianWong
Copy link
Contributor Author

I'm not good at English , so do you understand?

@niemyjski
Copy link
Member

I think these two are related: #62
It comes down to encoding of those fields I think.

Were you able to reproduce this in the master branch? https://github.com/exceptionless/Exceptionless.JavaScript/blob/master/src/services/NodeEnvironmentInfoCollector.ts#L32

@EthianWong
Copy link
Contributor Author

EthianWong commented Nov 9, 2016

It's just will be happend in atom's terminal.
If i use system's terminal this problem will be resolve.

so maybe this problem not about your project

but if you want to see this you should use atom and install this package https://atom.io/packages/platformio-ide-terminal for reproduce this problem

@EthianWong
Copy link
Contributor Author

but i also seem #62

builder.setProperty("Response", res);

if res object has chinese value , exceptionless dashboard will not be normal.

@EthianWong
Copy link
Contributor Author

#62 I find this problem how to resolve , i will submit a pull request

@niemyjski
Copy link
Member

I'm closing this as this is a duplicate of #62 which I'm working on in the browser and will take a look at your pr for node once it's fixed in the browser :)

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

No branches or pull requests

2 participants