You can see links from stack frames to their source repository in Error Tracking.
- Navigate to APM > Error Tracking.
- Click on an issue. The Issue Details panel appears on the right.
- Under Latest Event, if you’re using the GitHub or GitLab integrations, click Connect to preview on stack frames. You can see inline code snippets directly in the stack trace. Otherwise, you can click the View button on the right of a frame or select View file, View Git blame, or View commit to be redirected to your source code management tool.
You can see links from stack frames to their source repository in Error Tracking for RUM.
Source code integration is supported for the following RUM platforms when sourcemaps or debug symbols are uploaded with Git metadata:
Note: Source code integration is not supported for iOS RUM errors.
- Navigate to Digital Experience > Error Tracking.
- Click on an issue. The Issue Details panel appears on the right.
- Under Latest Available Errors or error samples, if you’re using the GitHub or GitLab integrations, click Connect to preview on stack frames. You can see inline code snippets directly in the stack trace. Otherwise, you can click the View button on the right of a frame or select View file, View Git blame, or View commit to be redirected to your source code management tool.
You can see source code previews directly in Continuous Profiler flame graphs.
- Navigate to APM > Profiles > Explorer.
- Select the service you want to investigate.
- Hover your cursor over a method in the flame graph.
- Press
Opt (on macOS) or Ctrl (on other operating systems) to lock the tooltip so you can interact with its contents. - If prompted, click Connect to preview. The first time you do this for a repository, you will be redirected to GitHub to Authorize the Datadog application.
- After authorizing, the source code preview appears in the tooltip.
- Click the file link in the tooltip to open the full source code file in your repository.
You can see links from errors in your Lambda functions’ associated stack traces to their source repository in Serverless Monitoring.
- Navigate to Infrastructure > Serverless and click on the AWS tab.
- Click on a Lambda function and click the Open Trace button for an invocation with an associated stack trace.
- If you’re using the GitHub or GitLab integrations, click Connect to preview on stack frames. You can see inline code snippets directly in the stack trace. Otherwise, you can click the View button on the right of a frame or select View file, View Git blame, or View commit to be redirected to your source code management tool.
You can see links from failed test runs to their source repository in Test Optimization.
- Navigate to Software Delivery > Test Optimization > Test Runs and select a failed test run.
- If you’re using the GitHub or GitLab integrations, click Connect to preview on stack frames. You can see inline code snippets directly in the stack trace. Otherwise, you can click the View button on the right of a frame or select View file, View Git blame, or View commit to be redirected to your source code management tool.
For more information, see Enhancing Developer Workflows with Datadog.
You can see links from failed Static Analysis and Software Composition Analysis scans to their source repository in Code Security.
- Navigate to Software Delivery > Code Security and select a repository.
- In the Code Vulnerabilities or Code Quality view, click on a code vulnerability or violation. In the Details section, if you’re using the GitHub, GitLab, or Azure DevOps integrations, click Connect to preview. You can see inline code snippets highlighting the exact lines of code that triggered the vulnerability or violation. Otherwise, you can click the View button on the right of a frame or select View file, View Git blame, or View commit to be redirected to your source code management tool.
For more information, see the Code Security documentation.
You can see links from errors in your security signals’ associated stack traces to their source repository in App and API Protection Monitoring.
- Navigate to Security > App and API Protection and select a security signal.
- Scroll down to the Traces section on the Related Signals tab and click on an associated stack trace.
- If you’re using the GitHub or GitLab integrations, click Connect to preview on stack frames. You can see inline code snippets directly in the stack trace. Otherwise, you can click the View button on the right of a frame or select View file, View Git blame, or View commit to be redirected to your source code management tool.
You can see full source code files in Dynamic Instrumentation when creating or editing an instrumentation (dynamic log, metric, span, or span tags).
Create new instrumentation
- Navigate to APM > Dynamic Instrumentation.
- Select Create New Instrumentation and choose a service to instrument.
- Search for and select a source code filename or method.
View or edit instrumentation
- Navigate to APM > Dynamic Instrumentation.
- Select an existing instrumentation from the list, then click View Events.
- Select the instrumentation card to view its location in the source code.
For more information, see the Dynamic Instrumentation documentation.