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

Remove mdc attributes prefix #9536

Merged
merged 4 commits into from
Jan 5, 2024

Conversation

SHaaD94
Copy link
Contributor

@SHaaD94 SHaaD94 commented Sep 22, 2023

As discussed in #9506 removing MDC attributes prefix for both log4j and logback.

@SHaaD94 SHaaD94 requested a review from a team September 22, 2023 03:35
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 22, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

@laurit laurit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SHaaD94 SHaaD94 requested a review from laurit September 25, 2023 10:33
@SHaaD94 SHaaD94 force-pushed the remove-log-mdc-attribute-prefix branch from 4e5bea6 to 07b85e6 Compare September 26, 2023 03:17
@trask
Copy link
Member

trask commented Oct 30, 2023

@laurit @mateuszrzeszutek do you think we should hold this for 2.0?

@jack-berg
Copy link
Member

This is related to: open-telemetry/opentelemetry-java#5880

If we put structured key value pairs in the body as AnyValue, there is no chance of collision with the attributes and the prefix is uneeded.

@trask
Copy link
Member

trask commented Oct 31, 2023

one concern I have with putting MDC attributes in the body is that they won't be available to attribute-based processors (e.g. in the collector), or searchable in backends in the same way other log attributes are, at least without additional backend work / interpretation of the log bodies

@laurit
Copy link
Contributor

laurit commented Nov 1, 2023

@laurit @mateuszrzeszutek do you think we should hold this for 2.0?

I think it is fine either way. We could put it in 2.0 along with other breaking changes or just outline this as a breaking change in the release notes of the next release.

@AlchemyDing
Copy link
Member

Do we need a configuration to enable the prefix of MDC?

@trask trask added this to the v2.0 milestone Dec 14, 2023
@trask
Copy link
Member

trask commented Dec 15, 2023

hi @SHaaD94! we are preparing to release v2.0 soon, can you rebase your PR and check any CI failures? thx

@SHaaD94 SHaaD94 force-pushed the remove-log-mdc-attribute-prefix branch 3 times, most recently from 313cda1 to 847ff0c Compare December 15, 2023 04:03
@SHaaD94 SHaaD94 force-pushed the remove-log-mdc-attribute-prefix branch from 847ff0c to 6c3bbb0 Compare December 15, 2023 04:07
@SHaaD94
Copy link
Contributor Author

SHaaD94 commented Dec 15, 2023

hi @SHaaD94! we are preparing to release v2.0 soon, can you rebase your PR and check any CI failures? thx

Hello @trask. Done

@jack-berg
Copy link
Member

one concern I have with putting MDC attributes in the body is that they won't be available to attribute-based processors (e.g. in the collector), or searchable in backends in the same way other log attributes are, at least without additional backend work / interpretation of the log bodies

@trask sorry for the delay replying. I don't think we should put MDC attributes in the body - I think we should MapMessage / KeyValuePair in the body.

Do you think we should do this and if so, do you think its worthwhile to bundle in with 2.0?

@mateuszrzeszutek
Copy link
Member

@trask sorry for the delay replying. I don't think we should put MDC attributes in the body - I think we should MapMessage / KeyValuePair in the body.

Sorry for even more delayed reply 😂
I totally agree with that -- I think MDC attributes are more like metadata of the log message, not the actual data of it; and log record attributes seem to be a better place for them than body.

Do you think we should do this and if so, do you think its worthwhile to bundle in with 2.0?

Translating the MapMessage to log record body? Is it strictly necessary for 2.0, or can we introduce that a bit later?

@trask
Copy link
Member

trask commented Jan 4, 2024

Discussed in SIG. I will push commit to revert the map_message portion in order to avoid churn since we are planning to move map messages to log body in the future.

@trask trask enabled auto-merge (squash) January 5, 2024 18:16
@trask trask merged commit 2ee4ee1 into open-telemetry:main Jan 5, 2024
47 checks passed
@SHaaD94 SHaaD94 deleted the remove-log-mdc-attribute-prefix branch January 7, 2024 03:17
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 this pull request may close these issues.

6 participants