Skip to content

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

@SylvainJuge

Description

@SylvainJuge

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.

Checklist

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions