Repository navigation
Commit 117d396
authored
fix: use DD_SERVICE for inferred spans when integration service names are removed (#834)
* fix: prefer DD_SERVICE as the inferred span service name
When DD_SERVICE (config.service) is set, use it as the service for
inferred (synthetic) spans, taking precedence over DD_SERVICE_MAPPING
and the AWS service representation. When DD_SERVICE is unset, the
existing resolution logic is preserved.
* test: pin config.service=None for AWS service-representation tests
The inferred-span and service-mapping tests assert the AWS service
representation, which only applies when DD_SERVICE is unset. CI sets
DD_SERVICE, so pin config.service to None to keep them deterministic.
* test: add inferred-span coverage for DD_SERVICE precedence
Verify create_inferred_span uses DD_SERVICE as the service (over an
explicit service mapping) when DD_SERVICE is set.
* test(integration): regenerate snapshots for DD_SERVICE inferred spans
Inferred (synthetic) spans now use DD_SERVICE (integration-tests-python)
as their service instead of the AWS service representation, so the
redundant _dd.base_service tag is dropped on those spans. Regenerated
via UPDATE_SNAPSHOTS for all Python versions.
* fix: use DD_SERVICE for inferred spans only when integration names removed
Gate the DD_SERVICE inferred-span service resolution behind
DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED: when enabled (and
DD_SERVICE is set), inferred (synthetic) spans use the base service name
instead of the AWS resource/instance representation. Default behavior
(flag off) is unchanged, so integration snapshots match main. Reverts
the earlier unconditional DD_SERVICE-first and experimental peer.service
/ span.kind changes.
* style: apply black formatting to test_tracing.py1 parent c0b98d6 commit 117d396
3 files changed
Lines changed: 144 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
906 | 906 | | |
907 | 907 | | |
908 | 908 | | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
909 | 915 | | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
| 916 | + | |
914 | 917 | | |
915 | 918 | | |
916 | 919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1425 | 1425 | | |
1426 | 1426 | | |
1427 | 1427 | | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
1428 | 1435 | | |
1429 | 1436 | | |
1430 | 1437 | | |
| |||
1471 | 1478 | | |
1472 | 1479 | | |
1473 | 1480 | | |
| 1481 | + | |
1474 | 1482 | | |
1475 | 1483 | | |
1476 | 1484 | | |
| |||
1505 | 1513 | | |
1506 | 1514 | | |
1507 | 1515 | | |
1508 | | - | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
1518 | | - | |
1519 | | - | |
1520 | | - | |
1521 | | - | |
1522 | | - | |
1523 | | - | |
1524 | | - | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
1525 | 1530 | | |
1526 | | - | |
1527 | | - | |
1528 | | - | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
1535 | 1545 | | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | | - | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
1543 | 1553 | | |
1544 | 1554 | | |
1545 | 1555 | | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
1546 | 1621 | | |
1547 | 1622 | | |
1548 | 1623 | | |
| |||
1731 | 1806 | | |
1732 | 1807 | | |
1733 | 1808 | | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
1734 | 1830 | | |
1735 | 1831 | | |
1736 | 1832 | | |
| |||
2731 | 2827 | | |
2732 | 2828 | | |
2733 | 2829 | | |
| 2830 | + | |
2734 | 2831 | | |
2735 | 2832 | | |
2736 | 2833 | | |
| |||
0 commit comments