Code

Code Attributes

These attributes provide context about source code

AttributeTypeDescriptionExamplesStability
code.column.numberintThe column number in code.file.path best representing the operation. It SHOULD point within the code unit named in code.function.name.16Experimental
code.file.pathstringThe source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path)./usr/local/MyApplication/content_root/app/index.phpExperimental
code.function.namestringThe method or function name, or equivalent (usually rightmost part of the code unit’s name).serveRequestExperimental
code.line.numberintThe line number in code.file.path best representing the operation. It SHOULD point within the code unit named in code.function.name.42Experimental
code.namespacestringThe “namespace” within which code.function.name is defined. Usually the qualified class or module name, such that code.namespace + some separator + code.function.name form a unique identifier for the code unit.com.example.MyHttpServiceExperimental
code.stacktracestringA stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)Experimental

Deprecated Code Attributes

These deprecated attributes provide context about source code

AttributeTypeDescriptionExamplesStability
code.columnintDeprecated, use code.column.number16Deprecated
Replaced by code.column.number
code.filepathstringDeprecated, use code.file.path instead/usr/local/MyApplication/content_root/app/index.phpExperimental
code.functionstringDeprecated, use code.function.name insteadserveRequestDeprecated
Replaced by code.function.name
code.linenointDeprecated, use code.line.number instead42Deprecated
Replaced by code.line.number