newrelic_datastore_segment_params_t Struct Reference

Segment configuration used to instrument calls to databases and object stores. More...

Data Fields

char * product
 Specifies the datastore type, e.g., "MySQL", to indicate that the segment represents a query against a MySQL database. More...
 
char * collection
 Optional. Specifies the table or collection being used or queried against. More...
 
char * operation
 Optional. Specifies the operation being performed: for example, "select" for an SQL SELECT query, or "set" for a Memcached set operation. While operations may be specified with any case, New Relic suggests using lowercase. More...
 
char * host
 Optional. Specifies the datahost host name. More...
 
char * port_path_or_id
 Optional. Specifies the port or socket used to connect to the datastore. More...
 
char * database_name
 Optional. Specifies the database name or number in use. More...
 
char * query
 Optional. Specifies the database query that was sent to the server. More...
 

Detailed Description

Segment configuration used to instrument calls to databases and object stores.

Examples
ex_datastore.c.

Field Documentation

◆ collection

char* newrelic_datastore_segment_params_t::collection

Optional. Specifies the table or collection being used or queried against.

If provided, this field is required to be a null-terminated string that does not include any slash characters. It is also valid to use the default NULL value, in which case the default string of "other" will be attached to the datastore segment.

◆ database_name

char* newrelic_datastore_segment_params_t::database_name

Optional. Specifies the database name or number in use.

If provided, this field is required to be a null-terminated string.

◆ host

char* newrelic_datastore_segment_params_t::host

Optional. Specifies the datahost host name.

If provided, this field is required to be a null-terminated string that does not include any slash characters. It is also valid to use the default NULL value, in which case the default string of "other" will be attached to the datastore segment.

◆ operation

char* newrelic_datastore_segment_params_t::operation

Optional. Specifies the operation being performed: for example, "select" for an SQL SELECT query, or "set" for a Memcached set operation. While operations may be specified with any case, New Relic suggests using lowercase.

If provided, this field is required to be a null-terminated string that does not include any slash characters. It is also valid to use the default NULL value, in which case the default string of "other" will be attached to the datastore segment.

◆ port_path_or_id

char* newrelic_datastore_segment_params_t::port_path_or_id

Optional. Specifies the port or socket used to connect to the datastore.

If provided, this field is required to be a null-terminated string.

◆ product

char* newrelic_datastore_segment_params_t::product

Specifies the datastore type, e.g., "MySQL", to indicate that the segment represents a query against a MySQL database.

New Relic recommends using the predefined NEWRELIC_DATASTORE_FIREBIRD through NEWRELIC_DATASTORE_SYBASE constants for this field. If this field points to a string that is not one of NEWRELIC_DATASTORE_FIREBIRD through NEWRELIC_DATASTORE_SYBASE, the resulting datastore segment shall be instrumented as an unsupported datastore.

For SQL-like datastores supported by the C SDK, when the record_sql field of the newrelic_transaction_tracer_config_t is set to NEWRELIC_SQL_RAW or NEWRELIC_SQL_OBFUSCATED, the query param of the newrelic_datastore_segment_config_t is reported to New Relic.

This field is required to be a non-empty, null-terminated string that does not include any slash characters. Empty strings are replaced with the string NEWRELIC_DATASTORE_OTHER.

Examples
ex_datastore.c.

◆ query

char* newrelic_datastore_segment_params_t::query

Optional. Specifies the database query that was sent to the server.

For security reasons, this value is only used if you set product to a supported sql-like datastore, NEWRELIC_DATASTORE_FIREBIRD, NEWRELIC_DATASTORE_INFORMIX, NEWRELIC_DATASTORE_MSSQL, etc. This allows the SDK to correctly obfuscate the query. When the product is set otherwise, no query information is reported to New Relic.

If provided, this field is required to be a null-terminated string.


The documentation for this struct was generated from the following file: