Skip to content

Commit

Permalink
Update develop docs data handling section for new APIs (#12347)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea authored Jan 15, 2025
1 parent a18db4b commit ff31278
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions develop-docs/sdk/expected-features/data-handling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@ This helps Relay to know what kind of data it receives and this helps with scrub
If query strings are present in the URL or fragments (Browser SDKs only) are present in the URI, both are set into the data attribute of the span.

```js
span.setData({
span.setAttributes({
"http.query": url.getQuery(),
"http.fragment": uri.getFragment(),
});
```

```python
span.set_data("http.query", query)
```

Additionally all semantic conventions of OpenTelementry for http spans should be set in the `span.data` if applicable:
https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/http/

Expand All @@ -86,7 +90,7 @@ If the `message` in a breadcrumb contains an URL it should be formatted the same
If query strings are present in the URL or fragments (Browser SDKs only) are present in the URI, both should also be set in the data attribute like with `http` spans.

```js
getCurrentHub().addBreadcrumb({
Sentry.addBreadcrumb({
type: "http",
category: "xhr",
data: {
Expand Down

0 comments on commit ff31278

Please sign in to comment.