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

Emit collector JSON logs with the message attribute #10612

Open
clintonb opened this issue Jul 14, 2024 · 3 comments
Open

Emit collector JSON logs with the message attribute #10612

clintonb opened this issue Jul 14, 2024 · 3 comments

Comments

@clintonb
Copy link

clintonb commented Jul 14, 2024

Is your feature request related to a problem? Please describe.

Datadog and Google use the message attribute as the main body of the log message. This value is used for basic search and log tailing.

Usage of the msg attribute by the collector makes log spelunking a bit tedious.

Describe the solution you'd like

There are a few options:

  1. Only use the message attribute.
  2. Use both the message and msg attributes.
  3. Allow the attribute to be defined via configuration. For example:
service:
  telemetry:
    logs:
      encoding: json
      body_attribute: message
@clintonb
Copy link
Author

Related: #4740 (comment)

@atoulme
Copy link
Contributor

atoulme commented Jul 14, 2024

We could dxpose zapcore.EncoderConfig. You can override messageKey then.

@TylerHelmuth
Copy link
Member

Ultimately the collectors telemetry will follow OpenTelemetry Semantic conversions. Those haven't yet been decided for the collector, but the conversation has started.

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

3 participants