Skip to content

Commit ffb9d2b

Browse files
authored
chore: Add changelog for 6.17.0-beta1 (#4357)
1 parent 2f2d099 commit ffb9d2b

File tree

2 files changed

+104
-1
lines changed

2 files changed

+104
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 6.17.0-beta1
8+
9+
This beta releases contains several internal refactors that help reduce the bundle size of the SDK and help prep for our [upcoming major release](https://github.com/getsentry/sentry-javascript/issues/4240). There are no breaking changes in this patch unless you are using our internal `Dsn` class. We also deprecated our typescript enums and our internal `API` class. We've detailed how to update your sdk usage if you are using the `Dsn` class or any of the deprecated methods in our [migration documentation](./MIGRATION.md#upgrading-from-6.x-to-6.17.0).
10+
11+
- feat(core): Deprecate API class (#4281)
12+
- feat(dsn): Remove Dsn class (#4325)
13+
- feat(ember): Update ember dependencies (#4253)
14+
- ref(tracing): deprecate span status enum (#4299)
715
- ref(types): drop unused logLevel (#4317)
816
- ref(types): deprecate request status enum (#4316)
917
- ref(types): deprecate outcome enum (#4315)
1018
- ref(types): deprecate transactionmethod enum (#4314)
11-
- ref(types): deprecate span status enum (#4299)
1219
- ref(types): deprecate status enum (#4298)
1320
- ref(types): deprecate severity enum (#4280)
1421

MIGRATION.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,99 @@
1+
# Upgrading from 6.x to 6.17.0
2+
3+
You only need to make changes when migrating to `6.17.0` if you are using our internal `Dsn` class. Our internal API class and typescript enums were deprecated, so we recommend you migrate them as well.
4+
5+
The internal `Dsn` class was removed in `6.17.0`. For additional details, you can look at the [PR where this change happened](https://github.com/getsentry/sentry-javascript/pull/4325). To migrate, see the following example.
6+
7+
```js
8+
// New in 6.17.0:
9+
import { dsnToString, makeDsn } from '@sentry/utils';
10+
11+
const dsn = makeDsn(process.env.SENTRY_DSN);
12+
console.log(dsnToString(dsn));
13+
14+
// Before:
15+
import { Dsn } from '@sentry/utils';
16+
17+
const dsn = new Dsn(process.env.SENTRY_DSN);
18+
console.log(dsn.toString());
19+
```
20+
21+
The internal API class was deprecated, and will be removed in the next major release. More details can be found in the [PR that made this change](https://github.com/getsentry/sentry-javascript/pull/4281). To migrate, see the following example.
22+
23+
```js
24+
// New in 6.17.0:
25+
import {
26+
initAPIDetails,
27+
getEnvelopeEndpointWithUrlEncodedAuth,
28+
getStoreEndpointWithUrlEncodedAuth,
29+
} from '@sentry/core';
30+
31+
const dsn = initAPIDetails(dsn, metadata, tunnel);
32+
const dsn = api.dsn;
33+
const storeEndpoint = getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel);
34+
const envelopeEndpoint = getStoreEndpointWithUrlEncodedAuth(api.dsn);
35+
36+
// Before:
37+
import { API } from '@sentry/core';
38+
39+
const api = new API(dsn, metadata, tunnel);
40+
const dsn = api.getDsn();
41+
const storeEndpoint = api.getStoreEndpointWithUrlEncodedAuth();
42+
const envelopeEndpoint = api.getEnvelopeEndpointWithUrlEncodedAuth();
43+
```
44+
45+
## Enum changes
46+
47+
We've detailed how to migrate off our enums `Severity`, `Status` and `SpanStatus`. We also made changes to deprecate `TransactionMethod`, `Outcome` and `RequestSessionStatus` enums, but those are internal only APIs.
48+
49+
#### Severity
50+
51+
We deprecated the `Severity` enum in `@sentry/types` and it will be removed in the next major release. We recommend using string literals to save on bundle size. [PR](https://github.com/getsentry/sentry-javascript/pull/4280). We also removed the `Severity.fromString` method. This was done to save on bundle size.
52+
53+
```js
54+
// New in 6.17.0:
55+
import { severityFromString } from '@sentry/utils';
56+
57+
const severity = severityFromString(level);
58+
59+
// Before:
60+
import { Severity } from '@sentry/types';
61+
62+
const severity = Severity.fromString(level);
63+
```
64+
65+
#### Status
66+
67+
We deprecated the `Status` enum in `@sentry/types` and it will be removed in the next major release. We recommend using string literals to save on bundle size. [PR](https://github.com/getsentry/sentry-javascript/pull/4298). We also removed the `Status.fromHttpCode` method. This was done to save on bundle size.
68+
69+
```js
70+
// New in 6.17.0:
71+
import { eventStatusFromHttpCode } from '@sentry/utils';
72+
73+
const status = eventStatusFromHttpCode(500);
74+
75+
// Before:
76+
import { Status } from '@sentry/types';
77+
78+
const status = Status.fromHttpCode(500);
79+
```
80+
81+
#### SpanStatus
82+
83+
We deprecated the `Status` enum in `@sentry/tracing` and it will be removed in the next major release. We recommend using string literals to save on bundle size. [PR](https://github.com/getsentry/sentry-javascript/pull/4299). We also removed the `SpanStatus.fromHttpCode` method. This was done to save on bundle size.
84+
85+
```js
86+
// New in 6.17.0:
87+
import { spanStatusfromHttpCode } from '@sentry/utils';
88+
89+
const status = spanStatusfromHttpCode(403);
90+
91+
// Before:
92+
import { SpanStatus } from '@sentry/tracing';
93+
94+
const status = SpanStatus.fromHttpCode(403);
95+
```
96+
197
# Upgrading from 4.x to 5.x/6.x
298

399
In this version upgrade, there are a few breaking changes. This guide should help you update your code accordingly.

0 commit comments

Comments
 (0)