Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Update requests.mdx #1332

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/docs/sdk/performance/modules/requests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ The SDK should auto-instrument all outgoing HTTP requests, regardless of the lib
| Attribute | Description | Notes |
|:--|:--|:--|
| `op` | Always `"http.client"` | Required |
| `description` | A string including the HTTP request method, and the full URL. e.g., `"GET https://example.com/data.json"` | Required [^1] |
| `description` | A string including the HTTP request method, and the partial URL. e.g., `"GET https://example.com/data.json"` | Required [^1] |
| `data` | A key-value mapping of span attributes. (e.g., `{"http.query": "filter=all", "server.address": "prod-2.example.com"}`) | Required for full experience. See [Span Data](#span-data) for details |

### Span Data

None of the span data fields are hard requirements, but attaching as many of them as possible is a more future-proof approach. We recommend that the SDK adds every attribute listed in the [HTTP Span Data Conventions](/sdk/performance/span-data-conventions/#http). The minimal requirements are:

- `server.address` must be set to allow correct domain grouping _for descriptions containing relative URLs_. e.g., the description `"GET /data.json"` is missing a domain. In this case, `server.address` must be set. If the span description contains the full URL, `span.server` can be omitted
- `server.address` must be set to allow correct domain grouping _for descriptions containing relative URLs_. e.g., the description `"GET /data.json"` is missing a domain. In this case, `server.address` must be set. If the span description contains the partial URL, `span.server` can be omitted
- `http.response.status_code` must be set to enable response code breakdowns

## Instrumentation Example
Expand Down
Loading