This Instrumentation Rule is currently only available with the Odigos Enterprise plan.
Contact us for more information.

Considerations

Before enabling code attributes, please note the following:

  • Size of code.stacktrace can be large and may increase the size of your spans. This can impact the performance of your application and the cost of processing, storing and analyzing traces.
  • Code attributes have various level of support, depending on the programming language and instrumentation library used.

Configuration Options

Any unspecified options will be set to the default value of false (not recorded).

Basic Example

The following example demonstrates how to enable code attributes for all supported workloads and instrumentation libraries in the cluster.

1

Create a YAML file with the following content:

code-attributes.yaml
apiVersion: odigos.io/v1alpha1
kind: InstrumentationRule
metadata:
  name: collect-all-payloads
  namespace: odigos-system
spec:
  ruleName: "collect all supported code attributes"
  codeAttributes:
    column: false
    filePath: true # recommended
    function: true # recommended
    lineNumber: true # recommended
    namespace: false
    stackTrace: false
2

Apply the action to the cluster:

kubectl apply -f code-attributes.yaml