diff --git a/docs/platforms/javascript/guides/ember/index.mdx b/docs/platforms/javascript/guides/ember/index.mdx index e1293b6db4ceed..7bcb5e2c99a2b7 100644 --- a/docs/platforms/javascript/guides/ember/index.mdx +++ b/docs/platforms/javascript/guides/ember/index.mdx @@ -32,7 +32,11 @@ Run the command for your preferred package manager to add the Sentry SDK to your ## Configure -Choose the features you want to configure, and this guide will show you how: +### Initialize the SDK + +Initializing the Sentry SDK enables core features such as **Error Monitoring**, **Logs**, and **Application Metrics** by default. While Sentry automatically reports errors, you'll need to send logs and metrics manually. We'll show you how that works in steps [#3](#send-logs-optional) and [#4](#send-application-metrics-optional-). + +Choose additional features you want to configure, and this guide will show you how to get set up: -### Initialize the SDK - @@ -66,8 +68,8 @@ import * as Sentry from "@sentry/ember"; Sentry.init({ dsn: "___PUBLIC_DSN___", - // ___PRODUCT_OPTION_START___ session-replay + integrations: [ Sentry.replayIntegration(), // ___PRODUCT_OPTION_START___ user-feedback @@ -78,8 +80,8 @@ Sentry.init({ // ___PRODUCT_OPTION_END___ user-feedback ], // ___PRODUCT_OPTION_END___ session-replay - // ___PRODUCT_OPTION_START___ performance + // Set tracesSampleRate to 1.0 to capture 100% // of transactions for tracing. // We recommend adjusting this value in production @@ -121,6 +123,85 @@ export default class App extends Application { +## Send Logs (Optional) + +Logs are enabled by default and let you send, view, and query logs from your app within Sentry. + + + + + +Use `Sentry.logger` to send logs at different levels, such as `info` or `warn`, and attach a message. +You can pass any attributes you want and search or filter by them later. + +See Set Up Logs for all available logging methods and the syntax for formatting messages. + + + + + +```javascript +// a simple "info" level log +Sentry.logger.info("User example action completed"); + +// "warn" log with attributes +Sentry.logger.warn("Slow operation detected", { + operation: "data_fetch", + duration: 3500, +}); + +// "error" log with attributes +Sentry.logger.error("Validation failed", { + form_field: "email", + reason: "Invalid email", +}); +``` + + + + + + +## Send Application Metrics (Optional) + +Application Metrics are enabled by default and allow you to send, view, and query various metrics from your app. + + + + + +Use `Sentry.metrics` to send counters, gauges, and distributions from your app to Sentry. +You can pass any attributes you want and search or filter by them later. + +See Set Up Metrics for all available metric types and configuration options. + + + + + +```javascript +// a simple "count" metric +Sentry.metrics.count("checkout.failed", 1) + +// "gauge" metric with one attribute +Sentry.metrics.gauge("time_since_refresh", 4, { unit: "hour" }); + +// "count" metric with multiple attributes attached +Sentry.metrics.count("api_calls", 1, { + attributes: { + endpoint: "/api/orders", + user_tier: "pro", + region: "us-west", + user_id: user.id, + order_id: order.id, + }, +}); +``` + + + + + ## Verify Your Setup Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project. @@ -211,14 +292,6 @@ export default class ApplicationController extends Controller { - - - - - - - - ### View Captured Data in Sentry Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear). @@ -233,9 +306,8 @@ Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are: - Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup -- Learn how to [manually capture errors](/platforms/javascript/guides/ember/usage/) +- Set up Agent Tracing to monitor your AI systems - Continue to [customize your configuration](/platforms/javascript/guides/ember/configuration/) -- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts diff --git a/includes/quick-start-features-expandable.mdx b/includes/quick-start-features-expandable.mdx index b901ff291b4f6b..129a7080e4e90a 100644 --- a/includes/quick-start-features-expandable.mdx +++ b/includes/quick-start-features-expandable.mdx @@ -11,8 +11,8 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo"; "profiling", "sessionReplay", "logs", - "userFeedback", - "metrics" + "metrics", + "userFeedback" ]} type="learnMore" /> @@ -21,7 +21,7 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo"; diff --git a/includes/quick-start-locate-data-expandable.mdx b/includes/quick-start-locate-data-expandable.mdx index 8cca720f1e1683..1d002c0e5a8869 100644 --- a/includes/quick-start-locate-data-expandable.mdx +++ b/includes/quick-start-locate-data-expandable.mdx @@ -1,6 +1,6 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo"; - + @@ -11,8 +11,8 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo"; "profiling", "sessionReplay", "logs", - "userFeedback", - "metrics" + "metrics", + "userFeedback" ]} type="findInSentry" /> @@ -21,7 +21,7 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo"; diff --git a/src/components/onboarding/index.tsx b/src/components/onboarding/index.tsx index a0a43af5e60e05..aece7333c4c6d6 100644 --- a/src/components/onboarding/index.tsx +++ b/src/components/onboarding/index.tsx @@ -354,7 +354,15 @@ export function OnboardingOptionButtons({ const codeContext = useContext(CodeContext); const {emit} = usePlausibleEvent(); - const normalizedOptions = initialOptions + // temporary filter to remove error-monitoring from rendering even if it is requested + const filteredOptions = initialOptions.filter(option => { + if (typeof option === 'string') { + return option !== 'error-monitoring'; + } + return true; + }); + + const normalizedOptions = filteredOptions .map(option => { if (typeof option === 'string') { return {