Skip to content

Commit

Permalink
Merge branch 'master' into patch-233
Browse files Browse the repository at this point in the history
  • Loading branch information
lizokm authored Oct 26, 2023
2 parents f3cb72a + 7a28d08 commit 088a1b8
Show file tree
Hide file tree
Showing 64 changed files with 208 additions and 302 deletions.
13 changes: 11 additions & 2 deletions src/components/platformSdkDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, {Fragment} from 'react';
import styled from '@emotion/styled';
import {graphql, useStaticQuery} from 'gatsby';

Expand All @@ -14,6 +14,7 @@ const query = graphql`
url
repoUrl
version
apiDocsUrl
}
}
}
Expand Down Expand Up @@ -79,8 +80,16 @@ export function PlatformSdkDetail() {
<dd>{packageData.version}</dd>
<dt>Repository:</dt>
<dd>
<SmartLink to={packageData.repoUrl} />
<SmartLink to={packageData.repoUrl} target="_blank" />
</dd>
{packageData.apiDocsUrl && (
<Fragment>
<dt>API Documentation:</dt>
<dd>
<SmartLink to={packageData.apiDocsUrl} target="_blank" />
</dd>
</Fragment>
)}
</dl>
</PackageDetail>
);
Expand Down
1 change: 1 addition & 0 deletions src/gatsby/createSchemaCustomization/packageSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const getPackageTypeDefs = () => {
url: String
repoUrl: String!
version: String!
apiDocsUrl: String
files: [PackageFile!]
}
`,
Expand Down
1 change: 1 addition & 0 deletions src/gatsby/sourceNodes/appRegistryNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const sourceAppRegistryNodes = async ({
version: appData.version,
url: appData.package_url,
repoUrl: appData.repo_url,
apiDocsUrl: appData.api_docs_url,
files: appData.files
? Object.entries(appData.files).map(([fileName, fileData]: [string, any]) =>
fileData.checksums
Expand Down
2 changes: 2 additions & 0 deletions src/gatsby/sourceNodes/packageRegistryNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const sourcePackageRegistryNodes = async ({
version: sdkData.version,
url: sdkData.package_url,
repoUrl: sdkData.repo_url,
apiDocsUrl: sdkData.api_docs_url,
files: sdkData.files
? Object.entries(sdkData.files).map(([fileName, fileData]: [string, any]) =>
fileData.checksums
Expand All @@ -34,6 +35,7 @@ export const sourcePackageRegistryNodes = async ({
};

const content = JSON.stringify(data);

const nodeMeta = {
id: sdkName,
parent: null,
Expand Down
1 change: 1 addition & 0 deletions src/gatsby/utils/genericRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type VersionData = {
name: string;
repo_url: string;
version: string;
api_docs_url?: string;
files?: {
[name: string]: FileData;
};
Expand Down
2 changes: 1 addition & 1 deletion src/gatsby/utils/resolveOpenAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {promises as fs} from 'fs';

// 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 = '8a5046b1467df8cd7ee2070de2876691fd3590ca';
const SENTRY_API_SCHEMA_SHA = '4462405412748e2b763ff53c4c1ceb5e722c2b23';

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

Expand Down
2 changes: 1 addition & 1 deletion src/includes/opentelemetry-available.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Sentry can integrate with <strong>OpenTelemetry</strong>. You can find more
information about it{" "}
<PlatformLink to="/performance/instrumentation/opentelemetry/">
<strong>here</strong>
here
</PlatformLink>
.
</Alert>
6 changes: 1 addition & 5 deletions src/platform-includes/configuration/config-intro/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ sentry_sdk.init(
dsn="___PUBLIC_DSN___",
max_breadcrumbs=50,
debug=True,

# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production,
traces_sample_rate=1.0,
enable_tracing=True,

# By default the SDK will try to use the SENTRY_RELEASE
# environment variable, or infer a git commit
Expand Down
6 changes: 2 additions & 4 deletions src/platform-includes/getting-started-config/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import sentry_sdk
sentry_sdk.init(
dsn="___PUBLIC_DSN___",

# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production.
traces_sample_rate=1.0,
# Enable performance monitoring
enable_tracing=True,
)
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Features:
- [Breadcrumbs](/platforms/javascript/enriching-events/breadcrumbs/) created for outgoing HTTP request with XHR and Fetch, and console logs
- [Release health](/product/releases/health/) for tracking crash-free users and sessions
- Automatic [Performance Monitoring](/product/performance/) for both the client and server
- Errors and Performance support for [Middleware](https://vercel.com/docs/concepts/functions/edge-middleware) and [Edge routes](https://vercel.com/docs/concepts/functions/edge-functions) in Vercel's edge runtime. Due to complexities with the runtime, some features of errors like stack traces may not not be as expected. Requires <code>sentry.edge.config.js</code>, more info [here](/platforms/javascript/guides/nextjs/manual-setup/#create-initialization-config-files)
- Errors and Performance support for [Middleware](https://vercel.com/docs/concepts/functions/edge-middleware) and [Edge routes](https://vercel.com/docs/concepts/functions/edge-functions) in Vercel's edge runtime. Due to complexities with the runtime, some features of errors like stack traces may not be as expected. Requires <code>sentry.edge.config.js</code>, more info [here](/platforms/javascript/guides/nextjs/manual-setup/#create-initialization-config-files)

<Note>

Expand Down
16 changes: 2 additions & 14 deletions src/platform-includes/performance/configure-sample-rate/python.mdx
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
Performance Monitoring is available for the Sentry Python SDK version ≥ 0.11.2.
Activate performance monitoring by setting `enable_tracing` to `True`. Performance Monitoring is available for the Sentry Python SDK version ≥ 0.11.2.

<SignInNote />

```python
import sentry_sdk

def traces_sampler(sampling_context):
# ...
# return a number between 0 and 1 or a boolean

sentry_sdk.init(
dsn="___PUBLIC_DSN___",

# To set a uniform sample rate
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production,
traces_sample_rate=1.0,

# Alternatively, to control sampling dynamically
traces_sampler=traces_sampler
enable_tracing=True
)
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import sentry_sdk

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
traces_sample_rate=1.0,
enable_tracing=True,

# set the instrumenter to use OpenTelemetry instead of Sentry
instrumenter="otel",
)
Expand Down
Empty file.
5 changes: 5 additions & 0 deletions src/platform-includes/profiling/index/preface/go.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Note>

Go Profiling is currently in alpha. Alpha features are still in progress and may have bugs. We recognize the irony.

</Note>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Note>

React Native Profiling is currently in beta. Beta features are still in progress and may have bugs. We recognize the irony.

</Note>
5 changes: 5 additions & 0 deletions src/platform-includes/profiling/index/preface/ruby.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Note>

Ruby Profiling is currently in beta. Beta features are still in progress and may have bugs. We recognize the irony.

</Note>
12 changes: 9 additions & 3 deletions src/platforms/common/performance/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,18 @@ Automatic instrumentation for monitoring the performance of your application is

</PlatformSection>

## Configure the Sample Rate
## Configure

<PlatformSection notSupported={["python"]}>
First, enable tracing and configure the sampling rate for transactions. Set the sample rate for your transactions by either:

- Setting a uniform sample rate for all transactions using the <PlatformIdentifier name="traces-sample-rate" /> option in your SDK config to a number between `0` and `1`. (For example, to send 20% of transactions, set <PlatformIdentifier name="traces-sample-rate" /> to `0.2`.)
- Controlling the sample rate based on the transaction itself and the context in which it's captured, by providing a function to the <PlatformIdentifier name="traces-sampler" /> config option.

The two options are meant to be mutually exclusive. If you set both, <PlatformIdentifier name="traces-sampler" /> will take precedence.

</PlatformSection>

<PlatformSection supported={["native"]}>

<Alert level="info">
Expand All @@ -86,8 +89,9 @@ The Native SDK doesn't currently support sampling functions (<PlatformIdentifier

<PlatformContent includePath="performance/configure-sample-rate" />

Learn more about how the options work in <PlatformLink to="/configuration/sampling/">Sampling Transactions</PlatformLink>.
Learn more about performance monitoring <PlatformLink to="/configuration/options/#tracing-options">options</PlatformLink>, or how to <PlatformLink to="/configuration/sampling/#sampling-transaction-events">sample transactions</PlatformLink>.

<PlatformSection notSupported={["python"]}>
## Verify

<PlatformSection supported={["react-native", "java.spring", "java.spring-boot", "android", "javascript", "apple", "dart", "rust"]}>
Expand Down Expand Up @@ -178,6 +182,8 @@ After you set up Relay, you should see a dramatic improvement to the impact on y

</PlatformSection>

**Next Steps:**
</PlatformSection>

## Next Steps

<PageGrid />
30 changes: 1 addition & 29 deletions src/platforms/common/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,7 @@ notSupported:
description: "Learn how to enable profiling in your app if it is not already set up."
---

<PlatformSection supported={["react-native"]}>

<Note>

React Native Profiling is currently in beta. Beta features are still in progress and may have bugs. We recognize the irony.

</Note>

</PlatformSection>

<PlatformSection supported={["go"]}>

<Note>

Go Profiling is currently in alpha. Alpha features are still in progress and may have bugs. We recognize the irony.

</Note>

</PlatformSection>

<PlatformSection supported={["ruby"]}>

<Note>

Ruby Profiling is currently in beta. Beta features are still in progress and may have bugs. We recognize the irony.

</Note>

</PlatformSection>
<PlatformContent includePath="profiling/index/preface" />

With [profiling](/product/profiling/), Sentry allows you to collect and analyze performance profiles from real user devices in production to give you a complete picture of how your application performs in a variety of environments.

Expand Down
2 changes: 2 additions & 0 deletions src/platforms/python/integrations/aiohttp/aiohttp-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ from sentry_sdk.integrations.aiohttp import AioHttpIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Enable performance monitoring
enable_tracing=True,
integrations=[
AioHttpIntegration(),
],
Expand Down
5 changes: 2 additions & 3 deletions src/platforms/python/integrations/aiohttp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ import sentry_sdk

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
enable_tracing=True
)
```

Expand Down Expand Up @@ -85,6 +83,7 @@ from sentry_sdk.integrations.aiohttp import AioHttpIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
enable_tracing=True,
integrations=[
AioHttpIntegration(
transaction_style="method_and_path_pattern",
Expand Down
3 changes: 0 additions & 3 deletions src/platforms/python/integrations/ariadne/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ from sentry_sdk.integrations.ariadne import AriadneIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
integrations=[
AriadneIntegration(),
],
Expand Down
6 changes: 2 additions & 4 deletions src/platforms/python/integrations/arq/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ pip install --upgrade "sentry-sdk[arq]"

<SignInNote />

Add `ArqIntegration()` to your `integrations` list:
Add `ArqIntegration()` to your `integrations` list and make sure that tracing is enabled:

```python
import sentry_sdk
from sentry_sdk.integrations.arq import ArqIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
enable_tracing=True,
integrations=[
ArqIntegration(),
],
Expand Down
5 changes: 1 addition & 4 deletions src/platforms/python/integrations/asgi/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ from my_asgi_app import app

sentry_sdk.init(
dsn="___PUBLIC_DSN___",

# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
enable_tracing=True
)

app = SentryAsgiMiddleware(app)
Expand Down
8 changes: 3 additions & 5 deletions src/platforms/python/integrations/asyncio/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: asyncio
description: "Learn about the asyncio integration and how it adds support for applications the asyncio module."
---

The `AsyncioIntegration` integrates with applications doing concurrent code execution using Pythons [asyncio](https://docs.python.org/3/library/asyncio.html) module.
The `AsyncioIntegration` integrates with applications doing concurrent code execution using Python's [asyncio](https://docs.python.org/3/library/asyncio.html) module.

## Install

Expand All @@ -13,7 +13,7 @@ pip install --upgrade 'sentry-sdk'

## Configure

Add `AsyncioIntegration()` to your list of `integrations` and be sure to call `sentry_sdk.init()` at the beginning of your async loop:
Add `AsyncioIntegration()` to your list of `integrations`, enable tracing and be sure to call `sentry_sdk.init()` at the beginning of your async loop:

<SignInNote />

Expand All @@ -24,9 +24,7 @@ from sentry_sdk.integrations.asyncio import AsyncioIntegration
async def main():
sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
enable_tracing=True,
integrations=[
AsyncioIntegration(),
],
Expand Down
8 changes: 3 additions & 5 deletions src/platforms/python/integrations/asyncpg/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: asyncpg
description: "Learn about importing the asyncpg integration and how it captures queries from asyncpg."
---

The asyncpg integration captures queries from
The `AsyncPGIntegration` captures queries from
[asyncpg](https://github.com/MagicStack/asyncpg), which can be viewed in Sentry's **Performance** page.

## Install
Expand All @@ -16,7 +16,7 @@ pip install --upgrade sentry-sdk[asyncpg]

## Configure

Add `AsyncPGIntegration()` to your `integrations` list:
Add `AsyncPGIntegration()` to your `integrations` list, and enable tracing:

<SignInNote />

Expand All @@ -26,9 +26,7 @@ from sentry_sdk.integrations.asyncpg import AsyncPGIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
traces_sample_rate=1.0,
enable_tracing=True,
integrations=[
AsyncPGIntegration(),
],
Expand Down
Loading

0 comments on commit 088a1b8

Please sign in to comment.