github.com/lulzWill/go-agent@v2.1.2+incompatible/internal/crossagent/cross_agent_tests/attribute_configuration.json (about) 1 [{ 2 "testname": "everything enabled, no include/exclude", 3 "config": { 4 "browser_monitoring.attributes.enabled": true 5 }, 6 "input_key": "alpha", 7 "input_default_destinations": [ 8 "transaction_events", 9 "transaction_tracer", 10 "error_collector", 11 "browser_monitoring" 12 ], 13 "expected_destinations": [ 14 "transaction_events", 15 "transaction_tracer", 16 "error_collector", 17 "browser_monitoring" 18 ] 19 }, 20 21 { 22 "testname": "browser monitoring attributes disabled by default", 23 "config": {}, 24 "input_key": "alpha", 25 "input_default_destinations": [ 26 "transaction_events", 27 "transaction_tracer", 28 "error_collector", 29 "browser_monitoring" 30 ], 31 "expected_destinations": [ 32 "transaction_events", 33 "transaction_tracer", 34 "error_collector" 35 ] 36 }, 37 38 { 39 "testname": "attributes globally disabled", 40 "config": { 41 "attributes.enabled": false, 42 "transaction_events.attributes.enabled": true, 43 "transaction_tracer.attributes.enabled": true, 44 "error_collector.attributes.enabled": true, 45 "browser_monitoring.attributes.enabled": true 46 }, 47 "input_key": "alpha", 48 "input_default_destinations": [ 49 "transaction_events", 50 "transaction_tracer", 51 "error_collector", 52 "browser_monitoring" 53 ], 54 "expected_destinations": [ 55 ] 56 }, 57 58 { 59 "testname": "all categories disabled", 60 "config": { 61 "transaction_events.attributes.enabled": false, 62 "transaction_tracer.attributes.enabled": false, 63 "error_collector.attributes.enabled": false 64 }, 65 "input_key": "alpha", 66 "input_default_destinations": [ 67 "transaction_events", 68 "transaction_tracer", 69 "error_collector", 70 "browser_monitoring" 71 ], 72 "expected_destinations": [ 73 ] 74 }, 75 76 { 77 "testname": "global exclude", 78 "config": { 79 "attributes.exclude": ["alpha"], 80 "browser_monitoring.attributes.enabled": true 81 }, 82 "input_key": "alpha", 83 "input_default_destinations": [ 84 "transaction_events", 85 "transaction_tracer", 86 "error_collector", 87 "browser_monitoring" 88 ], 89 "expected_destinations": [ 90 ] 91 }, 92 93 { 94 "testname": "exclude in each category", 95 "config": { 96 "transaction_events.attributes.exclude": ["alpha"], 97 "transaction_tracer.attributes.exclude": ["alpha"], 98 "error_collector.attributes.exclude": ["alpha"], 99 "browser_monitoring.attributes.enabled": true, 100 "browser_monitoring.attributes.exclude": ["alpha"] 101 }, 102 "input_key": "alpha", 103 "input_default_destinations": [ 104 "transaction_events", 105 "transaction_tracer", 106 "error_collector", 107 "browser_monitoring" 108 ], 109 "expected_destinations": [ 110 ] 111 }, 112 113 { 114 "testname": "global include", 115 "config": { 116 "attributes.include": ["alpha"], 117 "browser_monitoring.attributes.enabled": true 118 }, 119 "input_key": "alpha", 120 "input_default_destinations": [ 121 "transaction_events", 122 "transaction_tracer", 123 "error_collector", 124 "browser_monitoring" 125 ], 126 "expected_destinations": [ 127 "transaction_events", 128 "transaction_tracer", 129 "error_collector", 130 "browser_monitoring" 131 ] 132 }, 133 134 { 135 "testname": "each category include", 136 "config": { 137 "transaction_events.attributes.include": ["alpha"], 138 "transaction_tracer.attributes.include": ["alpha"], 139 "error_collector.attributes.include": ["alpha"], 140 "browser_monitoring.attributes.enabled": true, 141 "browser_monitoring.attributes.include": ["alpha"] 142 }, 143 "input_key": "alpha", 144 "input_default_destinations": [ 145 "transaction_events", 146 "transaction_tracer", 147 "error_collector", 148 "browser_monitoring" 149 ], 150 "expected_destinations": [ 151 "transaction_events", 152 "transaction_tracer", 153 "error_collector", 154 "browser_monitoring" 155 ] 156 }, 157 158 { 159 "testname": "global include/exclude contradict", 160 "config": { 161 "attributes.exclude": ["alpha"], 162 "attributes.include": ["alpha"], 163 "browser_monitoring.attributes.enabled": true 164 }, 165 "input_key": "alpha", 166 "input_default_destinations": [ 167 "transaction_events", 168 "transaction_tracer", 169 "error_collector", 170 "browser_monitoring" 171 ], 172 "expected_destinations": [ 173 ] 174 }, 175 176 { 177 "testname": "include/exclude contradict in each category", 178 "config": { 179 "transaction_events.attributes.exclude": ["alpha"], 180 "transaction_events.attributes.include": ["alpha"], 181 "transaction_tracer.attributes.exclude": ["alpha"], 182 "transaction_tracer.attributes.include": ["alpha"], 183 "error_collector.attributes.exclude": ["alpha"], 184 "error_collector.attributes.include": ["alpha"], 185 "browser_monitoring.attributes.enabled": true, 186 "browser_monitoring.attributes.exclude": ["alpha"], 187 "browser_monitoring.attributes.include": ["alpha"] 188 }, 189 "input_key": "alpha", 190 "input_default_destinations": [ 191 "transaction_events", 192 "transaction_tracer", 193 "error_collector", 194 "browser_monitoring" 195 ], 196 "expected_destinations": [ 197 ] 198 }, 199 200 { 201 "testname": "global exclude contradicts category include", 202 "config": { 203 "attributes.exclude": ["alpha"], 204 "transaction_events.attributes.include": ["alpha"], 205 "transaction_tracer.attributes.include": ["alpha"], 206 "error_collector.attributes.include": ["alpha"], 207 "browser_monitoring.attributes.enabled": true, 208 "browser_monitoring.attributes.include": ["alpha"] 209 }, 210 "input_key": "alpha", 211 "input_default_destinations": [ 212 "transaction_events", 213 "transaction_tracer", 214 "error_collector", 215 "browser_monitoring" 216 ], 217 "expected_destinations": [ 218 ] 219 }, 220 221 { 222 "testname": "global include contradicts category exclude", 223 "config": { 224 "attributes.include": ["alpha"], 225 "transaction_events.attributes.exclude": ["alpha"], 226 "transaction_tracer.attributes.exclude": ["alpha"], 227 "error_collector.attributes.exclude": ["alpha"], 228 "browser_monitoring.attributes.enabled": true, 229 "browser_monitoring.attributes.exclude": ["alpha"] 230 }, 231 "input_key": "alpha", 232 "input_default_destinations": [ 233 "transaction_events", 234 "transaction_tracer", 235 "error_collector", 236 "browser_monitoring" 237 ], 238 "expected_destinations": [ 239 ] 240 }, 241 242 { 243 "testname": "alpha is more specific than alpha*", 244 "config": { 245 "attributes.include": ["alpha"], 246 "transaction_events.attributes.exclude": ["alpha*"], 247 "transaction_tracer.attributes.exclude": ["alpha*"], 248 "error_collector.attributes.exclude": ["alpha*"], 249 "browser_monitoring.attributes.enabled": true, 250 "browser_monitoring.attributes.exclude": ["alpha*"] 251 }, 252 "input_key": "alpha", 253 "input_default_destinations": [ 254 "transaction_events", 255 "transaction_tracer", 256 "error_collector", 257 "browser_monitoring" 258 ], 259 "expected_destinations": [ 260 "transaction_events", 261 "transaction_tracer", 262 "error_collector", 263 "browser_monitoring" 264 ] 265 }, 266 267 { 268 "testname": "all destination modifiers applied, not only the most specific one", 269 "config": { 270 "attributes.exclude": ["a*"], 271 "transaction_events.attributes.include": ["ab*"], 272 "transaction_events.attributes.exclude": ["abc*"], 273 "transaction_tracer.attributes.exclude": ["abcd*"], 274 "transaction_tracer.attributes.include": ["abcde*"], 275 "error_collector.attributes.include": ["abcdef*"], 276 "error_collector.attributes.exclude": ["abcdefg*"], 277 "browser_monitoring.attributes.exclude": ["abcdefgh*"], 278 "browser_monitoring.attributes.include": ["abcdefghi*"], 279 "browser_monitoring.attributes.enabled": true 280 }, 281 "input_key": "abcdefghik", 282 "input_default_destinations": [ 283 "transaction_events", 284 "transaction_tracer", 285 "error_collector", 286 "browser_monitoring" 287 ], 288 "expected_destinations": [ 289 "transaction_tracer", 290 "browser_monitoring" 291 ] 292 }, 293 294 295 { 296 "testname": "venn diagram part 1", 297 "config": { 298 "attributes.exclude": ["alpha.*", "alpha.beta.gamma.*"], 299 "attributes.include": ["alpha.beta.*"], 300 "browser_monitoring.attributes.enabled": true 301 }, 302 "input_key": "alpha.", 303 "input_default_destinations": [ 304 "transaction_events", 305 "transaction_tracer", 306 "error_collector", 307 "browser_monitoring" 308 ], 309 "expected_destinations": [ 310 ] 311 }, 312 313 { 314 "testname": "venn diagram part 2", 315 "config": { 316 "attributes.exclude": ["alpha.*", "alpha.beta.gamma.*"], 317 "attributes.include": ["alpha.beta.*"], 318 "browser_monitoring.attributes.enabled": true 319 }, 320 "input_key": "alpha.psi", 321 "input_default_destinations": [ 322 "transaction_events", 323 "transaction_tracer", 324 "error_collector", 325 "browser_monitoring" 326 ], 327 "expected_destinations": [ 328 ] 329 }, 330 331 { 332 "testname": "venn diagram part 3", 333 "config": { 334 "attributes.exclude": ["alpha.*", "alpha.beta.gamma.*"], 335 "attributes.include": ["alpha.beta.*"], 336 "browser_monitoring.attributes.enabled": true 337 }, 338 "input_key": "alpha.beta.", 339 "input_default_destinations": [ 340 "transaction_events", 341 "transaction_tracer", 342 "error_collector", 343 "browser_monitoring" 344 ], 345 "expected_destinations": [ 346 "transaction_events", 347 "transaction_tracer", 348 "error_collector", 349 "browser_monitoring" 350 ] 351 }, 352 353 { 354 "testname": "venn diagram part 4", 355 "config": { 356 "attributes.exclude": ["alpha.*", "alpha.beta.gamma.*"], 357 "attributes.include": ["alpha.beta.*"], 358 "browser_monitoring.attributes.enabled": true 359 }, 360 "input_key": "alpha.beta.psi", 361 "input_default_destinations": [ 362 "transaction_events", 363 "transaction_tracer", 364 "error_collector", 365 "browser_monitoring" 366 ], 367 "expected_destinations": [ 368 "transaction_events", 369 "transaction_tracer", 370 "error_collector", 371 "browser_monitoring" 372 ] 373 }, 374 375 { 376 "testname": "venn diagram part 5", 377 "config": { 378 "attributes.exclude": ["alpha.*", "alpha.beta.gamma.*"], 379 "attributes.include": ["alpha.beta.*"], 380 "browser_monitoring.attributes.enabled": true 381 }, 382 "input_key": "alpha.beta.gamma.", 383 "input_default_destinations": [ 384 "transaction_events", 385 "transaction_tracer", 386 "error_collector", 387 "browser_monitoring" 388 ], 389 "expected_destinations": [ 390 ] 391 }, 392 393 { 394 "testname": "alpha is not mistaken for alpha*", 395 "config": { 396 "transaction_events.attributes.include": ["alpha"], 397 "transaction_tracer.attributes.exclude": ["alpha*"], 398 "error_collector.attributes.include": ["alpha"], 399 "browser_monitoring.attributes.exclude": ["alpha*"], 400 "browser_monitoring.attributes.enabled": true 401 }, 402 "input_key": "alpha.beta", 403 "input_default_destinations": [ 404 "transaction_tracer", 405 "browser_monitoring" 406 ], 407 "expected_destinations": [ 408 ] 409 }, 410 411 { 412 "testname": "exact match is case sensitive", 413 "config": { 414 "attributes.exclude": ["alpha"], 415 "browser_monitoring.attributes.enabled": true 416 }, 417 "input_key": "ALPHA", 418 "input_default_destinations": [ 419 "transaction_events", 420 "transaction_tracer", 421 "error_collector", 422 "browser_monitoring" 423 ], 424 "expected_destinations": [ 425 "transaction_events", 426 "transaction_tracer", 427 "error_collector", 428 "browser_monitoring" 429 ] 430 }, 431 432 { 433 "testname": "wildcard match is case sensitive", 434 "config": { 435 "attributes.exclude": ["alpha.*"], 436 "browser_monitoring.attributes.enabled": true 437 }, 438 "input_key": "ALPHA.BETA", 439 "input_default_destinations": [ 440 "transaction_events", 441 "transaction_tracer", 442 "error_collector", 443 "browser_monitoring" 444 ], 445 "expected_destinations": [ 446 "transaction_events", 447 "transaction_tracer", 448 "error_collector", 449 "browser_monitoring" 450 ] 451 }, 452 453 { 454 "testname": "include with attributes globally disabled", 455 "config": { 456 "attributes.enabled": false, 457 "transaction_events.attributes.include": ["alpha"], 458 "transaction_tracer.attributes.include": ["alpha"], 459 "error_collector.attributes.include": ["alpha"], 460 "browser_monitoring.attributes.include": ["alpha"] 461 }, 462 "input_key": "alpha", 463 "input_default_destinations": [ 464 "transaction_events", 465 "transaction_tracer", 466 "error_collector", 467 "browser_monitoring" 468 ], 469 "expected_destinations": [ 470 ] 471 }, 472 473 { 474 "testname": "include with disabled destinations", 475 "config": { 476 "transaction_events.attributes.include": ["alpha"], 477 "transaction_events.attributes.enabled": false, 478 "transaction_tracer.attributes.include": ["alpha"], 479 "error_collector.attributes.include": ["alpha"], 480 "browser_monitoring.attributes.enabled": true, 481 "browser_monitoring.attributes.include": ["alpha"] 482 }, 483 "input_key": "alpha", 484 "input_default_destinations": [ 485 "transaction_events", 486 "transaction_tracer", 487 "error_collector", 488 "browser_monitoring" 489 ], 490 "expected_destinations": [ 491 "transaction_tracer", 492 "error_collector", 493 "browser_monitoring" 494 ] 495 }, 496 497 { 498 "testname": "ordering of rules should not matter 1", 499 "config": { 500 "transaction_events.attributes.include": ["b*", "bcd*"], 501 "transaction_events.attributes.exclude": ["bc*"] 502 }, 503 "input_key": "b", 504 "input_default_destinations": [ 505 "transaction_events", 506 "transaction_tracer" 507 ], 508 "expected_destinations": [ 509 "transaction_events", 510 "transaction_tracer" 511 ] 512 }, 513 514 { 515 "testname": "ordering of rules should not matter 2", 516 "config": { 517 "transaction_events.attributes.include": ["b*", "bcd*"], 518 "transaction_events.attributes.exclude": ["bc*"] 519 }, 520 "input_key": "bc", 521 "input_default_destinations": [ 522 "transaction_events", 523 "transaction_tracer" 524 ], 525 "expected_destinations": [ 526 "transaction_tracer" 527 ] 528 }, 529 530 { 531 "testname": "ordering of rules should not matter 3", 532 "config": { 533 "transaction_events.attributes.include": ["b*", "bcd*"], 534 "transaction_events.attributes.exclude": ["bc*"] 535 }, 536 "input_key": "bcd", 537 "input_default_destinations": [ 538 "transaction_events", 539 "transaction_tracer" 540 ], 541 "expected_destinations": [ 542 "transaction_events", 543 "transaction_tracer" 544 ] 545 }, 546 547 { 548 "testname": "ordering of rules should not matter 4", 549 "config": { 550 "transaction_events.attributes.include": ["b*", "bcd*"], 551 "transaction_events.attributes.exclude": ["bc*"] 552 }, 553 "input_key": "bcde", 554 "input_default_destinations": [ 555 "transaction_events", 556 "transaction_tracer" 557 ], 558 "expected_destinations": [ 559 "transaction_events", 560 "transaction_tracer" 561 ] 562 }, 563 564 { 565 "testname": "ordering of rules should not matter 5", 566 "config": { 567 "transaction_events.attributes.include": ["bcd*", "b*"], 568 "transaction_events.attributes.exclude": ["bc*"] 569 }, 570 "input_key": "b", 571 "input_default_destinations": [ 572 "transaction_events", 573 "transaction_tracer" 574 ], 575 "expected_destinations": [ 576 "transaction_events", 577 "transaction_tracer" 578 ] 579 }, 580 581 { 582 "testname": "ordering of rules should not matter 6", 583 "config": { 584 "transaction_events.attributes.include": ["bcd*", "b*"], 585 "transaction_events.attributes.exclude": ["bc*"] 586 }, 587 "input_key": "bc", 588 "input_default_destinations": [ 589 "transaction_events", 590 "transaction_tracer" 591 ], 592 "expected_destinations": [ 593 "transaction_tracer" 594 ] 595 }, 596 597 { 598 "testname": "ordering of rules should not matter 7", 599 "config": { 600 "transaction_events.attributes.include": ["bcd*", "b*"], 601 "transaction_events.attributes.exclude": ["bc*"] 602 }, 603 "input_key": "bcd", 604 "input_default_destinations": [ 605 "transaction_events", 606 "transaction_tracer" 607 ], 608 "expected_destinations": [ 609 "transaction_events", 610 "transaction_tracer" 611 ] 612 }, 613 614 { 615 "testname": "ordering of rules should not matter 8", 616 "config": { 617 "transaction_events.attributes.include": ["bcd*", "b*"], 618 "transaction_events.attributes.exclude": ["bc*"] 619 }, 620 "input_key": "bcde", 621 "input_default_destinations": [ 622 "transaction_events", 623 "transaction_tracer" 624 ], 625 "expected_destinations": [ 626 "transaction_events", 627 "transaction_tracer" 628 ] 629 } 630 ]