|
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;
|
@@ -1688,6 +1690,121 @@ public final class SemanticAttributes {
|
1688 | 1690 | */
|
1689 | 1691 | public static final AttributeKey<String> USER_AGENT_ORIGINAL = stringKey("user_agent.original");
|
1690 | 1692 |
|
| 1693 | + /** |
| 1694 | + * HTTP request headers, {@code <key>} being the normalized HTTP Header name (lowercase, with |
| 1695 | + * {@code -} characters replaced by {@code _}), the value being the header values. |
| 1696 | + * |
| 1697 | + * <p>Notes: |
| 1698 | + * |
| 1699 | + * <ul> |
| 1700 | + * <li>Instrumentations SHOULD require an explicit configuration of which headers are to be |
| 1701 | + * captured. Including all request headers can be a security risk - explicit configuration |
| 1702 | + * helps avoid leaking sensitive information. The {@code User-Agent} header is already |
| 1703 | + * captured in the {@code user_agent.original} attribute. Users MAY explicitly configure |
| 1704 | + * instrumentations to capture them even though it is not recommended. The attribute value |
| 1705 | + * MUST consist of either multiple header values as an array of strings or a single-item |
| 1706 | + * array containing a possibly comma-concatenated string, depending on the way the HTTP |
| 1707 | + * library provides access to headers. |
| 1708 | + * </ul> |
| 1709 | + */ |
| 1710 | + public static final AttributeKeyTemplate<List<String>> HTTP_REQUEST_HEADER = |
| 1711 | + stringArrayKeyTemplate("http.request.header"); |
| 1712 | + |
| 1713 | + /** |
| 1714 | + * HTTP response headers, {@code <key>} being the normalized HTTP Header name (lowercase, with |
| 1715 | + * {@code -} characters replaced by {@code _}), the value being the header values. |
| 1716 | + * |
| 1717 | + * <p>Notes: |
| 1718 | + * |
| 1719 | + * <ul> |
| 1720 | + * <li>Instrumentations SHOULD require an explicit configuration of which headers are to be |
| 1721 | + * captured. Including all response headers can be a security risk - explicit configuration |
| 1722 | + * helps avoid leaking sensitive information. Users MAY explicitly configure |
| 1723 | + * instrumentations to capture them even though it is not recommended. The attribute value |
| 1724 | + * MUST consist of either multiple header values as an array of strings or a single-item |
| 1725 | + * array containing a possibly comma-concatenated string, depending on the way the HTTP |
| 1726 | + * library provides access to headers. |
| 1727 | + * </ul> |
| 1728 | + */ |
| 1729 | + public static final AttributeKeyTemplate<List<String>> HTTP_RESPONSE_HEADER = |
| 1730 | + stringArrayKeyTemplate("http.response.header"); |
| 1731 | + |
| 1732 | + /** |
| 1733 | + * A dynamic value in the url path. |
| 1734 | + * |
| 1735 | + * <p>Notes: |
| 1736 | + * |
| 1737 | + * <ul> |
| 1738 | + * <li>Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span |
| 1739 | + * attributes in the format {@code db.elasticsearch.path_parts.<key>}, where {@code <key>} |
| 1740 | + * is the url path part name. The implementation SHOULD reference the <a |
| 1741 | + * href="https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json">elasticsearch |
| 1742 | + * schema</a> in order to map the path part values to their names. |
| 1743 | + * </ul> |
| 1744 | + */ |
| 1745 | + public static final AttributeKeyTemplate<String> DB_ELASTICSEARCH_PATH_PARTS = |
| 1746 | + stringKeyTemplate("db.elasticsearch.path_parts"); |
| 1747 | + |
| 1748 | + /** |
| 1749 | + * gRPC request metadata, {@code <key>} being the normalized gRPC Metadata key (lowercase, with |
| 1750 | + * {@code -} characters replaced by {@code _}), the value being the metadata values. |
| 1751 | + * |
| 1752 | + * <p>Notes: |
| 1753 | + * |
| 1754 | + * <ul> |
| 1755 | + * <li>Instrumentations SHOULD require an explicit configuration of which metadata values are to |
| 1756 | + * be captured. Including all request metadata values can be a security risk - explicit |
| 1757 | + * configuration helps avoid leaking sensitive information. |
| 1758 | + * </ul> |
| 1759 | + */ |
| 1760 | + public static final AttributeKeyTemplate<List<String>> RPC_GRPC_REQUEST_METADATA = |
| 1761 | + stringArrayKeyTemplate("rpc.grpc.request.metadata"); |
| 1762 | + |
| 1763 | + /** |
| 1764 | + * gRPC response metadata, {@code <key>} being the normalized gRPC Metadata key (lowercase, with |
| 1765 | + * {@code -} characters replaced by {@code _}), the value being the metadata values. |
| 1766 | + * |
| 1767 | + * <p>Notes: |
| 1768 | + * |
| 1769 | + * <ul> |
| 1770 | + * <li>Instrumentations SHOULD require an explicit configuration of which metadata values are to |
| 1771 | + * be captured. Including all response metadata values can be a security risk - explicit |
| 1772 | + * configuration helps avoid leaking sensitive information. |
| 1773 | + * </ul> |
| 1774 | + */ |
| 1775 | + public static final AttributeKeyTemplate<List<String>> RPC_GRPC_RESPONSE_METADATA = |
| 1776 | + stringArrayKeyTemplate("rpc.grpc.response.metadata"); |
| 1777 | + |
| 1778 | + /** |
| 1779 | + * Connect request metadata, {@code <key>} being the normalized Connect Metadata key (lowercase, |
| 1780 | + * with {@code -} characters replaced by {@code _}), the value being the metadata values. |
| 1781 | + * |
| 1782 | + * <p>Notes: |
| 1783 | + * |
| 1784 | + * <ul> |
| 1785 | + * <li>Instrumentations SHOULD require an explicit configuration of which metadata values are to |
| 1786 | + * be captured. Including all request metadata values can be a security risk - explicit |
| 1787 | + * configuration helps avoid leaking sensitive information. |
| 1788 | + * </ul> |
| 1789 | + */ |
| 1790 | + public static final AttributeKeyTemplate<List<String>> RPC_CONNECT_RPC_REQUEST_METADATA = |
| 1791 | + stringArrayKeyTemplate("rpc.connect_rpc.request.metadata"); |
| 1792 | + |
| 1793 | + /** |
| 1794 | + * Connect response metadata, {@code <key>} being the normalized Connect Metadata key (lowercase, |
| 1795 | + * with {@code -} characters replaced by {@code _}), the value being the metadata values. |
| 1796 | + * |
| 1797 | + * <p>Notes: |
| 1798 | + * |
| 1799 | + * <ul> |
| 1800 | + * <li>Instrumentations SHOULD require an explicit configuration of which metadata values are to |
| 1801 | + * be captured. Including all response metadata values can be a security risk - explicit |
| 1802 | + * configuration helps avoid leaking sensitive information. |
| 1803 | + * </ul> |
| 1804 | + */ |
| 1805 | + public static final AttributeKeyTemplate<List<String>> RPC_CONNECT_RPC_RESPONSE_METADATA = |
| 1806 | + stringArrayKeyTemplate("rpc.connect_rpc.response.metadata"); |
| 1807 | + |
1691 | 1808 | // Enum definitions
|
1692 | 1809 | public static final class NetSockFamilyValues {
|
1693 | 1810 | /** IPv4 address. */
|
|
0 commit comments