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

JSON formatting error: Please remove "logs": from remote.js #41

Open
tim-mardesen opened this issue Oct 19, 2021 · 0 comments
Open

JSON formatting error: Please remove "logs": from remote.js #41

tim-mardesen opened this issue Oct 19, 2021 · 0 comments

Comments

@tim-mardesen
Copy link

queue.content = isJSON ? `{"logs":[${logs.join(',')}]}` : logs.join('\n');

There is an issue if I want to use the standardized JSON formatting that is supported by Loki:

  "streams": [
    {
      "stream": {
        "label": "value"
      },
      "values": [
          [ "<unix epoch in nanoseconds>", "<log line>" ],
          [ "<unix epoch in nanoseconds>", "<log line>" ]
      ]
    }
  ]
}```

Since there is a `"logs":` in your file, it will always have the parent level object of this JSON output be "logs" and not "streams". 
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

No branches or pull requests

1 participant