OpenTelemetry config options

You can configure OpenTelemetry to send data to AppSignal using resource attributes.

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

You can configure resource attributes in your OpenTelemetry configuration file, this is also where you need to set up the OpenTelemetry exporter to send data to the AppSignal standalone agent.

App name

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

Name of your application as it should be displayed on AppSignal.com.

Python
attributes = { # Add this line to the resource attributes "appsignal.config.name": "My awesome app", } resource = Resource(attributes=attributes)

App environment

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

The environment of the application as it should be displayed on AppSignal.com.

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

Push API key

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

The organization-level authentication key to authenticate with our Push API.

For detailed information about the AppSignal Push API key, check out our terminology documentation.

Python
attributes = { # Add this line to the resource attributes "appsignal.config.push_api_key": "00000000-0000-0000-0000-000000000000", } resource = Resource(attributes=attributes)

App revision

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

To report new deploys of OpenTelemetry applications, you 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)

Filter attributes

  • Attribute name: appsignal.config.filter_attributes
  • Type: Array
  • Required: No

The filter_attributes resource attribute allows you to filter out specific attributes from being reported to AppSignal. This can be useful to filter out sensitive or non-relevant information from being reported.

Python
attributes = { # Add this line to the resource attributes "appsignal.config.filter_attributes": ["my.secret.attribute", "some.opentelemetry.attribute"], } resource = Resource(attributes=attributes)

Ignore actions

  • Attribute name: appsignal.config.ignore_actions
  • Type: Array of Strings
  • Required: No

The ignore_actions resource attribute allows you to ignore specific actions from being reported to AppSignal. This can be useful to ignore health check endpoints or other actions that you don't want to monitor.

Python
attributes = { # Add this line to the resource attributes "appsignal.config.ignore_actions": ["GET /health_check", "POST /ping"], } resource = Resource(attributes=attributes)

Ignore namespaces

  • Attribute name: appsignal.config.ignore_namespaces
  • Type: Array of Strings
  • Required: No

The ignore_namespaces resource attribute allows you to ignore specific namespaces from being reported to AppSignal. This can be useful to ignore specific parts of your application from being monitored.

Python
attributes = { # Add this line to the resource attributes "appsignal.config.ignore_namespaces": ["admin" ,"secret"], } 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.

To set this option, specify the language name in lowercase format, e.g. "python", "rust", "ruby", "elixir", "go" and "nodejs".

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

Hostname

  • Attribute name: host.name
  • Type: String
  • Required: No

The host.name resource attribute helps AppSignal recognize different hosts for traces and tag the traces automatically with the hostname.

Python
import socket attributes = { # Add this line to the resource attributes "host.name": socket.gethostname(), } resource = Resource(attributes=attributes)

Service name

  • Attribute name: service.name
  • Type: String
  • Required: No

The service.name resource attribute helps AppSignal recognize different services for traces and groups the traces automatically in a namespace based on the service name.

Python
import socket attributes = { # Add this line to the resource attributes "service.name": "My service name", } resource = Resource(attributes=attributes)