1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 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 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068
|
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
// Code generated from semantic convention specification. DO NOT EDIT.
package semconv // import "go.opentelemetry.io/otel/semconv/v1.23.0"
import "go.opentelemetry.io/otel/attribute"
// The shared attributes used to report a single exception associated with a
// span or log.
const (
// ExceptionMessageKey is the attribute Key conforming to the
// "exception.message" semantic conventions. It represents the exception
// message.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'Division by zero', "Can't convert 'int' object to str
// implicitly"
ExceptionMessageKey = attribute.Key("exception.message")
// ExceptionStacktraceKey is the attribute Key conforming to the
// "exception.stacktrace" semantic conventions. It represents a stacktrace
// as a string in the natural representation for the language runtime. The
// representation is to be determined and documented by each language SIG.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
// exception\\n at '
// 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
// 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
// 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
// ExceptionTypeKey is the attribute Key conforming to the "exception.type"
// semantic conventions. It represents the type of the exception (its
// fully-qualified class name, if applicable). The dynamic type of the
// exception should be preferred over the static type in languages that
// support it.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'java.net.ConnectException', 'OSError'
ExceptionTypeKey = attribute.Key("exception.type")
)
// ExceptionMessage returns an attribute KeyValue conforming to the
// "exception.message" semantic conventions. It represents the exception
// message.
func ExceptionMessage(val string) attribute.KeyValue {
return ExceptionMessageKey.String(val)
}
// ExceptionStacktrace returns an attribute KeyValue conforming to the
// "exception.stacktrace" semantic conventions. It represents a stacktrace as a
// string in the natural representation for the language runtime. The
// representation is to be determined and documented by each language SIG.
func ExceptionStacktrace(val string) attribute.KeyValue {
return ExceptionStacktraceKey.String(val)
}
// ExceptionType returns an attribute KeyValue conforming to the
// "exception.type" semantic conventions. It represents the type of the
// exception (its fully-qualified class name, if applicable). The dynamic type
// of the exception should be preferred over the static type in languages that
// support it.
func ExceptionType(val string) attribute.KeyValue {
return ExceptionTypeKey.String(val)
}
// Operations that access some remote service.
const (
// PeerServiceKey is the attribute Key conforming to the "peer.service"
// semantic conventions. It represents the
// [`service.name`](/docs/resource/README.md#service) of the remote
// service. SHOULD be equal to the actual `service.name` resource attribute
// of the remote service if any.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'AuthTokenCache'
PeerServiceKey = attribute.Key("peer.service")
)
// PeerService returns an attribute KeyValue conforming to the
// "peer.service" semantic conventions. It represents the
// [`service.name`](/docs/resource/README.md#service) of the remote service.
// SHOULD be equal to the actual `service.name` resource attribute of the
// remote service if any.
func PeerService(val string) attribute.KeyValue {
return PeerServiceKey.String(val)
}
// These attributes may be used for any operation with an authenticated and/or
// authorized enduser.
const (
// EnduserIDKey is the attribute Key conforming to the "enduser.id"
// semantic conventions. It represents the username or client_id extracted
// from the access token or
// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
// in the inbound request from outside the system.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'username'
EnduserIDKey = attribute.Key("enduser.id")
// EnduserRoleKey is the attribute Key conforming to the "enduser.role"
// semantic conventions. It represents the actual/assumed role the client
// is making the request under extracted from token or application security
// context.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'admin'
EnduserRoleKey = attribute.Key("enduser.role")
// EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
// semantic conventions. It represents the scopes or granted authorities
// the client currently possesses extracted from token or application
// security context. The value would come from the scope associated with an
// [OAuth 2.0 Access
// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
// value in a [SAML 2.0
// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'read:message, write:files'
EnduserScopeKey = attribute.Key("enduser.scope")
)
// EnduserID returns an attribute KeyValue conforming to the "enduser.id"
// semantic conventions. It represents the username or client_id extracted from
// the access token or
// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
// the inbound request from outside the system.
func EnduserID(val string) attribute.KeyValue {
return EnduserIDKey.String(val)
}
// EnduserRole returns an attribute KeyValue conforming to the
// "enduser.role" semantic conventions. It represents the actual/assumed role
// the client is making the request under extracted from token or application
// security context.
func EnduserRole(val string) attribute.KeyValue {
return EnduserRoleKey.String(val)
}
// EnduserScope returns an attribute KeyValue conforming to the
// "enduser.scope" semantic conventions. It represents the scopes or granted
// authorities the client currently possesses extracted from token or
// application security context. The value would come from the scope associated
// with an [OAuth 2.0 Access
// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
// value in a [SAML 2.0
// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
func EnduserScope(val string) attribute.KeyValue {
return EnduserScopeKey.String(val)
}
// These attributes allow to report this unit of code and therefore to provide
// more context about the span.
const (
// CodeColumnKey is the attribute Key conforming to the "code.column"
// semantic conventions. It represents the column number in `code.filepath`
// best representing the operation. It SHOULD point within the code unit
// named in `code.function`.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 16
CodeColumnKey = attribute.Key("code.column")
// CodeFilepathKey is the attribute Key conforming to the "code.filepath"
// semantic conventions. It represents the source code file name that
// identifies the code unit as uniquely as possible (preferably an absolute
// file path).
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '/usr/local/MyApplication/content_root/app/index.php'
CodeFilepathKey = attribute.Key("code.filepath")
// CodeFunctionKey is the attribute Key conforming to the "code.function"
// semantic conventions. It represents the method or function name, or
// equivalent (usually rightmost part of the code unit's name).
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'serveRequest'
CodeFunctionKey = attribute.Key("code.function")
// CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
// semantic conventions. It represents the line number in `code.filepath`
// best representing the operation. It SHOULD point within the code unit
// named in `code.function`.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 42
CodeLineNumberKey = attribute.Key("code.lineno")
// CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
// semantic conventions. It represents the "namespace" within which
// `code.function` is defined. Usually the qualified class or module name,
// such that `code.namespace` + some separator + `code.function` form a
// unique identifier for the code unit.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'com.example.MyHTTPService'
CodeNamespaceKey = attribute.Key("code.namespace")
)
// CodeColumn returns an attribute KeyValue conforming to the "code.column"
// semantic conventions. It represents the column number in `code.filepath`
// best representing the operation. It SHOULD point within the code unit named
// in `code.function`.
func CodeColumn(val int) attribute.KeyValue {
return CodeColumnKey.Int(val)
}
// CodeFilepath returns an attribute KeyValue conforming to the
// "code.filepath" semantic conventions. It represents the source code file
// name that identifies the code unit as uniquely as possible (preferably an
// absolute file path).
func CodeFilepath(val string) attribute.KeyValue {
return CodeFilepathKey.String(val)
}
// CodeFunction returns an attribute KeyValue conforming to the
// "code.function" semantic conventions. It represents the method or function
// name, or equivalent (usually rightmost part of the code unit's name).
func CodeFunction(val string) attribute.KeyValue {
return CodeFunctionKey.String(val)
}
// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
// semantic conventions. It represents the line number in `code.filepath` best
// representing the operation. It SHOULD point within the code unit named in
// `code.function`.
func CodeLineNumber(val int) attribute.KeyValue {
return CodeLineNumberKey.Int(val)
}
// CodeNamespace returns an attribute KeyValue conforming to the
// "code.namespace" semantic conventions. It represents the "namespace" within
// which `code.function` is defined. Usually the qualified class or module
// name, such that `code.namespace` + some separator + `code.function` form a
// unique identifier for the code unit.
func CodeNamespace(val string) attribute.KeyValue {
return CodeNamespaceKey.String(val)
}
// These attributes may be used for any operation to store information about a
// thread that started a span.
const (
// ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
// conventions. It represents the current "managed" thread ID (as opposed
// to OS thread ID).
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 42
ThreadIDKey = attribute.Key("thread.id")
// ThreadNameKey is the attribute Key conforming to the "thread.name"
// semantic conventions. It represents the current thread name.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'main'
ThreadNameKey = attribute.Key("thread.name")
)
// ThreadID returns an attribute KeyValue conforming to the "thread.id"
// semantic conventions. It represents the current "managed" thread ID (as
// opposed to OS thread ID).
func ThreadID(val int) attribute.KeyValue {
return ThreadIDKey.Int(val)
}
// ThreadName returns an attribute KeyValue conforming to the "thread.name"
// semantic conventions. It represents the current thread name.
func ThreadName(val string) attribute.KeyValue {
return ThreadNameKey.String(val)
}
// Span attributes used by AWS Lambda (in addition to general `faas`
// attributes).
const (
// AWSLambdaInvokedARNKey is the attribute Key conforming to the
// "aws.lambda.invoked_arn" semantic conventions. It represents the full
// invoked ARN as provided on the `Context` passed to the function
// (`Lambda-Runtime-Invoked-Function-ARN` header on the
// `/runtime/invocation/next` applicable).
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
// Note: This may be different from `cloud.resource_id` if an alias is
// involved.
AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
)
// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
// "aws.lambda.invoked_arn" semantic conventions. It represents the full
// invoked ARN as provided on the `Context` passed to the function
// (`Lambda-Runtime-Invoked-Function-ARN` header on the
// `/runtime/invocation/next` applicable).
func AWSLambdaInvokedARN(val string) attribute.KeyValue {
return AWSLambdaInvokedARNKey.String(val)
}
// Attributes for CloudEvents. CloudEvents is a specification on how to define
// event data in a standard way. These attributes can be attached to spans when
// performing operations with CloudEvents, regardless of the protocol being
// used.
const (
// CloudeventsEventIDKey is the attribute Key conforming to the
// "cloudevents.event_id" semantic conventions. It represents the
// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
// uniquely identifies the event.
//
// Type: string
// RequirementLevel: Required
// Stability: experimental
// Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
// CloudeventsEventSourceKey is the attribute Key conforming to the
// "cloudevents.event_source" semantic conventions. It represents the
// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
// identifies the context in which an event happened.
//
// Type: string
// RequirementLevel: Required
// Stability: experimental
// Examples: 'https://github.com/cloudevents',
// '/cloudevents/spec/pull/123', 'my-service'
CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
// CloudeventsEventSpecVersionKey is the attribute Key conforming to the
// "cloudevents.event_spec_version" semantic conventions. It represents the
// [version of the CloudEvents
// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
// which the event uses.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '1.0'
CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
// CloudeventsEventSubjectKey is the attribute Key conforming to the
// "cloudevents.event_subject" semantic conventions. It represents the
// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
// of the event in the context of the event producer (identified by
// source).
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'mynewfile.jpg'
CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
// CloudeventsEventTypeKey is the attribute Key conforming to the
// "cloudevents.event_type" semantic conventions. It represents the
// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
// contains a value describing the type of event related to the originating
// occurrence.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'com.github.pull_request.opened',
// 'com.example.object.deleted.v2'
CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
)
// CloudeventsEventID returns an attribute KeyValue conforming to the
// "cloudevents.event_id" semantic conventions. It represents the
// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
// uniquely identifies the event.
func CloudeventsEventID(val string) attribute.KeyValue {
return CloudeventsEventIDKey.String(val)
}
// CloudeventsEventSource returns an attribute KeyValue conforming to the
// "cloudevents.event_source" semantic conventions. It represents the
// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
// identifies the context in which an event happened.
func CloudeventsEventSource(val string) attribute.KeyValue {
return CloudeventsEventSourceKey.String(val)
}
// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
// the "cloudevents.event_spec_version" semantic conventions. It represents the
// [version of the CloudEvents
// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
// which the event uses.
func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
return CloudeventsEventSpecVersionKey.String(val)
}
// CloudeventsEventSubject returns an attribute KeyValue conforming to the
// "cloudevents.event_subject" semantic conventions. It represents the
// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
// of the event in the context of the event producer (identified by source).
func CloudeventsEventSubject(val string) attribute.KeyValue {
return CloudeventsEventSubjectKey.String(val)
}
// CloudeventsEventType returns an attribute KeyValue conforming to the
// "cloudevents.event_type" semantic conventions. It represents the
// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
// contains a value describing the type of event related to the originating
// occurrence.
func CloudeventsEventType(val string) attribute.KeyValue {
return CloudeventsEventTypeKey.String(val)
}
// Semantic conventions for the OpenTracing Shim
const (
// OpentracingRefTypeKey is the attribute Key conforming to the
// "opentracing.ref_type" semantic conventions. It represents the
// parent-child Reference type
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Note: The causal relationship between a child Span and a parent Span.
OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
)
var (
// The parent Span depends on the child Span in some capacity
OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
// The parent Span doesn't depend in any way on the result of the child Span
OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
)
// The attributes used to perform database client calls.
const (
// DBConnectionStringKey is the attribute Key conforming to the
// "db.connection_string" semantic conventions. It represents the
// connection string used to connect to the database. It is recommended to
// remove embedded credentials.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;'
DBConnectionStringKey = attribute.Key("db.connection_string")
// DBJDBCDriverClassnameKey is the attribute Key conforming to the
// "db.jdbc.driver_classname" semantic conventions. It represents the
// fully-qualified class name of the [Java Database Connectivity
// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/)
// driver used to connect.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'org.postgresql.Driver',
// 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname")
// DBNameKey is the attribute Key conforming to the "db.name" semantic
// conventions. It represents the this attribute is used to report the name
// of the database being accessed. For commands that switch the database,
// this should be set to the target database (even if the command fails).
//
// Type: string
// RequirementLevel: ConditionallyRequired (If applicable.)
// Stability: experimental
// Examples: 'customers', 'main'
// Note: In some SQL databases, the database name to be used is called
// "schema name". In case there are multiple layers that could be
// considered for database name (e.g. Oracle instance name and schema
// name), the database name to be used is the more specific layer (e.g.
// Oracle schema name).
DBNameKey = attribute.Key("db.name")
// DBOperationKey is the attribute Key conforming to the "db.operation"
// semantic conventions. It represents the name of the operation being
// executed, e.g. the [MongoDB command
// name](https://docs.mongodb.com/manual/reference/command/#database-operations)
// such as `findAndModify`, or the SQL keyword.
//
// Type: string
// RequirementLevel: ConditionallyRequired (If `db.statement` is not
// applicable.)
// Stability: experimental
// Examples: 'findAndModify', 'HMSET', 'SELECT'
// Note: When setting this to an SQL keyword, it is not recommended to
// attempt any client-side parsing of `db.statement` just to get this
// property, but it should be set if the operation name is provided by the
// library being instrumented. If the SQL statement has an ambiguous
// operation, or performs more than one operation, this value may be
// omitted.
DBOperationKey = attribute.Key("db.operation")
// DBStatementKey is the attribute Key conforming to the "db.statement"
// semantic conventions. It represents the database statement being
// executed.
//
// Type: string
// RequirementLevel: Recommended (Should be collected by default only if
// there is sanitization that excludes sensitive information.)
// Stability: experimental
// Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"'
DBStatementKey = attribute.Key("db.statement")
// DBSystemKey is the attribute Key conforming to the "db.system" semantic
// conventions. It represents an identifier for the database management
// system (DBMS) product being used. See below for a list of well-known
// identifiers.
//
// Type: Enum
// RequirementLevel: Required
// Stability: experimental
DBSystemKey = attribute.Key("db.system")
// DBUserKey is the attribute Key conforming to the "db.user" semantic
// conventions. It represents the username for accessing the database.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'readonly_user', 'reporting_user'
DBUserKey = attribute.Key("db.user")
)
var (
// Some other SQL database. Fallback only. See notes
DBSystemOtherSQL = DBSystemKey.String("other_sql")
// Microsoft SQL Server
DBSystemMSSQL = DBSystemKey.String("mssql")
// Microsoft SQL Server Compact
DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
// MySQL
DBSystemMySQL = DBSystemKey.String("mysql")
// Oracle Database
DBSystemOracle = DBSystemKey.String("oracle")
// IBM DB2
DBSystemDB2 = DBSystemKey.String("db2")
// PostgreSQL
DBSystemPostgreSQL = DBSystemKey.String("postgresql")
// Amazon Redshift
DBSystemRedshift = DBSystemKey.String("redshift")
// Apache Hive
DBSystemHive = DBSystemKey.String("hive")
// Cloudscape
DBSystemCloudscape = DBSystemKey.String("cloudscape")
// HyperSQL DataBase
DBSystemHSQLDB = DBSystemKey.String("hsqldb")
// Progress Database
DBSystemProgress = DBSystemKey.String("progress")
// SAP MaxDB
DBSystemMaxDB = DBSystemKey.String("maxdb")
// SAP HANA
DBSystemHanaDB = DBSystemKey.String("hanadb")
// Ingres
DBSystemIngres = DBSystemKey.String("ingres")
// FirstSQL
DBSystemFirstSQL = DBSystemKey.String("firstsql")
// EnterpriseDB
DBSystemEDB = DBSystemKey.String("edb")
// InterSystems Caché
DBSystemCache = DBSystemKey.String("cache")
// Adabas (Adaptable Database System)
DBSystemAdabas = DBSystemKey.String("adabas")
// Firebird
DBSystemFirebird = DBSystemKey.String("firebird")
// Apache Derby
DBSystemDerby = DBSystemKey.String("derby")
// FileMaker
DBSystemFilemaker = DBSystemKey.String("filemaker")
// Informix
DBSystemInformix = DBSystemKey.String("informix")
// InstantDB
DBSystemInstantDB = DBSystemKey.String("instantdb")
// InterBase
DBSystemInterbase = DBSystemKey.String("interbase")
// MariaDB
DBSystemMariaDB = DBSystemKey.String("mariadb")
// Netezza
DBSystemNetezza = DBSystemKey.String("netezza")
// Pervasive PSQL
DBSystemPervasive = DBSystemKey.String("pervasive")
// PointBase
DBSystemPointbase = DBSystemKey.String("pointbase")
// SQLite
DBSystemSqlite = DBSystemKey.String("sqlite")
// Sybase
DBSystemSybase = DBSystemKey.String("sybase")
// Teradata
DBSystemTeradata = DBSystemKey.String("teradata")
// Vertica
DBSystemVertica = DBSystemKey.String("vertica")
// H2
DBSystemH2 = DBSystemKey.String("h2")
// ColdFusion IMQ
DBSystemColdfusion = DBSystemKey.String("coldfusion")
// Apache Cassandra
DBSystemCassandra = DBSystemKey.String("cassandra")
// Apache HBase
DBSystemHBase = DBSystemKey.String("hbase")
// MongoDB
DBSystemMongoDB = DBSystemKey.String("mongodb")
// Redis
DBSystemRedis = DBSystemKey.String("redis")
// Couchbase
DBSystemCouchbase = DBSystemKey.String("couchbase")
// CouchDB
DBSystemCouchDB = DBSystemKey.String("couchdb")
// Microsoft Azure Cosmos DB
DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
// Amazon DynamoDB
DBSystemDynamoDB = DBSystemKey.String("dynamodb")
// Neo4j
DBSystemNeo4j = DBSystemKey.String("neo4j")
// Apache Geode
DBSystemGeode = DBSystemKey.String("geode")
// Elasticsearch
DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
// Memcached
DBSystemMemcached = DBSystemKey.String("memcached")
// CockroachDB
DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
// OpenSearch
DBSystemOpensearch = DBSystemKey.String("opensearch")
// ClickHouse
DBSystemClickhouse = DBSystemKey.String("clickhouse")
// Cloud Spanner
DBSystemSpanner = DBSystemKey.String("spanner")
// Trino
DBSystemTrino = DBSystemKey.String("trino")
)
// DBConnectionString returns an attribute KeyValue conforming to the
// "db.connection_string" semantic conventions. It represents the connection
// string used to connect to the database. It is recommended to remove embedded
// credentials.
func DBConnectionString(val string) attribute.KeyValue {
return DBConnectionStringKey.String(val)
}
// DBJDBCDriverClassname returns an attribute KeyValue conforming to the
// "db.jdbc.driver_classname" semantic conventions. It represents the
// fully-qualified class name of the [Java Database Connectivity
// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver
// used to connect.
func DBJDBCDriverClassname(val string) attribute.KeyValue {
return DBJDBCDriverClassnameKey.String(val)
}
// DBName returns an attribute KeyValue conforming to the "db.name" semantic
// conventions. It represents the this attribute is used to report the name of
// the database being accessed. For commands that switch the database, this
// should be set to the target database (even if the command fails).
func DBName(val string) attribute.KeyValue {
return DBNameKey.String(val)
}
// DBOperation returns an attribute KeyValue conforming to the
// "db.operation" semantic conventions. It represents the name of the operation
// being executed, e.g. the [MongoDB command
// name](https://docs.mongodb.com/manual/reference/command/#database-operations)
// such as `findAndModify`, or the SQL keyword.
func DBOperation(val string) attribute.KeyValue {
return DBOperationKey.String(val)
}
// DBStatement returns an attribute KeyValue conforming to the
// "db.statement" semantic conventions. It represents the database statement
// being executed.
func DBStatement(val string) attribute.KeyValue {
return DBStatementKey.String(val)
}
// DBUser returns an attribute KeyValue conforming to the "db.user" semantic
// conventions. It represents the username for accessing the database.
func DBUser(val string) attribute.KeyValue {
return DBUserKey.String(val)
}
// Connection-level attributes for Microsoft SQL Server
const (
// DBMSSQLInstanceNameKey is the attribute Key conforming to the
// "db.mssql.instance_name" semantic conventions. It represents the
// Microsoft SQL Server [instance
// name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
// connecting to. This name is used to determine the port of a named
// instance.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'MSSQLSERVER'
// Note: If setting a `db.mssql.instance_name`, `server.port` is no longer
// required (but still recommended if non-standard).
DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name")
)
// DBMSSQLInstanceName returns an attribute KeyValue conforming to the
// "db.mssql.instance_name" semantic conventions. It represents the Microsoft
// SQL Server [instance
// name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
// connecting to. This name is used to determine the port of a named instance.
func DBMSSQLInstanceName(val string) attribute.KeyValue {
return DBMSSQLInstanceNameKey.String(val)
}
// Call-level attributes for Cassandra
const (
// DBCassandraConsistencyLevelKey is the attribute Key conforming to the
// "db.cassandra.consistency_level" semantic conventions. It represents the
// consistency level of the query. Based on consistency values from
// [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
// DBCassandraCoordinatorDCKey is the attribute Key conforming to the
// "db.cassandra.coordinator.dc" semantic conventions. It represents the
// data center of the coordinating node for a query.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'us-west-2'
DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
// DBCassandraCoordinatorIDKey is the attribute Key conforming to the
// "db.cassandra.coordinator.id" semantic conventions. It represents the ID
// of the coordinating node for a query.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
// DBCassandraIdempotenceKey is the attribute Key conforming to the
// "db.cassandra.idempotence" semantic conventions. It represents the
// whether or not the query is idempotent.
//
// Type: boolean
// RequirementLevel: Optional
// Stability: experimental
DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
// DBCassandraPageSizeKey is the attribute Key conforming to the
// "db.cassandra.page_size" semantic conventions. It represents the fetch
// size used for paging, i.e. how many rows will be returned at once.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 5000
DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
// DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
// to the "db.cassandra.speculative_execution_count" semantic conventions.
// It represents the number of times a query was speculatively executed.
// Not set or `0` if the query was not executed speculatively.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 0, 2
DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
// DBCassandraTableKey is the attribute Key conforming to the
// "db.cassandra.table" semantic conventions. It represents the name of the
// primary table that the operation is acting upon, including the keyspace
// name (if applicable).
//
// Type: string
// RequirementLevel: Recommended
// Stability: experimental
// Examples: 'mytable'
// Note: This mirrors the db.sql.table attribute but references cassandra
// rather than sql. It is not recommended to attempt any client-side
// parsing of `db.statement` just to get this property, but it should be
// set if it is provided by the library being instrumented. If the
// operation is acting upon an anonymous table, or more than one table,
// this value MUST NOT be set.
DBCassandraTableKey = attribute.Key("db.cassandra.table")
)
var (
// all
DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
// each_quorum
DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
// quorum
DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
// local_quorum
DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
// one
DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
// two
DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
// three
DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
// local_one
DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
// any
DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
// serial
DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
// local_serial
DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
)
// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
// "db.cassandra.coordinator.dc" semantic conventions. It represents the data
// center of the coordinating node for a query.
func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
return DBCassandraCoordinatorDCKey.String(val)
}
// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
// the coordinating node for a query.
func DBCassandraCoordinatorID(val string) attribute.KeyValue {
return DBCassandraCoordinatorIDKey.String(val)
}
// DBCassandraIdempotence returns an attribute KeyValue conforming to the
// "db.cassandra.idempotence" semantic conventions. It represents the whether
// or not the query is idempotent.
func DBCassandraIdempotence(val bool) attribute.KeyValue {
return DBCassandraIdempotenceKey.Bool(val)
}
// DBCassandraPageSize returns an attribute KeyValue conforming to the
// "db.cassandra.page_size" semantic conventions. It represents the fetch size
// used for paging, i.e. how many rows will be returned at once.
func DBCassandraPageSize(val int) attribute.KeyValue {
return DBCassandraPageSizeKey.Int(val)
}
// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
// conforming to the "db.cassandra.speculative_execution_count" semantic
// conventions. It represents the number of times a query was speculatively
// executed. Not set or `0` if the query was not executed speculatively.
func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
return DBCassandraSpeculativeExecutionCountKey.Int(val)
}
// DBCassandraTable returns an attribute KeyValue conforming to the
// "db.cassandra.table" semantic conventions. It represents the name of the
// primary table that the operation is acting upon, including the keyspace name
// (if applicable).
func DBCassandraTable(val string) attribute.KeyValue {
return DBCassandraTableKey.String(val)
}
// Call-level attributes for Redis
const (
// DBRedisDBIndexKey is the attribute Key conforming to the
// "db.redis.database_index" semantic conventions. It represents the index
// of the database being accessed as used in the [`SELECT`
// command](https://redis.io/commands/select), provided as an integer. To
// be used instead of the generic `db.name` attribute.
//
// Type: int
// RequirementLevel: ConditionallyRequired (If other than the default
// database (`0`).)
// Stability: experimental
// Examples: 0, 1, 15
DBRedisDBIndexKey = attribute.Key("db.redis.database_index")
)
// DBRedisDBIndex returns an attribute KeyValue conforming to the
// "db.redis.database_index" semantic conventions. It represents the index of
// the database being accessed as used in the [`SELECT`
// command](https://redis.io/commands/select), provided as an integer. To be
// used instead of the generic `db.name` attribute.
func DBRedisDBIndex(val int) attribute.KeyValue {
return DBRedisDBIndexKey.Int(val)
}
// Call-level attributes for MongoDB
const (
// DBMongoDBCollectionKey is the attribute Key conforming to the
// "db.mongodb.collection" semantic conventions. It represents the
// collection being accessed within the database stated in `db.name`.
//
// Type: string
// RequirementLevel: Required
// Stability: experimental
// Examples: 'customers', 'products'
DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection")
)
// DBMongoDBCollection returns an attribute KeyValue conforming to the
// "db.mongodb.collection" semantic conventions. It represents the collection
// being accessed within the database stated in `db.name`.
func DBMongoDBCollection(val string) attribute.KeyValue {
return DBMongoDBCollectionKey.String(val)
}
// Call-level attributes for Elasticsearch
const (
// DBElasticsearchClusterNameKey is the attribute Key conforming to the
// "db.elasticsearch.cluster.name" semantic conventions. It represents the
// represents the identifier of an Elasticsearch cluster.
//
// Type: string
// RequirementLevel: Recommended (When communicating with an Elastic Cloud
// deployment, this should be collected from the "X-Found-Handling-Cluster"
// HTTP response header.)
// Stability: experimental
// Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f'
DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name")
// DBElasticsearchNodeNameKey is the attribute Key conforming to the
// "db.elasticsearch.node.name" semantic conventions. It represents the
// represents the human-readable identifier of the node/instance to which a
// request was routed.
//
// Type: string
// RequirementLevel: Recommended (When communicating with an Elastic Cloud
// deployment, this should be collected from the
// "X-Found-Handling-Instance" HTTP response header.)
// Stability: experimental
// Examples: 'instance-0000000001'
DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name")
)
// DBElasticsearchClusterName returns an attribute KeyValue conforming to
// the "db.elasticsearch.cluster.name" semantic conventions. It represents the
// represents the identifier of an Elasticsearch cluster.
func DBElasticsearchClusterName(val string) attribute.KeyValue {
return DBElasticsearchClusterNameKey.String(val)
}
// DBElasticsearchNodeName returns an attribute KeyValue conforming to the
// "db.elasticsearch.node.name" semantic conventions. It represents the
// represents the human-readable identifier of the node/instance to which a
// request was routed.
func DBElasticsearchNodeName(val string) attribute.KeyValue {
return DBElasticsearchNodeNameKey.String(val)
}
// Call-level attributes for SQL databases
const (
// DBSQLTableKey is the attribute Key conforming to the "db.sql.table"
// semantic conventions. It represents the name of the primary table that
// the operation is acting upon, including the database name (if
// applicable).
//
// Type: string
// RequirementLevel: Recommended
// Stability: experimental
// Examples: 'public.users', 'customers'
// Note: It is not recommended to attempt any client-side parsing of
// `db.statement` just to get this property, but it should be set if it is
// provided by the library being instrumented. If the operation is acting
// upon an anonymous table, or more than one table, this value MUST NOT be
// set.
DBSQLTableKey = attribute.Key("db.sql.table")
)
// DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table"
// semantic conventions. It represents the name of the primary table that the
// operation is acting upon, including the database name (if applicable).
func DBSQLTable(val string) attribute.KeyValue {
return DBSQLTableKey.String(val)
}
// Call-level attributes for Cosmos DB.
const (
// DBCosmosDBClientIDKey is the attribute Key conforming to the
// "db.cosmosdb.client_id" semantic conventions. It represents the unique
// Cosmos client instance id.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id")
// DBCosmosDBConnectionModeKey is the attribute Key conforming to the
// "db.cosmosdb.connection_mode" semantic conventions. It represents the
// cosmos client connection mode.
//
// Type: Enum
// RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as
// default))
// Stability: experimental
DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode")
// DBCosmosDBContainerKey is the attribute Key conforming to the
// "db.cosmosdb.container" semantic conventions. It represents the cosmos
// DB container name.
//
// Type: string
// RequirementLevel: ConditionallyRequired (if available)
// Stability: experimental
// Examples: 'anystring'
DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container")
// DBCosmosDBOperationTypeKey is the attribute Key conforming to the
// "db.cosmosdb.operation_type" semantic conventions. It represents the
// cosmosDB Operation Type.
//
// Type: Enum
// RequirementLevel: ConditionallyRequired (when performing one of the
// operations in this list)
// Stability: experimental
DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type")
// DBCosmosDBRequestChargeKey is the attribute Key conforming to the
// "db.cosmosdb.request_charge" semantic conventions. It represents the rU
// consumed for that operation
//
// Type: double
// RequirementLevel: ConditionallyRequired (when available)
// Stability: experimental
// Examples: 46.18, 1.0
DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge")
// DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the
// "db.cosmosdb.request_content_length" semantic conventions. It represents
// the request payload size in bytes
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length")
// DBCosmosDBStatusCodeKey is the attribute Key conforming to the
// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos
// DB status code.
//
// Type: int
// RequirementLevel: ConditionallyRequired (if response was received)
// Stability: experimental
// Examples: 200, 201
DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code")
// DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the
// "db.cosmosdb.sub_status_code" semantic conventions. It represents the
// cosmos DB sub status code.
//
// Type: int
// RequirementLevel: ConditionallyRequired (when response was received and
// contained sub-code.)
// Stability: experimental
// Examples: 1000, 1002
DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code")
)
var (
// Gateway (HTTP) connections mode
DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway")
// Direct connection
DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct")
)
var (
// invalid
DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid")
// create
DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create")
// patch
DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch")
// read
DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read")
// read_feed
DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed")
// delete
DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete")
// replace
DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace")
// execute
DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute")
// query
DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query")
// head
DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head")
// head_feed
DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed")
// upsert
DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert")
// batch
DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch")
// query_plan
DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan")
// execute_javascript
DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript")
)
// DBCosmosDBClientID returns an attribute KeyValue conforming to the
// "db.cosmosdb.client_id" semantic conventions. It represents the unique
// Cosmos client instance id.
func DBCosmosDBClientID(val string) attribute.KeyValue {
return DBCosmosDBClientIDKey.String(val)
}
// DBCosmosDBContainer returns an attribute KeyValue conforming to the
// "db.cosmosdb.container" semantic conventions. It represents the cosmos DB
// container name.
func DBCosmosDBContainer(val string) attribute.KeyValue {
return DBCosmosDBContainerKey.String(val)
}
// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the
// "db.cosmosdb.request_charge" semantic conventions. It represents the rU
// consumed for that operation
func DBCosmosDBRequestCharge(val float64) attribute.KeyValue {
return DBCosmosDBRequestChargeKey.Float64(val)
}
// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming
// to the "db.cosmosdb.request_content_length" semantic conventions. It
// represents the request payload size in bytes
func DBCosmosDBRequestContentLength(val int) attribute.KeyValue {
return DBCosmosDBRequestContentLengthKey.Int(val)
}
// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the
// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB
// status code.
func DBCosmosDBStatusCode(val int) attribute.KeyValue {
return DBCosmosDBStatusCodeKey.Int(val)
}
// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the
// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos
// DB sub status code.
func DBCosmosDBSubStatusCode(val int) attribute.KeyValue {
return DBCosmosDBSubStatusCodeKey.Int(val)
}
// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's
// concepts.
const (
// OTelStatusCodeKey is the attribute Key conforming to the
// "otel.status_code" semantic conventions. It represents the name of the
// code, either "OK" or "ERROR". MUST NOT be set if the status code is
// UNSET.
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
OTelStatusCodeKey = attribute.Key("otel.status_code")
// OTelStatusDescriptionKey is the attribute Key conforming to the
// "otel.status_description" semantic conventions. It represents the
// description of the Status if it has a value, otherwise not set.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'resource not found'
OTelStatusDescriptionKey = attribute.Key("otel.status_description")
)
var (
// The operation has been validated by an Application developer or Operator to have completed successfully
OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
// The operation contains an error
OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
)
// OTelStatusDescription returns an attribute KeyValue conforming to the
// "otel.status_description" semantic conventions. It represents the
// description of the Status if it has a value, otherwise not set.
func OTelStatusDescription(val string) attribute.KeyValue {
return OTelStatusDescriptionKey.String(val)
}
// This semantic convention describes an instance of a function that runs
// without provisioning or managing of servers (also known as serverless
// functions or Function as a Service (FaaS)) with spans.
const (
// FaaSInvocationIDKey is the attribute Key conforming to the
// "faas.invocation_id" semantic conventions. It represents the invocation
// ID of the current function invocation.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
)
// FaaSInvocationID returns an attribute KeyValue conforming to the
// "faas.invocation_id" semantic conventions. It represents the invocation ID
// of the current function invocation.
func FaaSInvocationID(val string) attribute.KeyValue {
return FaaSInvocationIDKey.String(val)
}
// Semantic Convention for FaaS triggered as a response to some data source
// operation such as a database or filesystem read/write.
const (
// FaaSDocumentCollectionKey is the attribute Key conforming to the
// "faas.document.collection" semantic conventions. It represents the name
// of the source on which the triggering operation was performed. For
// example, in Cloud Storage or S3 corresponds to the bucket name, and in
// Cosmos DB to the database name.
//
// Type: string
// RequirementLevel: Required
// Stability: experimental
// Examples: 'myBucketName', 'myDBName'
FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
// FaaSDocumentNameKey is the attribute Key conforming to the
// "faas.document.name" semantic conventions. It represents the document
// name/table subjected to the operation. For example, in Cloud Storage or
// S3 is the name of the file, and in Cosmos DB the table name.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'myFile.txt', 'myTableName'
FaaSDocumentNameKey = attribute.Key("faas.document.name")
// FaaSDocumentOperationKey is the attribute Key conforming to the
// "faas.document.operation" semantic conventions. It represents the
// describes the type of the operation that was performed on the data.
//
// Type: Enum
// RequirementLevel: Required
// Stability: experimental
FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
// FaaSDocumentTimeKey is the attribute Key conforming to the
// "faas.document.time" semantic conventions. It represents a string
// containing the time when the data was accessed in the [ISO
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '2020-01-23T13:47:06Z'
FaaSDocumentTimeKey = attribute.Key("faas.document.time")
)
var (
// When a new object is created
FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
// When an object is modified
FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
// When an object is deleted
FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
)
// FaaSDocumentCollection returns an attribute KeyValue conforming to the
// "faas.document.collection" semantic conventions. It represents the name of
// the source on which the triggering operation was performed. For example, in
// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
// database name.
func FaaSDocumentCollection(val string) attribute.KeyValue {
return FaaSDocumentCollectionKey.String(val)
}
// FaaSDocumentName returns an attribute KeyValue conforming to the
// "faas.document.name" semantic conventions. It represents the document
// name/table subjected to the operation. For example, in Cloud Storage or S3
// is the name of the file, and in Cosmos DB the table name.
func FaaSDocumentName(val string) attribute.KeyValue {
return FaaSDocumentNameKey.String(val)
}
// FaaSDocumentTime returns an attribute KeyValue conforming to the
// "faas.document.time" semantic conventions. It represents a string containing
// the time when the data was accessed in the [ISO
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
func FaaSDocumentTime(val string) attribute.KeyValue {
return FaaSDocumentTimeKey.String(val)
}
// Semantic Convention for FaaS scheduled to be executed regularly.
const (
// FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
// conventions. It represents a string containing the schedule period as
// [Cron
// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '0/5 * * * ? *'
FaaSCronKey = attribute.Key("faas.cron")
// FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
// conventions. It represents a string containing the function invocation
// time in the [ISO
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '2020-01-23T13:47:06Z'
FaaSTimeKey = attribute.Key("faas.time")
)
// FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
// semantic conventions. It represents a string containing the schedule period
// as [Cron
// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
func FaaSCron(val string) attribute.KeyValue {
return FaaSCronKey.String(val)
}
// FaaSTime returns an attribute KeyValue conforming to the "faas.time"
// semantic conventions. It represents a string containing the function
// invocation time in the [ISO
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
func FaaSTime(val string) attribute.KeyValue {
return FaaSTimeKey.String(val)
}
// Contains additional attributes for incoming FaaS spans.
const (
// FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
// semantic conventions. It represents a boolean that is true if the
// serverless function is executed for the first time (aka cold-start).
//
// Type: boolean
// RequirementLevel: Optional
// Stability: experimental
FaaSColdstartKey = attribute.Key("faas.coldstart")
)
// FaaSColdstart returns an attribute KeyValue conforming to the
// "faas.coldstart" semantic conventions. It represents a boolean that is true
// if the serverless function is executed for the first time (aka cold-start).
func FaaSColdstart(val bool) attribute.KeyValue {
return FaaSColdstartKey.Bool(val)
}
// The `aws` conventions apply to operations using the AWS SDK. They map
// request or response parameters in AWS SDK API calls to attributes on a Span.
// The conventions have been collected over time based on feedback from AWS
// users of tracing and will continue to evolve as new interesting conventions
// are found.
// Some descriptions are also provided for populating general OpenTelemetry
// semantic conventions based on these APIs.
const (
// AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
// semantic conventions. It represents the AWS request ID as returned in
// the response headers `x-amz-request-id` or `x-amz-requestid`.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ'
AWSRequestIDKey = attribute.Key("aws.request_id")
)
// AWSRequestID returns an attribute KeyValue conforming to the
// "aws.request_id" semantic conventions. It represents the AWS request ID as
// returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
func AWSRequestID(val string) attribute.KeyValue {
return AWSRequestIDKey.String(val)
}
// Attributes that exist for multiple DynamoDB request types.
const (
// AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
// "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
// value of the `AttributesToGet` request parameter.
//
// Type: string[]
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'lives', 'id'
AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
// AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
// "aws.dynamodb.consistent_read" semantic conventions. It represents the
// value of the `ConsistentRead` request parameter.
//
// Type: boolean
// RequirementLevel: Optional
// Stability: experimental
AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
// AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
// "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
// JSON-serialized value of each item in the `ConsumedCapacity` response
// field.
//
// Type: string[]
// RequirementLevel: Optional
// Stability: experimental
// Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
// "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
// "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
// { "CapacityUnits": number, "ReadCapacityUnits": number,
// "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
// { "CapacityUnits": number, "ReadCapacityUnits": number,
// "WriteCapacityUnits": number }, "TableName": "string",
// "WriteCapacityUnits": number }'
AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
// AWSDynamoDBIndexNameKey is the attribute Key conforming to the
// "aws.dynamodb.index_name" semantic conventions. It represents the value
// of the `IndexName` request parameter.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'name_to_group'
AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
// AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
// the "aws.dynamodb.item_collection_metrics" semantic conventions. It
// represents the JSON-serialized value of the `ItemCollectionMetrics`
// response field.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
// blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
// "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
// "NULL": boolean, "S": "string", "SS": [ "string" ] } },
// "SizeEstimateRangeGB": [ number ] } ] }'
AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
// AWSDynamoDBLimitKey is the attribute Key conforming to the
// "aws.dynamodb.limit" semantic conventions. It represents the value of
// the `Limit` request parameter.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 10
AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
// AWSDynamoDBProjectionKey is the attribute Key conforming to the
// "aws.dynamodb.projection" semantic conventions. It represents the value
// of the `ProjectionExpression` request parameter.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'Title', 'Title, Price, Color', 'Title, Description,
// RelatedItems, ProductReviews'
AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
// AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
// the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
// represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
// request parameter.
//
// Type: double
// RequirementLevel: Optional
// Stability: experimental
// Examples: 1.0, 2.0
AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
// AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
// to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
// It represents the value of the
// `ProvisionedThroughput.WriteCapacityUnits` request parameter.
//
// Type: double
// RequirementLevel: Optional
// Stability: experimental
// Examples: 1.0, 2.0
AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
// AWSDynamoDBSelectKey is the attribute Key conforming to the
// "aws.dynamodb.select" semantic conventions. It represents the value of
// the `Select` request parameter.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'ALL_ATTRIBUTES', 'COUNT'
AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
// AWSDynamoDBTableNamesKey is the attribute Key conforming to the
// "aws.dynamodb.table_names" semantic conventions. It represents the keys
// in the `RequestItems` object field.
//
// Type: string[]
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'Users', 'Cats'
AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
)
// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
// value of the `AttributesToGet` request parameter.
func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
return AWSDynamoDBAttributesToGetKey.StringSlice(val)
}
// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
// "aws.dynamodb.consistent_read" semantic conventions. It represents the value
// of the `ConsistentRead` request parameter.
func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
return AWSDynamoDBConsistentReadKey.Bool(val)
}
// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
// JSON-serialized value of each item in the `ConsumedCapacity` response field.
func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
}
// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
// "aws.dynamodb.index_name" semantic conventions. It represents the value of
// the `IndexName` request parameter.
func AWSDynamoDBIndexName(val string) attribute.KeyValue {
return AWSDynamoDBIndexNameKey.String(val)
}
// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
// represents the JSON-serialized value of the `ItemCollectionMetrics` response
// field.
func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
return AWSDynamoDBItemCollectionMetricsKey.String(val)
}
// AWSDynamoDBLimit returns an attribute KeyValue conforming to the
// "aws.dynamodb.limit" semantic conventions. It represents the value of the
// `Limit` request parameter.
func AWSDynamoDBLimit(val int) attribute.KeyValue {
return AWSDynamoDBLimitKey.Int(val)
}
// AWSDynamoDBProjection returns an attribute KeyValue conforming to the
// "aws.dynamodb.projection" semantic conventions. It represents the value of
// the `ProjectionExpression` request parameter.
func AWSDynamoDBProjection(val string) attribute.KeyValue {
return AWSDynamoDBProjectionKey.String(val)
}
// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
// conventions. It represents the value of the
// `ProvisionedThroughput.ReadCapacityUnits` request parameter.
func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
}
// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
// conventions. It represents the value of the
// `ProvisionedThroughput.WriteCapacityUnits` request parameter.
func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
}
// AWSDynamoDBSelect returns an attribute KeyValue conforming to the
// "aws.dynamodb.select" semantic conventions. It represents the value of the
// `Select` request parameter.
func AWSDynamoDBSelect(val string) attribute.KeyValue {
return AWSDynamoDBSelectKey.String(val)
}
// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
// "aws.dynamodb.table_names" semantic conventions. It represents the keys in
// the `RequestItems` object field.
func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
return AWSDynamoDBTableNamesKey.StringSlice(val)
}
// DynamoDB.CreateTable
const (
// AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
// the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
// represents the JSON-serialized value of each item of the
// `GlobalSecondaryIndexes` request field
//
// Type: string[]
// RequirementLevel: Optional
// Stability: experimental
// Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
// "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
// "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
// "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
// AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
// the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
// represents the JSON-serialized value of each item of the
// `LocalSecondaryIndexes` request field.
//
// Type: string[]
// RequirementLevel: Optional
// Stability: experimental
// Examples: '{ "IndexARN": "string", "IndexName": "string",
// "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
// "AttributeName": "string", "KeyType": "string" } ], "Projection": {
// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
)
// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
// conforming to the "aws.dynamodb.global_secondary_indexes" semantic
// conventions. It represents the JSON-serialized value of each item of the
// `GlobalSecondaryIndexes` request field
func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
}
// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
// represents the JSON-serialized value of each item of the
// `LocalSecondaryIndexes` request field.
func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
}
// DynamoDB.ListTables
const (
// AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
// "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
// the value of the `ExclusiveStartTableName` request parameter.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'Users', 'CatsTable'
AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
// AWSDynamoDBTableCountKey is the attribute Key conforming to the
// "aws.dynamodb.table_count" semantic conventions. It represents the the
// number of items in the `TableNames` response parameter.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 20
AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
)
// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
// represents the value of the `ExclusiveStartTableName` request parameter.
func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
return AWSDynamoDBExclusiveStartTableKey.String(val)
}
// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
// "aws.dynamodb.table_count" semantic conventions. It represents the the
// number of items in the `TableNames` response parameter.
func AWSDynamoDBTableCount(val int) attribute.KeyValue {
return AWSDynamoDBTableCountKey.Int(val)
}
// DynamoDB.Query
const (
// AWSDynamoDBScanForwardKey is the attribute Key conforming to the
// "aws.dynamodb.scan_forward" semantic conventions. It represents the
// value of the `ScanIndexForward` request parameter.
//
// Type: boolean
// RequirementLevel: Optional
// Stability: experimental
AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
)
// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
// the `ScanIndexForward` request parameter.
func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
return AWSDynamoDBScanForwardKey.Bool(val)
}
// DynamoDB.Scan
const (
// AWSDynamoDBCountKey is the attribute Key conforming to the
// "aws.dynamodb.count" semantic conventions. It represents the value of
// the `Count` response parameter.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 10
AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
// AWSDynamoDBScannedCountKey is the attribute Key conforming to the
// "aws.dynamodb.scanned_count" semantic conventions. It represents the
// value of the `ScannedCount` response parameter.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 50
AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
// AWSDynamoDBSegmentKey is the attribute Key conforming to the
// "aws.dynamodb.segment" semantic conventions. It represents the value of
// the `Segment` request parameter.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 10
AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
// AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
// "aws.dynamodb.total_segments" semantic conventions. It represents the
// value of the `TotalSegments` request parameter.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 100
AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
)
// AWSDynamoDBCount returns an attribute KeyValue conforming to the
// "aws.dynamodb.count" semantic conventions. It represents the value of the
// `Count` response parameter.
func AWSDynamoDBCount(val int) attribute.KeyValue {
return AWSDynamoDBCountKey.Int(val)
}
// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
// "aws.dynamodb.scanned_count" semantic conventions. It represents the value
// of the `ScannedCount` response parameter.
func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
return AWSDynamoDBScannedCountKey.Int(val)
}
// AWSDynamoDBSegment returns an attribute KeyValue conforming to the
// "aws.dynamodb.segment" semantic conventions. It represents the value of the
// `Segment` request parameter.
func AWSDynamoDBSegment(val int) attribute.KeyValue {
return AWSDynamoDBSegmentKey.Int(val)
}
// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
// "aws.dynamodb.total_segments" semantic conventions. It represents the value
// of the `TotalSegments` request parameter.
func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
return AWSDynamoDBTotalSegmentsKey.Int(val)
}
// DynamoDB.UpdateTable
const (
// AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
// the "aws.dynamodb.attribute_definitions" semantic conventions. It
// represents the JSON-serialized value of each item in the
// `AttributeDefinitions` request field.
//
// Type: string[]
// RequirementLevel: Optional
// Stability: experimental
// Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
// AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
// conventions. It represents the JSON-serialized value of each item in the
// the `GlobalSecondaryIndexUpdates` request field.
//
// Type: string[]
// RequirementLevel: Optional
// Stability: experimental
// Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
// "AttributeName": "string", "KeyType": "string" } ], "Projection": {
// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
// "ProvisionedThroughput": { "ReadCapacityUnits": number,
// "WriteCapacityUnits": number } }'
AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
)
// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
// to the "aws.dynamodb.attribute_definitions" semantic conventions. It
// represents the JSON-serialized value of each item in the
// `AttributeDefinitions` request field.
func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
}
// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
// conventions. It represents the JSON-serialized value of each item in the the
// `GlobalSecondaryIndexUpdates` request field.
func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
}
// Attributes that exist for S3 request types.
const (
// AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
// semantic conventions. It represents the S3 bucket name the request
// refers to. Corresponds to the `--bucket` parameter of the [S3
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
// operations.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'some-bucket-name'
// Note: The `bucket` attribute is applicable to all S3 operations that
// reference a bucket, i.e. that require the bucket name as a mandatory
// parameter.
// This applies to almost all S3 operations except `list-buckets`.
AWSS3BucketKey = attribute.Key("aws.s3.bucket")
// AWSS3CopySourceKey is the attribute Key conforming to the
// "aws.s3.copy_source" semantic conventions. It represents the source
// object (in the form `bucket`/`key`) for the copy operation.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'someFile.yml'
// Note: The `copy_source` attribute applies to S3 copy operations and
// corresponds to the `--copy-source` parameter
// of the [copy-object operation within the S3
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
// This applies in particular to the following operations:
//
// -
// [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
// -
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
// AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
// semantic conventions. It represents the delete request container that
// specifies the objects to be deleted.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples:
// 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean'
// Note: The `delete` attribute is only applicable to the
// [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
// operation.
// The `delete` attribute corresponds to the `--delete` parameter of the
// [delete-objects operation within the S3
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
AWSS3DeleteKey = attribute.Key("aws.s3.delete")
// AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
// conventions. It represents the S3 object key the request refers to.
// Corresponds to the `--key` parameter of the [S3
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
// operations.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'someFile.yml'
// Note: The `key` attribute is applicable to all object-related S3
// operations, i.e. that require the object key as a mandatory parameter.
// This applies in particular to the following operations:
//
// -
// [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
// -
// [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
// -
// [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
// -
// [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
// -
// [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
// -
// [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
// -
// [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
// -
// [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
// -
// [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
// -
// [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
// -
// [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
// -
// [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
// -
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
AWSS3KeyKey = attribute.Key("aws.s3.key")
// AWSS3PartNumberKey is the attribute Key conforming to the
// "aws.s3.part_number" semantic conventions. It represents the part number
// of the part being uploaded in a multipart-upload operation. This is a
// positive integer between 1 and 10,000.
//
// Type: int
// RequirementLevel: Optional
// Stability: experimental
// Examples: 3456
// Note: The `part_number` attribute is only applicable to the
// [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
// and
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
// operations.
// The `part_number` attribute corresponds to the `--part-number` parameter
// of the
// [upload-part operation within the S3
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
// AWSS3UploadIDKey is the attribute Key conforming to the
// "aws.s3.upload_id" semantic conventions. It represents the upload ID
// that identifies the multipart upload.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ'
// Note: The `upload_id` attribute applies to S3 multipart-upload
// operations and corresponds to the `--upload-id` parameter
// of the [S3
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
// multipart operations.
// This applies in particular to the following operations:
//
// -
// [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
// -
// [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
// -
// [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
// -
// [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
// -
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
)
// AWSS3Bucket returns an attribute KeyValue conforming to the
// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the
// request refers to. Corresponds to the `--bucket` parameter of the [S3
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
// operations.
func AWSS3Bucket(val string) attribute.KeyValue {
return AWSS3BucketKey.String(val)
}
// AWSS3CopySource returns an attribute KeyValue conforming to the
// "aws.s3.copy_source" semantic conventions. It represents the source object
// (in the form `bucket`/`key`) for the copy operation.
func AWSS3CopySource(val string) attribute.KeyValue {
return AWSS3CopySourceKey.String(val)
}
// AWSS3Delete returns an attribute KeyValue conforming to the
// "aws.s3.delete" semantic conventions. It represents the delete request
// container that specifies the objects to be deleted.
func AWSS3Delete(val string) attribute.KeyValue {
return AWSS3DeleteKey.String(val)
}
// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key"
// semantic conventions. It represents the S3 object key the request refers to.
// Corresponds to the `--key` parameter of the [S3
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
// operations.
func AWSS3Key(val string) attribute.KeyValue {
return AWSS3KeyKey.String(val)
}
// AWSS3PartNumber returns an attribute KeyValue conforming to the
// "aws.s3.part_number" semantic conventions. It represents the part number of
// the part being uploaded in a multipart-upload operation. This is a positive
// integer between 1 and 10,000.
func AWSS3PartNumber(val int) attribute.KeyValue {
return AWSS3PartNumberKey.Int(val)
}
// AWSS3UploadID returns an attribute KeyValue conforming to the
// "aws.s3.upload_id" semantic conventions. It represents the upload ID that
// identifies the multipart upload.
func AWSS3UploadID(val string) attribute.KeyValue {
return AWSS3UploadIDKey.String(val)
}
// Semantic conventions to apply when instrumenting the GraphQL implementation.
// They map GraphQL operations to attributes on a Span.
const (
// GraphqlDocumentKey is the attribute Key conforming to the
// "graphql.document" semantic conventions. It represents the GraphQL
// document being executed.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'query findBookByID { bookByID(id: ?) { name } }'
// Note: The value may be sanitized to exclude sensitive information.
GraphqlDocumentKey = attribute.Key("graphql.document")
// GraphqlOperationNameKey is the attribute Key conforming to the
// "graphql.operation.name" semantic conventions. It represents the name of
// the operation being executed.
//
// Type: string
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'findBookByID'
GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
// GraphqlOperationTypeKey is the attribute Key conforming to the
// "graphql.operation.type" semantic conventions. It represents the type of
// the operation being executed.
//
// Type: Enum
// RequirementLevel: Optional
// Stability: experimental
// Examples: 'query', 'mutation', 'subscription'
GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
)
var (
// GraphQL query
GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
// GraphQL mutation
GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
// GraphQL subscription
GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
)
// GraphqlDocument returns an attribute KeyValue conforming to the
// "graphql.document" semantic conventions. It represents the GraphQL document
// being executed.
func GraphqlDocument(val string) attribute.KeyValue {
return GraphqlDocumentKey.String(val)
}
// GraphqlOperationName returns an attribute KeyValue conforming to the
// "graphql.operation.name" semantic conventions. It represents the name of the
// operation being executed.
func GraphqlOperationName(val string) attribute.KeyValue {
return GraphqlOperationNameKey.String(val)
}
|