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

logfmt syntax error with Grafana cloud #141

Open
mjp0 opened this issue Dec 4, 2023 · 0 comments
Open

logfmt syntax error with Grafana cloud #141

mjp0 opened this issue Dec 4, 2023 · 0 comments

Comments

@mjp0
Copy link

mjp0 commented Dec 4, 2023

I can't get this to work with Grafana cloud because of logfmt parsing issue. I've tried different combos with json and format parameters but either log is transferred just as a string with no field (when json is false) or I get the a parsing error logfmt syntax error at pos 2 : unexpected '"'.

My config:

new LokiTransport({
  host: e.LOKI_HOST,
  basicAuth: e.LOKI_AUTH,
  labels: { job: id },
  json: true,
  format: winston.format.json(),
  replaceTimestamp: true,
  onConnectionError: console.error
})

Both logger.info('foobar') and logger.info({ message: "foobar" }) fail with the same logfmt error.

Any ideas?

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