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

Labels not correctly stringified in request #81

Closed
wyl1232792 opened this issue Oct 19, 2021 · 1 comment · Fixed by #82
Closed

Labels not correctly stringified in request #81

wyl1232792 opened this issue Oct 19, 2021 · 1 comment · Fixed by #82

Comments

@wyl1232792
Copy link

It's wierd. I found stream label in request body is "[object Object]".

{"streams":[{"stream":"[object Object]","values":[["1634641025327000000","{\"level\":\"info\",\"message\":\"haha\"}"]]}]}

My code:

new LokiTransport({
            host: 'http://192.168.11.204:3100',
            format: format.combine(
                format.json(),
            ),
            batching: false,
            labels: {
                biz: 'test',
            },
            json: true
        })

And it works when I remove the code below.

lokiLabels = JSON.parse(JSON.stringify(lokiLabels, (key, value) => value ? value.toString() : value))

@JaniAnttonen
Copy link
Owner

Related to #80. Downgrading helps, will draft a new release soonish :)

mattgodbolt added a commit to compiler-explorer/compiler-explorer that referenced this issue Oct 25, 2021
carboneater pushed a commit to carboneater/winston-loki that referenced this issue Nov 11, 2021
JaniAnttonen pushed a commit that referenced this issue Nov 12, 2021
AbrilRBS pushed a commit to compiler-explorer/compiler-explorer that referenced this issue Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants