OpenTelemetry config options

OpenTelemetry can be configured to configure AppSignal using resource attributes.

Resource attributes are attributes that apply that every trace reported from the application using OpenTelemetry.

These resource attributes should be configured in your OpenTelemetry config file, where you also configure the OpenTelemetry exporter to export to the AppSignal standalone agent.

App revision

  • Attribute name: appsignal.config.revision
  • Type: String
  • Required: No

To report new deploys of OpenTelemetry applications, we can use Deploy Markers.

Deploy markers can be configured with the revision resource attribute. The value of this attribute will be used to identify new deploys. It needs to be unique per deploy to pick up new deploys. We recommend using Git commit SHAs or a tag in your SCM. This can be used in combination with our backtrace links to directly link from AppSignal back to the source code on platforms like GitHub and GitLab.

python
import subprocess attributes = { # ... } try: revision = subprocess.check_output("git rev-parse --short HEAD", shell=True, text=True).strip() attributes["appsignal.config.revision"] = revision except subprocess.CalledProcessError: pass resource = Resource(attributes=attributes)

Language integration

  • Attribute name: appsignal.config.language_integration
  • Type: String
  • Required: Yes

AppSignal uses the language_integration resource attribute to detect the language of a trace and correctly parse exception backtraces. No backtraces will be displayed if language_integration is not defined.

python
attributes = { # Add this line to the resource attributes "appsignal.config.language_integration": "python", } resource = Resource(attributes=attributes)

App path

  • Attribute name: appsignal.config.app_path
  • Type: String
  • Required: No

The app_path resource attribute helps AppSignal clean up backtraces by stripping away the absolute app path of backtrace lines. This way only paths within the context of the project directory is shown. This makes our Backtrace links feature possible.

python
import os attributes = { # Add this line to the resource attributes "appsignal.config.app_path": os.path.dirname(__file__), } resource = Resource(attributes=attributes)

Ignore namespaces

  • Attribute name: appsignal.config.ignore_namespaces
  • Type: List of strings (as a comma-separated string)
  • Required: No
  • Standalone agent version required: 0.0.26

The ignore_namespaces config option tells our agent to ignore all data from one or more namespaces.

python
attributes = { # Add this line to the resource attributes "appsignal.config.ignore_namespaces": ",".join(["admin", "secret"]), } resource = Resource(attributes=attributes)

Ignore actions

  • Attribute name: appsignal.config.ignore_actions
  • Type: List of strings (as a comma-separated string)
  • Required: No
  • Standalone agent version required: 0.0.26

The ignore_actions config option tells our agent to ignore all data from one or more actions.

python
attributes = { # Add this line to the resource attributes "appsignal.config.ignore_actions": ",".join(["GET /up", "GET /health"]), } resource = Resource(attributes=attributes)

Ignore errors

  • Attribute name: appsignal.config.ignore_errors
  • Type: List of strings (as a comma-separated string)
  • Required: No
  • Standalone agent version required: 0.0.26

The ignore_errors config option tells our agent to ignore errors with a matching name. The span will be reported, but the error will be ignored, as if no error occurred.

python
attributes = { # Add this line to the resource attributes "appsignal.config.ignore_errors": ",".join(["TypeError", "NameError"]), } resource = Resource(attributes=attributes)

Send parameters

  • Attribute name: appsignal.config.send_parameters
  • Type: Boolean (as a string)
  • Required: No (Default: "true")
  • Standalone agent version required: 0.0.26

The send_parameters config option tells our agent whether or not to include parameters on the trace. If set to false parameters are not included.

python
attributes = { # Add this line to the resource attributes "appsignal.config.send_parameters": "false", } resource = Resource(attributes=attributes)

Send session data

  • Attribute name: appsignal.config.send_session_data
  • Type: Boolean (as a string)
  • Required: No (Default: "true")
  • Standalone agent version required: 0.0.26

The send_session_data config option tells our agent whether or not to include session data on the trace. If set to false session data is not included.

python
attributes = { # Add this line to the resource attributes "appsignal.config.send_session_data": "false", } resource = Resource(attributes=attributes)

Filter parameters

  • Attribute name: appsignal.config.filter_parameters
  • Type: List of strings (as a comma-separated string)
  • Required: No
  • Standalone agent version required: 0.0.26

The filter_parameters config option tells our agent which parameter keys to filter out, like password and secret. They will be reported with the [FILTERED] value.

python
attributes = { # Add this line to the resource attributes "appsignal.config.filter_parameters": ",".join(["password", "secret"]), } resource = Resource(attributes=attributes)

Filter session data

  • Attribute name: appsignal.config.filter_session_data
  • Type: List of strings (as a comma-separated string)
  • Required: No
  • Standalone agent version required: 0.0.26

The filter_session_data config option tells our agent which parameter keys to filter out, like secret1 and secret2. They will be reported with the [FILTERED] value.

python
attributes = { # Add this line to the resource attributes "appsignal.config.filter_session_data": ",".join(["secret1", "secret2"]), } resource = Resource(attributes=attributes)