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

Clarify values for code.function.name and code.namespace #1677

Open
SylvainJuge opened this issue Dec 12, 2024 · 1 comment
Open

Clarify values for code.function.name and code.namespace #1677

SylvainJuge opened this issue Dec 12, 2024 · 1 comment

Comments

@SylvainJuge
Copy link
Contributor

This is part of #1599 where we aim to make code.* attributes as release-candidate.

Some of the code.* attributes are being renamed with #1624, but this issue is about the values of those attributes and having a clear definition for them, in particular:

  • code.function.name (previously code.function).
  • code.namespace

In the discussion of #1624 we found that not having explicit per-language examples leaves interpretation open (here and here), and is likely to cause ambiguity and potential inconsistencies, also there might be per-language constraints or overhead to provide those values.

Those attributes are currently in experimental, and we aim to promote them to release candidate with #1599, as per this comment we consider that they are not used enough to justify a migration plan to prevent unexpected breaking changes (for example with OTEL_SEMCONV_STABILITY_OPT_IN environment variable).

Here the goal would be to define for each language:

  • the value of code.function.name
  • the value of code.namespace
  • what value to use when only a single value is provided by the language/platform, in other words when to split and how
  • what value to use when only a partial value is available, for example anonymous lambdas/functions that might not have an explicit name in code (but likely have a "technical name").

For now, we aim to maximize consistency, however if the overhead to provide those values (for example due to extra allocation or string splitting overhead), it might be possible to provide "slightly inconsistent values" to avoid those.

@pellared
Copy link
Member

pellared commented Dec 18, 2024

Wouldn't it be better/simpler to just have one attribute code.function.name which value is a fully-qualified name (or "full name") and get rid of code.namespace? It would solve both issues:

  • what value to use when only a single value is provided by the language/platform, in other words when to split and how
  • what value to use when only a partial value is available, for example anonymous lambdas/functions that might not have an explicit name in code (but likely have a "technical name").

Maybe we should name such attribute code.function.full_name or code.function.fullname

Related comment: #1624 (comment)

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

2 participants