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

Is formating for log messages actually implemented? #2628

Open
GeorgViehoever opened this issue Apr 4, 2024 · 2 comments
Open

Is formating for log messages actually implemented? #2628

GeorgViehoever opened this issue Apr 4, 2024 · 2 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@GeorgViehoever
Copy link

I am trying to use formatting for log messages as suggested in

* @format an utf-8 string following https://messagetemplates.org/
. It does not seem to work.
Q: Is it actually implemented?
Q: Do you have an example code for me? Something like:

std::map<std::string, std::string> labelsTrace = {{"userId", "myUserId"}};
 logger->Trace(
 	  "traceLogMessage of user {userId}";
 	  labelsTrace);
@GeorgViehoever GeorgViehoever added the bug Something isn't working label Apr 4, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Apr 4, 2024
@lalitb
Copy link
Member

lalitb commented Apr 4, 2024

Perhaps this needs to be documented better. The formatting of the message is not done by OpenTelemetry SDK, but the onus is on upstream agents or exporters who want the support.

@GeorgViehoever
Copy link
Author

I suggest to make this into a bug that requests to improve documentation. I believe I found nothing to this effect in the Docs or any code comments.

@lalitb lalitb added the documentation Improvements or additions to documentation label Apr 5, 2024
@esigo esigo added triage/accepted Indicates an issue or PR is ready to be actively worked on. good first issue Good for newcomers and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants