Skip to content
Closed
Show file tree
Hide file tree
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: 3 additions & 1 deletion develop-docs/integrations/jira/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ To enable issue-sync between Jira and a locally hosted Sentry Jira integration,
![Navigating to Connected Apps](./images/jira-setup2.png)

6. In the new modal, select JIRA for the product to install the app on (8).
7. For the "App descriptor URL" (9), use the following URL, `https://{YOUR_SENTRY_DOMAIN}/extensions/jira/descriptor/`. Note that if you are running a local devserver, `YOUR_SENTRY_DOMAIN` will be your ngrok (or other tunneling service) domain.
7. For the "App descriptor URL" (9), use the following URL, `https://{YOUR_SENTRY_DOMAIN}/extensions/jira/descriptor/`.
* Note that if you are running a local devserver, `YOUR_SENTRY_DOMAIN` will be your ngrok (or other tunneling service) domain.
* For self-hosted Sentry users: Replace `https://{YOUR_SENTRY_DOMAIN}` with your Sentry address.
![Filling out Modal](./images/jira-setup3.png)

8. Click "Install app" (10), now if you select the "Installed Apps" (11) tab next to "Settings", you should see your newly installed app listed under "Sentry" (12). (Note: that "Sentry for Jira" is the SaaS integration).
Expand Down
24 changes: 24 additions & 0 deletions docs/contributing/pages/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,36 @@ Render an expandable section.

<Expandable title="This is a title">This is some content</Expandable>

<Expandable permalink title="With Permalink">This is some content</Expandable>

<Expandable title="Warning" level="warning">This is some warning content</Expandable>

<Expandable title="Success" level="success">This is some success content</Expandable>

```markdown {tabTitle:Example}
<Expandable title="This is a title">
This is some content
</Expandable>
```

```markdown {tabTitle:Permalink}
<Expandable permalink title="With Permalink">
This is some content
</Expandable>
```

```markdown {tabTitle:Warning}
<Expandable level="warning" title="This is a title">
This is some content
</Expandable>
```

```markdown {tabTitle:Success}
<Expandable level="success" title="This is a title">
This is some content
</Expandable>
```

Attributes:

