github.com/lulzWill/go-agent@v2.1.2+incompatible/internal/crossagent/cross_agent_tests/datastores/datastore_api.json (about)

     1  [
     2    {
     3      "test_name": "all required fields present, everything enabled",
     4      "input":{
     5        "parameters":{
     6          "product":"MySQL",
     7          "collection":"users",
     8          "operation":"INSERT",
     9          "host":"db-server-1",
    10          "port_path_or_id":"3306",
    11          "database_name":"my_db"
    12        },
    13        "is_web":true,
    14        "system_hostname":"datanerd-01",
    15        "configuration":{
    16          "datastore_tracer.instance_reporting.enabled":true,
    17          "datastore_tracer.database_name_reporting.enabled":true
    18        }
    19      },
    20      "expectation":{
    21        "metrics_unscoped":[
    22          "Datastore/all",
    23          "Datastore/allWeb",
    24          "Datastore/MySQL/all",
    25          "Datastore/MySQL/allWeb",
    26          "Datastore/operation/MySQL/INSERT",
    27          "Datastore/statement/MySQL/users/INSERT",
    28          "Datastore/instance/MySQL/db-server-1/3306"
    29        ],
    30        "metrics_scoped":[
    31          "Datastore/statement/MySQL/users/INSERT"
    32        ],
    33        "transaction_segment_and_slow_query_trace":{
    34          "metric_name":"Datastore/statement/MySQL/users/INSERT",
    35          "host":"db-server-1",
    36          "port_path_or_id":"3306",
    37          "database_name":"my_db"
    38        }
    39      }
    40    },
    41    {
    42      "test_name": "database name missing",
    43      "input":{
    44        "parameters":{
    45          "product":"MySQL",
    46          "collection":"users",
    47          "operation":"INSERT",
    48          "host":"db-server-1",
    49          "port_path_or_id":"3306"
    50        },
    51        "is_web":true,
    52        "system_hostname":"datanerd-01",
    53        "configuration":{
    54          "datastore_tracer.instance_reporting.enabled":true,
    55          "datastore_tracer.database_name_reporting.enabled":true
    56        }
    57      },
    58      "expectation":{
    59        "metrics_unscoped":[
    60          "Datastore/all",
    61          "Datastore/allWeb",
    62          "Datastore/MySQL/all",
    63          "Datastore/MySQL/allWeb",
    64          "Datastore/operation/MySQL/INSERT",
    65          "Datastore/statement/MySQL/users/INSERT",
    66          "Datastore/instance/MySQL/db-server-1/3306"
    67        ],
    68        "metrics_scoped":[
    69          "Datastore/statement/MySQL/users/INSERT"
    70        ],
    71        "transaction_segment_and_slow_query_trace":{
    72          "metric_name":"Datastore/statement/MySQL/users/INSERT",
    73          "host":"db-server-1",
    74          "port_path_or_id":"3306"
    75        }
    76      }
    77    },
    78    {
    79      "test_name": "host and port missing",
    80      "input":{
    81        "parameters":{
    82          "product":"MySQL",
    83          "collection":"users",
    84          "operation":"INSERT",
    85          "database_name":"my_db"
    86        },
    87        "is_web":true,
    88        "system_hostname":"datanerd-01",
    89        "configuration":{
    90          "datastore_tracer.instance_reporting.enabled":true,
    91          "datastore_tracer.database_name_reporting.enabled":true
    92        }
    93      },
    94      "expectation":{
    95        "metrics_unscoped":[
    96          "Datastore/all",
    97          "Datastore/allWeb",
    98          "Datastore/MySQL/all",
    99          "Datastore/MySQL/allWeb",
   100          "Datastore/operation/MySQL/INSERT",
   101          "Datastore/statement/MySQL/users/INSERT"
   102        ],
   103        "metrics_scoped":[
   104          "Datastore/statement/MySQL/users/INSERT"
   105        ],
   106        "transaction_segment_and_slow_query_trace":{
   107          "metric_name":"Datastore/statement/MySQL/users/INSERT",
   108          "database_name":"my_db"
   109        }
   110      }
   111    },
   112    {
   113      "test_name": "host missing, but port present",
   114      "input":{
   115        "parameters":{
   116          "product":"MySQL",
   117          "collection":"users",
   118          "operation":"INSERT",
   119          "port_path_or_id":"3306",
   120          "database_name":"my_db"
   121        },
   122        "is_web":true,
   123        "configuration":{
   124          "datastore_tracer.instance_reporting.enabled":true,
   125          "datastore_tracer.database_name_reporting.enabled":true
   126        }
   127      },
   128      "expectation":{
   129        "metrics_unscoped":[
   130          "Datastore/all",
   131          "Datastore/allWeb",
   132          "Datastore/MySQL/all",
   133          "Datastore/MySQL/allWeb",
   134          "Datastore/operation/MySQL/INSERT",
   135          "Datastore/statement/MySQL/users/INSERT",
   136          "Datastore/instance/MySQL/unknown/3306"
   137        ],
   138        "metrics_scoped":[
   139          "Datastore/statement/MySQL/users/INSERT"
   140        ],
   141        "transaction_segment_and_slow_query_trace":{
   142          "metric_name":"Datastore/statement/MySQL/users/INSERT",
   143          "host":"unknown",
   144          "port_path_or_id":"3306",
   145          "database_name":"my_db"
   146        }
   147      }
   148    },
   149    {
   150      "test_name": "instance reporting false",
   151      "input":{
   152        "parameters":{
   153          "product":"MySQL",
   154          "collection":"users",
   155          "operation":"INSERT",
   156          "host":"db-server-1",
   157          "port_path_or_id":"3306",
   158          "database_name":"my_db"
   159        },
   160        "is_web":true,
   161        "system_hostname":"datanerd-01",
   162        "configuration":{
   163          "datastore_tracer.instance_reporting.enabled":false,
   164          "datastore_tracer.database_name_reporting.enabled":true
   165        }
   166      },
   167      "expectation":{
   168        "metrics_unscoped":[
   169          "Datastore/all",
   170          "Datastore/allWeb",
   171          "Datastore/MySQL/all",
   172          "Datastore/MySQL/allWeb",
   173          "Datastore/operation/MySQL/INSERT",
   174          "Datastore/statement/MySQL/users/INSERT"
   175        ],
   176        "metrics_scoped":[
   177          "Datastore/statement/MySQL/users/INSERT"
   178        ],
   179        "transaction_segment_and_slow_query_trace":{
   180          "metric_name":"Datastore/statement/MySQL/users/INSERT",
   181          "database_name":"my_db"
   182        }
   183      }
   184    },
   185    {
   186      "test_name": "database name disabled",
   187      "input":{
   188        "parameters":{
   189          "product":"MySQL",
   190          "collection":"users",
   191          "operation":"INSERT",
   192          "host":"db-server-1",
   193          "port_path_or_id":"3306",
   194          "database_name":"my_db"
   195        },
   196        "is_web":true,
   197        "system_hostname":"datanerd-01",
   198        "configuration":{
   199          "datastore_tracer.instance_reporting.enabled":true,
   200          "datastore_tracer.database_name_reporting.enabled":false
   201        }
   202      },
   203      "expectation":{
   204        "metrics_unscoped":[
   205          "Datastore/all",
   206          "Datastore/allWeb",
   207          "Datastore/MySQL/all",
   208          "Datastore/MySQL/allWeb",
   209          "Datastore/operation/MySQL/INSERT",
   210          "Datastore/statement/MySQL/users/INSERT",
   211          "Datastore/instance/MySQL/db-server-1/3306"
   212        ],
   213        "metrics_scoped":[
   214          "Datastore/statement/MySQL/users/INSERT"
   215        ],
   216        "transaction_segment_and_slow_query_trace":{
   217          "metric_name":"Datastore/statement/MySQL/users/INSERT",
   218          "host":"db-server-1",
   219          "port_path_or_id":"3306"
   220        }
   221      }
   222    },
   223    {
   224      "test_name": "all fields missing",
   225      "input":{
   226        "parameters":{
   227        },
   228        "is_web":true,
   229        "system_hostname":"datanerd-01",
   230        "configuration":{
   231          "datastore_tracer.instance_reporting.enabled":true,
   232          "datastore_tracer.database_name_reporting.enabled":true
   233        }
   234      },
   235      "expectation":{
   236        "metrics_unscoped":[
   237          "Datastore/all",
   238          "Datastore/allWeb",
   239          "Datastore/Unknown/all",
   240          "Datastore/Unknown/allWeb",
   241          "Datastore/operation/Unknown/other"
   242        ],
   243        "metrics_scoped":[
   244          "Datastore/operation/Unknown/other"
   245        ],
   246        "transaction_segment_and_slow_query_trace":{
   247          "metric_name":"Datastore/operation/Unknown/other"
   248        }
   249      }
   250    },
   251    {
   252      "test_name": "missing collection",
   253      "input":{
   254        "parameters":{
   255          "product":"MySQL",
   256          "operation":"INSERT",
   257          "host":"db-server-1",
   258          "port_path_or_id":"3306",
   259          "database_name":"my_db"
   260        },
   261        "is_web":true,
   262        "system_hostname":"datanerd-01",
   263        "configuration":{
   264          "datastore_tracer.instance_reporting.enabled":true,
   265          "datastore_tracer.database_name_reporting.enabled":true
   266        }
   267      },
   268      "expectation":{
   269        "metrics_unscoped":[
   270          "Datastore/all",
   271          "Datastore/allWeb",
   272          "Datastore/MySQL/all",
   273          "Datastore/MySQL/allWeb",
   274          "Datastore/operation/MySQL/INSERT",
   275          "Datastore/instance/MySQL/db-server-1/3306"
   276        ],
   277        "metrics_scoped":[
   278          "Datastore/operation/MySQL/INSERT"
   279        ],
   280        "transaction_segment_and_slow_query_trace":{
   281          "metric_name":"Datastore/operation/MySQL/INSERT",
   282          "host":"db-server-1",
   283          "port_path_or_id":"3306",
   284          "database_name":"my_db"
   285        }
   286      }
   287    },
   288    {
   289      "test_name": "host present, port missing",
   290      "input":{
   291        "parameters":{
   292          "product":"MySQL",
   293          "collection":"users",
   294          "operation":"INSERT",
   295          "host":"db-server-1",
   296          "database_name":"my_db"
   297        },
   298        "is_web":true,
   299        "system_hostname":"datanerd-01",
   300        "configuration":{
   301          "datastore_tracer.instance_reporting.enabled":true,
   302          "datastore_tracer.database_name_reporting.enabled":true
   303        }
   304      },
   305      "expectation":{
   306        "metrics_unscoped":[
   307          "Datastore/all",
   308          "Datastore/allWeb",
   309          "Datastore/MySQL/all",
   310          "Datastore/MySQL/allWeb",
   311          "Datastore/operation/MySQL/INSERT",
   312          "Datastore/statement/MySQL/users/INSERT",
   313          "Datastore/instance/MySQL/db-server-1/unknown"
   314        ],
   315        "metrics_scoped":[
   316          "Datastore/statement/MySQL/users/INSERT"
   317        ],
   318        "transaction_segment_and_slow_query_trace":{
   319          "metric_name":"Datastore/statement/MySQL/users/INSERT",
   320          "host":"db-server-1",
   321          "port_path_or_id":"unknown",
   322          "database_name":"my_db"
   323        }
   324      }
   325    },
   326    {
   327      "test_name": "localhost replacement",
   328      "input":{
   329        "parameters":{
   330          "product":"MySQL",
   331          "collection":"users",
   332          "operation":"INSERT",
   333          "host":"localhost",
   334          "port_path_or_id":"3306",
   335          "database_name":"my_db"
   336        },
   337        "is_web":true,
   338        "system_hostname":"datanerd-01",
   339        "configuration":{
   340          "datastore_tracer.instance_reporting.enabled":true,
   341          "datastore_tracer.database_name_reporting.enabled":true
   342        }
   343      },
   344      "expectation":{
   345        "metrics_unscoped":[
   346          "Datastore/all",
   347          "Datastore/allWeb",
   348          "Datastore/MySQL/all",
   349          "Datastore/MySQL/allWeb",
   350          "Datastore/operation/MySQL/INSERT",
   351          "Datastore/statement/MySQL/users/INSERT",
   352          "Datastore/instance/MySQL/datanerd-01/3306"
   353        ],
   354        "metrics_scoped":[
   355          "Datastore/statement/MySQL/users/INSERT"
   356        ],
   357        "transaction_segment_and_slow_query_trace":{
   358          "metric_name":"Datastore/statement/MySQL/users/INSERT",
   359          "host":"datanerd-01",
   360          "port_path_or_id":"3306",
   361          "database_name":"my_db"
   362        }
   363      }
   364    },
   365    {
   366      "test_name": "background transaction",
   367      "input":{
   368        "parameters":{
   369          "product":"MySQL",
   370          "collection":"users",
   371          "operation":"INSERT",
   372          "host":"db-server-1",
   373          "port_path_or_id":"3306",
   374          "database_name":"my_db"
   375        },
   376        "is_web":false,
   377        "system_hostname":"datanerd-01",
   378        "configuration":{
   379          "datastore_tracer.instance_reporting.enabled":true,
   380          "datastore_tracer.database_name_reporting.enabled":true
   381        }
   382      },
   383      "expectation":{
   384        "metrics_unscoped":[
   385          "Datastore/all",
   386          "Datastore/allOther",
   387          "Datastore/MySQL/all",
   388          "Datastore/MySQL/allOther",
   389          "Datastore/operation/MySQL/INSERT",
   390          "Datastore/statement/MySQL/users/INSERT",
   391          "Datastore/instance/MySQL/db-server-1/3306"
   392        ],
   393        "metrics_scoped":[
   394          "Datastore/statement/MySQL/users/INSERT"
   395        ],
   396        "transaction_segment_and_slow_query_trace":{
   397          "metric_name":"Datastore/statement/MySQL/users/INSERT",
   398          "host":"db-server-1",
   399          "port_path_or_id":"3306",
   400          "database_name":"my_db"
   401        }
   402      }
   403    },
   404    {
   405      "test_name": "socket path port",
   406      "input":{
   407        "parameters":{
   408          "product":"MySQL",
   409          "collection":"users",
   410          "operation":"INSERT",
   411          "host":"db-server-1",
   412          "port_path_or_id":"/var/mysql/mysql.sock",
   413          "database_name":"my_db"
   414        },
   415        "is_web":true,
   416        "system_hostname":"datanerd-01",
   417        "configuration":{
   418          "datastore_tracer.instance_reporting.enabled":true,
   419          "datastore_tracer.database_name_reporting.enabled":true
   420        }
   421      },
   422      "expectation":{
   423        "metrics_unscoped":[
   424          "Datastore/all",
   425          "Datastore/allWeb",
   426          "Datastore/MySQL/all",
   427          "Datastore/MySQL/allWeb",
   428          "Datastore/operation/MySQL/INSERT",
   429          "Datastore/statement/MySQL/users/INSERT",
   430          "Datastore/instance/MySQL/db-server-1//var/mysql/mysql.sock"
   431        ],
   432        "metrics_scoped":[
   433          "Datastore/statement/MySQL/users/INSERT"
   434        ],
   435        "transaction_segment_and_slow_query_trace":{
   436          "metric_name":"Datastore/statement/MySQL/users/INSERT",
   437          "host":"db-server-1",
   438          "port_path_or_id":"/var/mysql/mysql.sock",
   439          "database_name":"my_db"
   440        }
   441      }
   442    }
   443  ]