Deployment Integrations
On-premise Integrations
Platform Integrations

Trace Configurations

Instrumentation of Chalice Applications

Instrumentation of Chalice applications is automatically handled. Initializing Thundra agent is all you need. Just add below lines to your code to make it work:

from thundra.thundra_agent import Thundra
# Pass configuration parameters here or add as environment variables
# to your chalice config.json
thundra = Thundra()

An example usage is shown below:

from chalice import Chalice
from thundra.thundra_agent import Thundra
# Pass configuration parameters here or add as environment variables
# to your chalice config.json
thundra = Thundra()
app = Chalice(app_name='test')
@app.route('/')
def index():
return {'hello': 'world'}

Configuring Environment Variables For Chalice

Chalice deployment is facilitated by using Thundra’s environment variables and setting them in your .chalice/config.json file. Deploying your chalice application will set these variables and allow Thundra to monitor your functions.

You can add environment variables for global or for a specific stage as shown below in your .chalice/config.json:

{
"version": "2.0",
"app_name": "test",
"environment_variables": {
"thundra_apiKey": <your api key here>
},
"stages": {
"dev": {
"environment_variables": {
"thundra_apiKey": <your api key here>
},
"api_gateway_stage": "api"
}
}
}

Disabling Chalice Instrumentation

By default, tracing route handler functions created with Chalice is enabled, but can also be disabled as is required through configuration. You just need to set thundra_agent_lambda_trace_integrations_chalice_disable environment variable to true

Trace Configuration of Automatically Supported Integrations

Configuring AWS SDK Trace

Masking SQS Messages

You can mask sent SQS message at client side which calls AWS SDK by setting following environment variable:

thundra_agent_lambda_trace_integrations_aws_sqs_message_mask: true

Masking SNS Messages

You can mask sent SNS message at client side which calls AWS SDK by setting following environment variable:

thundra_agent_lambda_trace_integrations_aws_sns_message_mask: true

Masking DynamoDB Statements

You can mask sent DynamoDB statements at client side which calls AWS SDK by setting following environment variable:

thundra_agent_lambda_trace_integrations_aws_dynamodb_statement_mask: true

Masking Lambda Payload

You can mask Lambda invocation payload at client side which calls AWS SDK by setting following environment variable:

thundra_agent_lambda_trace_integrations_aws_lambda_payload_mask: true

Masking API Gateway Request Body

You can mask request body at client side by setting following environment variable:

thundra_agent_lambda_trace_integrations_http_body_mask: true

Masking Athena Statements

You can mask Athena statements at client side which calls AWS SDK by setting following environment variable:

thundra_agent_lambda_trace_integrations_aws_athena_statement_mask: true

Unmasking Kinesis Records In Event

By default incoming Kinesis records at triggered lambda is not traced. You can enable sending Kinesis records in request by setting following environment variable:

thundra_agent_lambda_trace_kinesis_request_enable: true

Unmasking Firehose Records In Event

By default incoming Firehose records at triggered lambda is not traced. You can enable sending Firehose records in request by setting following environment variable:

thundra_agent_lambda_trace_kinesis_request_enable: true

Unmasking CloudWatch Log Messages In Event

By default incoming CloudWatch logs at triggered lambda is not traced. You can enable sending CloudWatch logs in request by setting following environment variable:

thundra_agent_lambda_trace_cloudwatchlog_request_enable: true

Disabling Sending AWS SDK Trace

By default, tracing AWS SDK calls is enabled, but can also be disabled as is required through configuration. You just need to set thundra_agent_lambda_trace_integration_aws_disable to true

Configuring Redis Trace

Masking Redis

You can mask Redis calls by setting following environment variable:

thundra_agent_lambda_trace_integrations_redis_command_mask: true

Disabling Sending Redis Trace

By default, tracing Redis calls is enabled, but can also be disabled as is required through configuration. You can disable your integrations via Lambda environment variable. You just need to set thundra_agent_lambda_trace_integration_redis_disable to true.

Configuring HTTP Trace

Masking HTTP Request Body

You can mask http request body at client side by setting following environment variable:

thundra_agent_lambda_trace_integrations_http_body_mask: true

Disabling Sending HTTP Trace

Thundra traces HTTP calls by default. However, you may disable it using environment variables. You can set thundra_agent_lambda_trace_integrations_http_disableenvironment variable to true for this purpose.

Configuring MySQL Trace

Masking MySQL Queries

You can mask MySQL queries at client side by setting following environment variable:

thundra_agent_lambda_trace_integrations_rdb_statement_mask: true

Disabling Sending MySQL Trace

By default, tracing MySQL queries is enabled, but can also be disabled as is required via thundra_agent_lambda_trace_integrations_rdb_disable environment variable to true

Configuring PostgreSQL Trace

Masking PostgreSQL Queries

You can mask PostgreSQL queries at client side by setting following environment variable:

thundra_agent_lambda_trace_integrations_rdb_statement_mask: true

Disabling Sending PostgreSQL Trace

By default, tracing PostgreSQL queries is enabled, but can also be disabled as is required via thundra_agent_lambda_trace_integrations_rdb_disable environment variable to true

Configuring Elasticsearch Trace

Masking Elasticsearch Body

You can mask Elasticsearch body at client side by setting following environment variable:

thundra_agent_lambda_trace_integrations_elasticsearch_body_mask: true

Disabling Sending Elasticsearch Trace

By default, tracing Elasticsearch responses is enabled, but can also be disabled as is required through configuration. You can disable your integrations via Lambda environment variable. You just need to set thundra_agent_lambda_trace_integrations_elasticsearch_disable to true

Configuring SQLAlchemy Trace

Disabling Sending SQLAlchemy Trace

By default, tracing SQLAlchemy operations is enabled, but can also be disabled as is required through configuration. You can disable your integrations via Lambda environment variable. You just need to set thundra_agent_lambda_trace_integrations_sqlalchemy_disable to true

Configuring MongoDB Trace

Masking MongoDB Commands

You can mask MongoDB commands at client side by setting following environment variable:

thundra_agent_lambda_trace_integrations_mongodb_command_mask: true

Disabling Sending MongoDB Trace

By default, tracing MongoDB operations is enabled, but can also be disabled as is required through configuration. You can disable your integrations via Lambda environment variable. You just need to set thundra_agent_lambda_trace_integrations_mongodb_disable to true

Configuring Trace Plugin

Disabling Request/Response Tracing for Lambda

By default, request and response are traced but can be disabled with environment variable configuration.

To disable tracing request set the thundra_agent_lambda_trace_request_skipenvironment variable to true

Configuration via Environment Variable
thundra_agent_lambda_trace_request_skip: true

To disable tracing response set the thundra_agent_lambda_trace_response_skipenvironment variable to true

Configuration via Environment Variable
thundra_agent_lambda_trace_response_skip: true

Disabling trace plugin programmatically on agent initialization

Programmatic Configuration
thundra = Thundra(api_key=’my_api_key’, disable_trace=True)

Disabling trace plugin using environment variables

Configuration of Trace Plugin via Environment Variables
thundra_apiKey: ${self:custom.thundraApiKey}
thundra_agent_lambda_trace_disable: true