- `title` (string)
Expand Down
4 changes: 4 additions & 0 deletions docs/organization/integrations/issue-tracking/jira/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ Confirm [Sentry's IP ranges](/security-legal-pii/security/ip-ranges/) are allowe

Jira should now be authorized for all projects under your Sentry organization.

### Self-Hosted Sentry + Jira integration

To install the Jira integration with a self-hosted Sentry instance, please follow our [develop-docs](/develop-docs/integrations/jira/index.mdx/), skip to the "Installing Local Jira App" section.

## Configure

Use Jira to leverage [issue management](#issue-management), [issue syncing](#issue-sync), and receive [notifications](#issue-notifications) about changes to issue status. Additionally, add [ignored fields](#ignored-fields) to hide specified fields in the issue creation form.
Expand Down
20 changes: 20 additions & 0 deletions docs/platforms/android/enriching-events/scopes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,26 @@ Sentry.captureException(new Exception("my error"));
// --> Will have the following extra:
// { shared: 'current', global: 'data', isolation: 'data', current: 'data' }
```
```kotlin
Sentry.configureScope(ScopeType.GLOBAL) { scope ->
scope.setExtra("shared", "global")
scope.setExtra("global", "data")
}

Sentry.configureScope(ScopeType.ISOLATION) { scope ->
scope.setExtra("shared", "isolation")
scope.setExtra("isolation", "data")
}

Sentry.configureScope(ScopeType.CURRENT) { scope ->
scope.setExtra("shared", "current")
scope.setExtra("current", "data")
}

Sentry.captureException(Exception("my error"))
// --> Will have the following extra:
// { shared: 'current', global: 'data', isolation: 'data', current: 'data' }
```

## Configuring the Scope

Expand Down
40 changes: 39 additions & 1 deletion docs/platforms/java/common/enriching-events/scopes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ routes or request handlers.

## How Scopes Work

Scopes are basically a stacks of data that are attached to events. When an event is captured, the SDK will merge the data from the active scopes into the event. This allows you to attach data to events that is relevant to the context in which the event was captured.
Scopes are basically stacks of data that are attached to events. When an event is captured, the SDK will merge the data from the active scopes into the event. This allows you to attach data to events that is relevant to the context in which the event was captured.

A scope is generally valid inside of a callback or an execution context. This means that multiple parts of your application may have different scopes active at the same time. For instance, a web server might handle multiple requests at the same time, and each request may have different scope data to apply to its events.

Expand Down Expand Up @@ -54,6 +54,13 @@ Sentry.configureScope(ScopeType.ISOLATION, scope -> {
scope.setTag("my-tag", "my value");
});
```
```kotlin
Sentry.setTag("my-tag", "my value")
// Is identical to:
Sentry.configureScope(ScopeType.ISOLATION) { scope ->
scope.setTag("my-tag", "my value")
}
```

### Current Scope

Expand All @@ -70,6 +77,17 @@ Sentry.withScope(scope -> {
// this event will not have the tag:
Sentry.captureException(new Exception("my other error"));
```
```kotlin
Sentry.withScope { scope ->
// scope is the current scope inside of this callback!
scope.setTag("my-tag", "my value")
// this tag will only be applied to events captured inside of this callback
// the following event will have the tag:
Sentry.captureException(Exception("my error"))
}
// this event will not have the tag:
Sentry.captureException(Exception("my other error"))
```

You can modify the current scope via `Sentry.configureScope(ScopeType.CURRENT, scope -> { ... })`, but usually you should use `Sentry.withScope()` to interact with local scopes instead.

Expand Down Expand Up @@ -100,6 +118,26 @@ Sentry.captureException(new Exception("my error"));
// --> Will have the following extra:
// { shared: 'current', global: 'data', isolation: 'data', current: 'data' }
```
```kotlin
Sentry.configureScope(ScopeType.GLOBAL) { scope ->
scope.setExtra("shared", "global")
scope.setExtra("global", "data")
}

Sentry.configureScope(ScopeType.ISOLATION) { scope ->
scope.setExtra("shared", "isolation")
scope.setExtra("isolation", "data")
}

Sentry.configureScope(ScopeType.CURRENT) { scope ->
scope.setExtra("shared", "current")
scope.setExtra("current", "data")
}

Sentry.captureException(Exception("my error"))
// --> Will have the following extra:
// { shared: 'current', global: 'data', isolation: 'data', current: 'data' }
```

## Configuring the Scope

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,34 @@ if (span) {
}
```

### Adding attributes to all spans

To add an attribute to all spans, use the `beforeSendTransaction` callback:

```javascript
Sentry.init({
// dsn, ...
beforeSendTransaction(event) {

// set the attribute on the root span
event.contexts.trace.data = {
...event.contexts.trace.data,
myAttribute: "myValue",
}

// and on all child spans
event.spans.forEach(span => {
span.data = {
...span.data,
myAttribute: "myValue",
}
});
}
});
```



### Adding Span Operations ("op")

Spans can have an operation associated with them, which help activate Sentry identify additional context about the span. For example database related spans have the `db` span operation associated with them. The Sentry product offers additional controls, visualizations and filters for spans with known operations.
Expand Down
15 changes: 6 additions & 9 deletions docs/platforms/javascript/common/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,11 @@ You can work around our CDN bundles being blocked by [using our NPM packages](#u

<PlatformSection supported={["javascript.nextjs"]}>

<Note>
The Sentry Next.js SDK has a separate option to make setting up tunnels very
straight-forward, allowing you to skip the setup below. See
<PlatformLink to="/manual-setup/#configure-tunneling-to-avoid-ad-blockers">
Configure Tunneling to avoid Ad-Blockers
</PlatformLink>
to learn how to set up tunneling on Next.js.
</Note>
The Sentry Next.js SDK has a separate option to make setting up tunnels very
straight-forward, allowing you to skip the setup below. See <PlatformLink to="/manual-setup/#configure-tunneling-to-avoid-ad-blockers">
Configure Tunneling to avoid Ad-Blockers</PlatformLink> to learn how to set up tunneling on Next.js.

If you do not want to configure `tunnelRoute`, you can follow the guide below.

</PlatformSection>

Expand Down Expand Up @@ -543,7 +540,7 @@ shamefully-hoist=true
<PlatformSection supported={['javascript.nextjs']}>
<Expandable permalink title="Out of Memory (OOM) errors during build">
The problem here is related to memory consumption during the build process, especially when generating source maps. Here are some potential solutions and workarounds:

- Update your `@sentry/nextjs` package to the latest version.
- Increase Node.js memory limit: You can try increasing the memory limit for Node.js during the build process. Add this to your build command: `NODE_OPTIONS="--max-old-space-size=8192" next build`. This flag will increase the memory available to the node process to 8 GB. We have found that Next.js consumes around 4 GB in most cases. Decrease the size depending on your memory availability.
- Disable source maps entirely: As a last resort, you can disable source map generation completely:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ When using these functions, you should ensure that the provided timestamps are c

<PlatformContent includePath="performance/connect-errors-spans" />

<PlatformContent includePath="performance/improving-data" />

## Distributed Tracing

In order to use distributed tracing with the Native SDK, follow the <PlatformLink to="/tracing/trace-propagation/custom-instrumentation/">custom instrumentation</PlatformLink> steps.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
},
"devDependencies": {
"@babel/preset-typescript": "^7.15.0",
"@codecov/nextjs-webpack-plugin": "^1.0.0",
"@codecov/nextjs-webpack-plugin": "^1.8.0",
"@spotlightjs/spotlight": "^2.5.0",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
Expand Down
81 changes: 81 additions & 0 deletions platform-includes/performance/improving-data/native.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
## Improving Data on Transactions and Spans
You can add Data Attributes to both Spans and Transactions. This data is visible in the trace explorer in Sentry.
The data must be of type `sentry_value_t`, which can store:
* 32-bit signed integers,
* double-precision floating-points,
* null-terminated strings, as well as
* lists and string-keyed maps containing `sentry_value_t` entries

### Adding Data Attributes to Transactions

You can add data attributes to your transactions using the following API:

```c
sentry_transaction_context_t *tx_ctx =
sentry_transaction_context_new("processOrderBatch()", "task");
sentry_transaction_t *tx =
sentry_transaction_start(tx_ctx, sentry_value_new_null());

sentry_transaction_set_data(tx, "my-data-attribute-1",
sentry_value_new_string("value1"));
sentry_transaction_set_data(tx, "my-data-attribute-2",
sentry_value_new_int32(42));
sentry_transaction_set_data(tx, "my-data-attribute-3",
sentry_value_new_double(3.14));
sentry_transaction_set_data(tx, "my-data-attribute-4",
sentry_value_new_bool(true));

sentry_value_t value_list = sentry_value_new_list();
sentry_value_append(value_list, sentry_value_new_string("value1"));
sentry_value_append(value_list, sentry_value_new_int32(42));
sentry_value_append(value_list, sentry_value_new_double(3.14));
sentry_value_append(value_list, sentry_value_new_bool(true));

sentry_transaction_set_data(tx, "my-data-attribute-5", value_list);

sentry_value_t value_object = sentry_value_new_object();
sentry_value_set_by_key(value_object, "key_1", sentry_value_new_string("value1"));
sentry_value_set_by_key(value_object, "key_2", sentry_value_new_int32(42));
sentry_value_set_by_key(value_object, "key_3", sentry_value_new_double(3.14));
sentry_value_set_by_key(value_object, "key_4", sentry_value_new_bool(true));

sentry_transaction_set_data(tx, "my-data-attribute-6", value_object);
```

### Adding Data Attributes to Spans

You can add data attributes to your spans using the following API:

```c
sentry_transaction_context_t *tx_ctx =
sentry_transaction_context_new("processOrderBatch()", "task");
sentry_transaction_t *tx =
sentry_transaction_start(tx_ctx, sentry_value_new_null());
sentry_span_t *span =
sentry_transaction_start_child(tx, "task", "operation");

sentry_span_set_data(span, "my-data-attribute-1",
sentry_value_new_string("value1"));
sentry_span_set_data(span, "my-data-attribute-2",
sentry_value_new_int32(42));
sentry_span_set_data(span, "my-data-attribute-3",
sentry_value_new_double(3.14));
sentry_span_set_data(span, "my-data-attribute-4",
sentry_value_new_bool(true));

sentry_value_t value_list = sentry_value_new_list();
sentry_value_append(value_list, sentry_value_new_string("value1"));
sentry_value_append(value_list, sentry_value_new_int32(42));
sentry_value_append(value_list, sentry_value_new_double(3.14));
sentry_value_append(value_list, sentry_value_new_bool(true));

sentry_span_set_data(span, "my-data-attribute-5", value_list);

sentry_value_t value_object = sentry_value_new_object();
sentry_value_set_by_key(value_object, "key_1", sentry_value_new_string("value1"));
sentry_value_set_by_key(value_object, "key_2", sentry_value_new_int32(42));
sentry_value_set_by_key(value_object, "key_3", sentry_value_new_double(3.14));
sentry_value_set_by_key(value_object, "key_4", sentry_value_new_bool(true));

sentry_span_set_data(span, "my-data-attribute-6", value_object);
```
2 changes: 1 addition & 1 deletion src/build/resolveOpenAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {DeRefedOpenAPI} from './open-api/types';

// SENTRY_API_SCHEMA_SHA is used in the sentry-docs GHA workflow in getsentry/sentry-api-schema.
// DO NOT change variable name unless you change it in the sentry-docs GHA workflow in getsentry/sentry-api-schema.
const SENTRY_API_SCHEMA_SHA = 'ab06b0e825d0dd4f350fd269fefd3cc24ed121e2';
const SENTRY_API_SCHEMA_SHA = '421589ca453b898372204963465c7d856feec7c7';

const activeEnv = process.env.GATSBY_ENV || process.env.NODE_ENV || 'development';

Expand Down
14 changes: 4 additions & 10 deletions src/components/alert/index.tsx → src/components/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import {
InfoCircledIcon,
} from '@radix-ui/react-icons';

// explicitly not usig CSS modules here
// because there's some prerendered content that depends on these exact class names
import './styles.scss';
import {Callout} from './callout';

type AlertProps = {
children?: ReactNode;
Expand All @@ -29,13 +27,9 @@ export function Alert({title, children, level = 'info'}: AlertProps) {
}

return (
<div className={`alert ${'alert-' + level}`} role="alert">
<Icon className="alert-icon" />
<div className="alert-content">
{title && <h5 className="alert-header">{title}</h5>}
<div className="alert-body content-flush-bottom">{children}</div>
</div>
</div>
<Callout role="alert" level={level} Icon={Icon} title={title}>
{children}
</Callout>
);
}

Expand Down
Loading
Loading