오류를 재현하는 데 시간을 낭비하지 마세요. 오류까지 이어진 코드 줄, 사용자 동작, 함수 등 코드 수준 컨텍스트를 확인하여 빠르게 디버그하고 수정할 수 있습니다.
오류 모니터링
가장 중요한 코드 관련 문제를 해결할 수 있는 실질적인 인사이트를 제공합니다. 맞춤형 컨텍스트를 통해 모든 언어와 프레임워크에서 오류를 추적하고, 디버그하며, 문제의 근본 원인에 매번 도달할 수 있도록 지원합니다.
400만 명의 개발자가 선택합니다.
- GitHub
- Disney
- Atlassian
- Linear
- Vercel
- Cloudflare
- Slack
- Metronome
- Autodesk
- Microsoft
- Instacart
- Lyft
- Bolt
- Monday
- Cursor
- Anthropic
- Factory AI
- Sentry
- Baseten
- Runlayer
- Convex
Sentry 시작하기는 간단합니다
모든 기술을 지원합니다(지원하지 않는 기술 말고).
단 몇 줄의 코드로 시작하세요.
가입하고 단 한 줄의 코드로 Sentry를 설치:
npx @sentry/wizard@latest -i nextjsSentry Go SDK를 가져오세요:
go get "github.com/getsentry/sentry-go"구성은 애플리케이션 라이프사이클에서 가능한 한 빨리 수행해야 합니다:
package main
import (
"log"
"time"
"github.com/getsentry/sentry-go"
)
func main() {
err := sentry.Init(sentry.ClientOptions{
Dsn: "https://<key>@sentry.io/<project>",
EnableTracing: true,
TracesSampleRate: 1.0,
TracesSampler: sentry.TracesSampler(func(ctx sentry.SamplingContext) float64 {
if ctx.Span.Name == "GET /health" {
return 0.0
}
return 1.0
}),
})
if err != nil {
log.Fatalf("sentry.Init: %s", err)
}
defer sentry.Flush(2 * time.Second)
}한 줄의 코드로 설치:
npx @sentry/wizard@latest -i angularSentry 종속성을 추가하세요:
dotnet add package Sentry.AspNetCoreappsettings.json에서 Sentry를 구성하세요:
"Sentry": {
"Dsn": "https://examplePublicKey@o0.ingest.sentry.io/0",
"Debug": true,
},그런 다음 UseSentry를 호출하여 SDK를 추가하세요:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
// 다음 줄을 추가하세요:
webBuilder.UseSentry();
});다음 명령어를 실행하여 Sentry의 Astro 통합을 설치하고 등록하세요:
npx astro add @sentry/astroastro.config.mjs 파일에 DSN과 프로젝트 구성을 추가하세요:
import { defineConfig } from "astro/config";
import sentry from "@sentry/astro";
export default defineConfig({
integrations: [
sentry({
dsn: "__DSN__",
sourceMapsUploadOptions: {
project: "your-project-slug",
authToken: process.env.SENTRY_AUTH_TOKEN,
},
tracesSampleRate: 1.0,
}),
],
});NuGet 패키지를 설치하여 Sentry 종속성을 추가하세요:
dotnet add package SentryProgram.cs/Program.fs의 Main 메서드에서 가능한 한 빨리 SDK를 초기화하세요:
using (SentrySdk.Init(o => {
o.Dsn = "https://<key>@sentry.io/<project>";
o.Debug = true;
o.TracesSampleRate = 1.0; }))
{
// 앱 코드는 여기에 작성합니다 - Disposing 시 이벤트가 플러시됩니다
}Sentry JavaScript SDK를 가져오세요:
<script src="https://browser.sentry-cdn.com/<VERSION>/bundle.min.js"></script>DSN을 구성하세요:
Sentry.init({ dsn: 'https://<key>@sentry.io/<project>',
integrations: [Sentry.browserTracingIntegration()],
tracesSampleRate: 1.0,
tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],
});Composer를 사용하여 sentry/sentry-laravel 패키지를 설치하세요:
composer require sentry/sentry-laravelbootstrap/app.php에 Sentry 보고를 추가하세요:
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Sentry\Laravel\Integration;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
})
->withExceptions(function (Exceptions $exceptions) {
Integration::handles($exceptions);
})->create();config/sentry.php에서 Sentry Tracing을 활성화하세요:
'traces_sample_rate' => 0.2,
'traces_sampler' => function (\Sentry\Tracing\SamplingContext $context): float {
// 0과 1 사이의 숫자를 반환합니다
},다음 Artisan 명령어를 실행하여 Sentry DSN을 구성하세요:
php artisan sentry:publish --dsn=<paste-your-DSN-here>Composer를 사용하여 sentry/sentry 패키지를 설치하세요:
composer require sentry/sentry애플리케이션 시작 시 발생하는 모든 오류를 캡처하려면 Sentry PHP SDK를 가능한 한 빨리 초기화해야 합니다:
\Sentry\init(['dsn' => 'https://<key>@sentry.io/<project>',
'traces_sample_rate' => 0.2,
'traces_sampler' => function (\Sentry\Tracing\SamplingContext $context): float {
// 0과 1 사이의 숫자를 반환합니다
}, ]);Sentry Python SDK를 가져오세요:
pip install --upgrade sentry-sdkDSN을 구성하세요:
import sentry_sdk
sentry_sdk.init(
"https://<key>@sentry.io/<project>",
enable_tracing=True,
traces_sample_rate=1.0,
)Sentry React SDK를 가져오세요:
npm install @sentry/reactDSN을 구성하세요:
import React from "react";
import ReactDOM from "react-dom";
import * as Sentry from "@sentry/react";
import App from "./App";
Sentry.init({
dsn: "https://<key>@sentry.io/<project>",
integrations: [
Sentry.browserTracingIntegration(),
Sentry.reactRouterV6BrowserTracingIntegration({
useEffect: React.useEffect,
useLocation,
useNavigationType,
createRoutesFromChildren,
matchRoutes,
}),
],
tracesSampleRate: 1.0,
tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],
});
ReactDOM.render(<App />, document.getElementById("root"));Gemfile에 sentry-ruby 젬을 추가하세요:
gem "sentry-ruby"DSN을 구성하세요:
Sentry.init do |config|
config.dsn = 'https://<key>@sentry.io/<project>'
config.traces_sample_rate = 1.0
config.traces_sampler = lambda do |sampling_context|
true
end
endSDK를 사용하려면 Solid 앱을 렌더링하기 전에 Solid 진입점 index.jsx에서 Sentry를 초기화하세요:
import * as Sentry from "@sentry/solid";
import { useBeforeLeave, useLocation } from "@solidjs/router";
import { render } from "solid-js/web";
import App from "./app";
Sentry.init({
dsn: "__DSN__",
integrations: [Sentry.browserTracingIntegration()],
tracesSampleRate: 1.0,
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
});
const app = document.getElementById("app");
if (!app) throw new Error("No #app element found in the DOM.");
render(() => <App />, app)Sentry Java SDK를 가져오세요:
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry-spring-boot-starter</artifactId>
<version><VERSION></version>
</dependency>application.properties에서 DSN을 구성하세요:
sentry.dsn=https://<key>@sentry.io/<project>
sentry.traces-sample-rate=1.0SDK를 사용하려면 Svelte 앱을 부팅하기 전에 Svelte 진입점 main.js에서 Sentry를 초기화하세요:
import App from "./App.svelte";
import * as Sentry from "@sentry/svelte";
Sentry.init({
dsn: "__DSN__",
release: "my-project-name@2.3.12",
integrations: [Sentry.browserTracingIntegration()],
tracesSampleRate: 1.0,
tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],
});
const app = new App({
target: document.getElementById("app"),
});
export default app;Sentry를 Xcode 프로젝트에 통합하려면 Podfile에 지정한 후 pod install을 실행하세요:
platform :ios, '9.0'
use_frameworks!
target 'YourApp' do
pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '<VERSION>'
end앱 라이프사이클에서 가능한 한 빨리, 예를 들어 AppDelegate의 application:didFinishLaunchingWithOptions 메서드에서 SDK를 초기화하세요:
import Sentry
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
SentrySDK.start { options in
options.dsn = "https://<key>@sentry.io/<project>"
options.debug = true
options.tracesSampleRate = 1.0
}
return true
}Sentry Vue SDK를 가져오세요:
npm install @sentry/vueDSN을 구성하세요:
import { createApp } from "vue";
import * as Sentry from "@sentry/vue";
const app = createApp({
// ...
});
Sentry.init({
app,
dsn: "https://<key>@sentry.io/<project>",
integrations: [Sentry.browserTracingIntegration()],
tracesSampleRate: 1.0,
tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],
});
app.mount("#app");다음 명령어를 실행하여 Sentry에 가입하고 설치하세요:
brew install getsentry/tools/sentry-wizard && sentry-wizard -i android@getsentry에서 제공하는 이슈의 세부 정보 양은 정말 미친 수준이야
-브라우저 정보
-특정 코드 라인 참조
-(백엔드까지 추적 가능한) 특정 오류
이건 세션 리플레이를 포함하지 않고도 이 정도 정보량이라고!
제일 놀라운 건 이 버그가 몇 달 동안 있었을 수도 있는데 전혀 몰랐다는 거예요.
이제 Sentry를 사용하면 몰랐던 작은 문제들까지 바로 잡을 수 있어 궁극적으로 더 나은 UX를 제공한다는 것을 깨닫기 시작했어요.
드디어 개인 사이트에 @getsentry를 연동했는데, 왜 이렇게 늦게 했는지 모르겠어요. 진짜 대단해요.