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

Ensure that the logged dimensions in HTTP logging follow the same naming conventions as defined for spans/metrics #4451

Closed
klauco opened this issue Sep 20, 2023 · 13 comments · Fixed by #4506 or #4545

Comments

@klauco
Copy link

klauco commented Sep 20, 2023

Currently, OTel defines semantic conventions for HTTP for spans and metrics and there are none for logs. However, it makes sense to not reinvent the wheel and stick to the naming which is already available even though it's meant for a different pillar.

What needs to be done:

  • dimension names used for HTTP and HTTP client log autocollection should be aligned with dimension names used in span/metric semantic conventions

cc @noahfalk @xakep139 @geeknoid

@xakep139
Copy link
Contributor

Decide what to do with complex object logging in SG (separator is _)

@xakep139
Copy link
Contributor

@klauco
Copy link
Author

klauco commented Sep 26, 2023

we should check and update remaining enrichers as well (remove env__ and use pascalCase)

@klauco
Copy link
Author

klauco commented Sep 26, 2023

@noahfalk what would you recommend as a delimiter for nested objects when doing complex object logging? "_" (right now) or "." or sth else?

@noahfalk
Copy link
Member

IMO dots seem marginally more aligned with the conventions. It also aligns better with typical syntax used in many programing languages when doing field access. So barring some particular technical problem I'm unaware of, I'd pick dot.

@xakep139 xakep139 assigned iliar-turdushev and unassigned xakep139 Oct 2, 2023
@iliar-turdushev iliar-turdushev linked a pull request Oct 4, 2023 that will close this issue
@ghost ghost removed the untriaged label Oct 4, 2023
@iliar-turdushev
Copy link
Contributor

The following will be implemented:

  • Use PascalCase for the names of dimensions and LoggerMessage parameters.
  • Use dot "." instead of underscore "_" for HTTP header names and for complex object logging.
  • Remove "env_" suffix from the names of enrichment dimensions.

FYI @xakep139 @klauco

@joperezr
Copy link
Member

joperezr commented Oct 5, 2023

@iliar-turdushev are you also planning on looking at logging categories for this and making sure they match the rest of dotnet?

@iliar-turdushev
Copy link
Contributor

@joperezr Could you, please, elaborate? I don't fully understand.

@geeknoid
Copy link
Member

geeknoid commented Oct 9, 2023

@Tratcher FYI

@Tratcher Tratcher added this to the 8.0-rtm milestone Oct 9, 2023
@Tratcher Tratcher closed this as completed Oct 9, 2023
@ghost ghost removed this from the 8.0-rtm milestone Oct 9, 2023
@xakep139 xakep139 reopened this Oct 10, 2023
@iliar-turdushev
Copy link
Contributor

iliar-turdushev commented Oct 10, 2023

Reopened the issue, because here we'll address naming of dimension not only in HTTP Logging, but also in HTTP Client logging, LogPropertiesAttribute (aka Complex Object Logging), enrichers, and etc. See the following comment.

@joperezr
Copy link
Member

Update:

@joperezr
Copy link
Member

Update:

  • We have approvals from the dotnet side, we just need approvals by Ludmila and/or Reily (OTel side).

@ghost ghost locked as resolved and limited conversation to collaborators Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.