|
10 | 10 | import static io.opentelemetry.api.common.AttributeKey.longKey;
|
11 | 11 | import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
|
12 | 12 | import static io.opentelemetry.api.common.AttributeKey.stringKey;
|
| 13 | +import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate; |
| 14 | +import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; |
13 | 15 |
|
14 | 16 | import io.opentelemetry.api.common.AttributeKey;
|
15 | 17 | import java.util.List;
|
@@ -1738,6 +1740,121 @@ public final class SemanticAttributes {
|
1738 | 1740 | */
|
1739 | 1741 | public static final AttributeKey<Boolean> EXCEPTION_ESCAPED = booleanKey("exception.escaped");
|
1740 | 1742 |
|
| 1743 | + /** |
| 1744 | + * HTTP request headers, {@code <key>} being the normalized HTTP Header name (lowercase), the |
| 1745 | + * value being the header values. |
| 1746 | + * |
| 1747 | + * <p>Notes: |
| 1748 | + * |
| 1749 | + * <ul> |
| 1750 | + * <li>Instrumentations SHOULD require an explicit configuration of which headers are to be |
| 1751 | + * captured. Including all request headers can be a security risk - explicit configuration |
| 1752 | + * helps avoid leaking sensitive information. The {@code User-Agent} header is already |
| 1753 | + * captured in the {@code user_agent.original} attribute. Users MAY explicitly configure |
| 1754 | + * instrumentations to capture them even though it is not recommended. The attribute value |
| 1755 | + * MUST consist of either multiple header values as an array of strings or a single-item |
| 1756 | + * array containing a possibly comma-concatenated string, depending on the way the HTTP |
| 1757 | + * library provides access to headers. |
| 1758 | + * </ul> |
| 1759 | + */ |
| 1760 | + public static final AttributeKeyTemplate<List<String>> HTTP_REQUEST_HEADER = |
| 1761 | + stringArrayKeyTemplate("http.request.header"); |
| 1762 | + |
| 1763 | + /** |
| 1764 | + * HTTP response headers, {@code <key>} being the normalized HTTP Header name (lowercase), the |
| 1765 | + * value being the header values. |
| 1766 | + * |
| 1767 | + * <p>Notes: |
| 1768 | + * |
| 1769 | + * <ul> |
| 1770 | + * <li>Instrumentations SHOULD require an explicit configuration of which headers are to be |
| 1771 | + * captured. Including all response headers can be a security risk - explicit configuration |
| 1772 | + * helps avoid leaking sensitive information. Users MAY explicitly configure |
| 1773 | + * instrumentations to capture them even though it is not recommended. The attribute value |
| 1774 | + * MUST consist of either multiple header values as an array of strings or a single-item |
| 1775 | + * array containing a possibly comma-concatenated string, depending on the way the HTTP |
| 1776 | + * library provides access to headers. |
| 1777 | + * </ul> |
| 1778 | + */ |
| 1779 | + public static final AttributeKeyTemplate<List<String>> HTTP_RESPONSE_HEADER = |
| 1780 | + stringArrayKeyTemplate("http.response.header"); |
| 1781 | + |
| 1782 | + /** |
| 1783 | + * Connect request metadata, {@code <key>} being the normalized Connect Metadata key (lowercase), |
| 1784 | + * the value being the metadata values. |
| 1785 | + * |
| 1786 | + * <p>Notes: |
| 1787 | + * |
| 1788 | + * <ul> |
| 1789 | + * <li>Instrumentations SHOULD require an explicit configuration of which metadata values are to |
| 1790 | + * be captured. Including all request metadata values can be a security risk - explicit |
| 1791 | + * configuration helps avoid leaking sensitive information. |
| 1792 | + * </ul> |
| 1793 | + */ |
| 1794 | + public static final AttributeKeyTemplate<List<String>> RPC_CONNECT_RPC_REQUEST_METADATA = |
| 1795 | + stringArrayKeyTemplate("rpc.connect_rpc.request.metadata"); |
| 1796 | + |
| 1797 | + /** |
| 1798 | + * Connect response metadata, {@code <key>} being the normalized Connect Metadata key (lowercase), |
| 1799 | + * the value being the metadata values. |
| 1800 | + * |
| 1801 | + * <p>Notes: |
| 1802 | + * |
| 1803 | + * <ul> |
| 1804 | + * <li>Instrumentations SHOULD require an explicit configuration of which metadata values are to |
| 1805 | + * be captured. Including all response metadata values can be a security risk - explicit |
| 1806 | + * configuration helps avoid leaking sensitive information. |
| 1807 | + * </ul> |
| 1808 | + */ |
| 1809 | + public static final AttributeKeyTemplate<List<String>> RPC_CONNECT_RPC_RESPONSE_METADATA = |
| 1810 | + stringArrayKeyTemplate("rpc.connect_rpc.response.metadata"); |
| 1811 | + |
| 1812 | + /** |
| 1813 | + * gRPC request metadata, {@code <key>} being the normalized gRPC Metadata key (lowercase), the |
| 1814 | + * value being the metadata values. |
| 1815 | + * |
| 1816 | + * <p>Notes: |
| 1817 | + * |
| 1818 | + * <ul> |
| 1819 | + * <li>Instrumentations SHOULD require an explicit configuration of which metadata values are to |
| 1820 | + * be captured. Including all request metadata values can be a security risk - explicit |
| 1821 | + * configuration helps avoid leaking sensitive information. |
| 1822 | + * </ul> |
| 1823 | + */ |
| 1824 | + public static final AttributeKeyTemplate<List<String>> RPC_GRPC_REQUEST_METADATA = |
| 1825 | + stringArrayKeyTemplate("rpc.grpc.request.metadata"); |
| 1826 | + |
| 1827 | + /** |
| 1828 | + * gRPC response metadata, {@code <key>} being the normalized gRPC Metadata key (lowercase), the |
| 1829 | + * value being the metadata values. |
| 1830 | + * |
| 1831 | + * <p>Notes: |
| 1832 | + * |
| 1833 | + * <ul> |
| 1834 | + * <li>Instrumentations SHOULD require an explicit configuration of which metadata values are to |
| 1835 | + * be captured. Including all response metadata values can be a security risk - explicit |
| 1836 | + * configuration helps avoid leaking sensitive information. |
| 1837 | + * </ul> |
| 1838 | + */ |
| 1839 | + public static final AttributeKeyTemplate<List<String>> RPC_GRPC_RESPONSE_METADATA = |
| 1840 | + stringArrayKeyTemplate("rpc.grpc.response.metadata"); |
| 1841 | + |
| 1842 | + /** |
| 1843 | + * A dynamic value in the url path. |
| 1844 | + * |
| 1845 | + * <p>Notes: |
| 1846 | + * |
| 1847 | + * <ul> |
| 1848 | + * <li>Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span |
| 1849 | + * attributes in the format {@code db.elasticsearch.path_parts.<key>}, where {@code <key>} |
| 1850 | + * is the url path part name. The implementation SHOULD reference the <a |
| 1851 | + * href="https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json">elasticsearch |
| 1852 | + * schema</a> in order to map the path part values to their names. |
| 1853 | + * </ul> |
| 1854 | + */ |
| 1855 | + public static final AttributeKeyTemplate<String> DB_ELASTICSEARCH_PATH_PARTS = |
| 1856 | + stringKeyTemplate("db.elasticsearch.path_parts"); |
| 1857 | + |
1741 | 1858 | // Enum definitions
|
1742 | 1859 | public static final class ErrorTypeValues {
|
1743 | 1860 | /**
|
|
0 commit comments