Header background

Dynatrace Managed: Support for SQL bind variables

Dynatrace is proud to announce support for SQL bind variable capture with Dynatrace Managed.

Bind variables are a means of parameterizing SQL statements. They result in statements that have question marks or parameters in their where clauses. This can take different forms.

  • SQL Server example: select count (*) from report where tenant = @tenant
  • Java JDBC example: select count (*) from report where tenant = ?

This allows the database server to prepare the statement once and execute it many times without re-parsing or re-analyzing it. This differs from statements that use literals, such as select count (*) from report where tenant = 'xxxx'. Such statements aren’t parameterized, and in many cases force the database server to re-parse and re-analyze them with each execution.

Beginning with Dynatrace Managed version 1.152, you’ll see a new section called Deep Monitoring settings. This feature requires Dynatrace OneAgent 1.151 or higher.

By enabling this setting environment-wide, or for individual process groups, you instruct Dynatrace OneAgent to capture the values of these bind parameters. This works for a few technologies:

  • JDBC
  • PHP database frameworks

The result can be seen when looking at a single PurePath. You might notice that in the example below the values are masked. Bind variables are considered confidential data by Dynatrace as they can contain IDs or other sensitive values; they are therefore masked by default.

SQL bind variables

Users that have the necessary permission for the respective entity or management zone can view such bind values.

SQL bind variables

For full details on setting up your environment to ensure the data privacy of your end users, see Dynatrace data privacy and security.

Attention: This feature can potentially capture a lot of extra data and lead to significantly higher network traffic and storage demands on your Dynatrace Managed cluster. Use this feature cautiously and, if possible, only for specific process groups. This is why, along with the capacity to capture sensitive data, that this feature is only available within Dynatrace Managed environments, not Dynatrace SaaS environments.