• /
  • ログイン
  • 無料アカウント

Log message is truncated

Problem

Not all log data in a message or for a specific attribute is being displayed. The log data ends with an ellipses (...) and the remaining data isn't shown.

Solution

This occurs because the logs datastore in New Relic limits the field length to 4,096 characters. Any data longer than that is truncated during ingestion.

If you have values exceeding the character limit, here are some options to try:

Troubleshooting tips

Comments

Parse long messages

Parse your log message into shorter key/value pairs. A common example is a single log line from an NGINX access log. That log message can be parsed using built-in parsing via Logstash, Fluentd, or Fluent Bit. For more information, see our documentation about parsing log data.

Use JSON output

Use JSON as an output format instead of plain text. JSON log messages will automatically be parsed into key/value pairs, which makes it much less likely to hit the character limit.

Expand blob data

The first 4,094 characters in a log message are stored as a string. The next 128,000 bytes are stored as a blob.

To query for any log data in New Relic, run the following query:

SELECT * FROM Log

To expand the blob data, run the following query, using message or any other attribute. Be sure to enclose the blob's attribute with backticks. For example:

SELECT message, another-attribute, blob(`newrelic.ext.message`), blob(`newrelic.ext.another-attribute) FROM Log

For more information, see our documentation about long messages stored as blobs.

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.