Skip to content
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1ff85d8
Document Code Intelligence-powered Code Origin
flushentitypacket Jul 22, 2026
bfcdfcd
Rename to Code Origin powered by Source Code Integration
flushentitypacket Jul 23, 2026
6f1333f
Consolidate Source Code Integration pathway into an Alternative Setup…
flushentitypacket Jul 23, 2026
2714eb7
Reframe SCI section as baseline coverage, not an alternative setup
flushentitypacket Jul 23, 2026
5b4d60d
Drop the "required for code previews" qualifier
flushentitypacket Jul 23, 2026
938c99b
Rename section to "Code Origin coverage via Source Code Integration"
flushentitypacket Jul 23, 2026
181f501
Simplify SCI coverage section, drop per-language bullet list
flushentitypacket Jul 23, 2026
27dbfce
Add Go tab to compatibility requirements
flushentitypacket Jul 23, 2026
9b68ded
Lowercase "custom" in Go frameworks list
flushentitypacket Jul 23, 2026
0394daa
Fix style guide issues: temporal words and dash spacing
flushentitypacket Jul 23, 2026
cc0e9be
Update content/en/tracing/code_origin/_index.md
flushentitypacket Jul 23, 2026
13da3a8
Update content/en/tracing/code_origin/_index.md
flushentitypacket Jul 23, 2026
037a360
Address Vale warnings: replace "via" and fix heading/sentence length
flushentitypacket Jul 23, 2026
9356b39
Shorten Prerequisites sentence to reduce Vale sentence-length notice
flushentitypacket Jul 23, 2026
e69789e
Fix unresolved reference-style link inside Go compatibility tab
flushentitypacket Jul 23, 2026
101e442
Remove Kafka/sarama from Go frameworks list
flushentitypacket Jul 23, 2026
fa2f57e
Move SCI coverage note under Enable Code Origin section
flushentitypacket Jul 23, 2026
40bc743
Update content/en/tracing/code_origin/_index.md
flushentitypacket Jul 24, 2026
16e1385
Update content/en/tracing/code_origin/_index.md
flushentitypacket Jul 24, 2026
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
27 changes: 23 additions & 4 deletions content/en/tracing/code_origin/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@
In Trace Explorer, select a span from an enabled service to see Code Origin details on the Overview tab:
{{< img src="tracing/code_origin/code_origin_details_spotlight.png" alt="Code Origin Details" style="width:100%;">}}


## Getting started

### Prerequisites
- [Datadog APM][6] is configured to capture spans.
- [Source Code Integration][7] is enabled (required for code previews).
- [Source Code Integration][7] is enabled.
- Your service meets the [compatibility requirements](#compatibility-requirements).

### Compatibility requirements
Expand Down Expand Up @@ -93,11 +92,25 @@

{{% /tab %}}

{{% tab "Go" %}}

Go services get Code Origin data through [Source Code Integration](#code-origin-coverage-through-source-code-integration) rather than the SDK flag.

| Requirement | Frameworks |
|---|---|
| [Source Code Integration](/integrations/guide/source-code-integration/) enabled | Custom spans, gRPC servers, Gin, Chi, Echo, Fiber, gorilla/mux, OpenTelemetry, OpenTracing |

{{% /tab %}}

{{% /tabs %}}

### Enable Code Origin

Run your service with the following environment variable:
Source Code Integration alone can infer some Code Origin details automatically, even for services that don't meet the [compatibility requirements](#compatibility-requirements). See [Code Origin coverage through Source Code Integration](#code-origin-coverage-through-source-code-integration).

Enabling the SDK flag for a compatible language and framework gets you full tracer-instrumented coverage.

To enable through the SDK, run your service with the following environment variable:

```shell
export DD_CODE_ORIGIN_FOR_SPANS_ENABLED=true
Expand Down Expand Up @@ -145,7 +158,7 @@
### Code Origin section is missing

- Verify Code Origin is [enabled](#enable-code-origin) in your SDK configuration.
- Confirm that your service meets all [compatibility requirements](#compatibility-requirements) (that is, service language, supported frameworks, and minimum tracer version).
- Confirm that your service meets all [compatibility requirements](#compatibility-requirements), including service language, supported frameworks, and minimum tracer version. If it doesn't, you might still get some Code Origin data automatically if the source code repository is linked in Datadog. See [Code Origin coverage through Source Code Integration](#code-origin-coverage-through-source-code-integration).
- For most services, Code Origin data is captured for [service entry spans][12] only. You can filter to "Service Entry Spans" in the [APM Trace Explorer][1].

{{< img src="tracing/code_origin/code_origin_service_entry_spans_filter.png" alt="Code Origin - Search for Service Entry Spans" style="width:100%;">}}
Expand All @@ -156,6 +169,12 @@
- For transpiled Node.js applications (for example, TypeScript), make sure to generate and publish source maps with the deployed application, run Node.js with the [`--enable-source-maps`][10] flag, and use v5.59.0 or newer of the Node.js tracer. Otherwise, code previews will not work. See the Node.js [Source Code Integration][9] documentation for more details.
- Code Origin is designed to reference user code only, but in some cases, third-party code references may slip through. You can report these cases to [Datadog support][13] and help improve these references.

## Code Origin coverage through Source Code Integration

Check warning on line 172 in content/en/tracing/code_origin/_index.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.headings

'Code Origin coverage through Source Code Integration' should use sentence-style capitalization.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this heading as-is intentionally. Vale flags it because only the first word is capitalized under strict sentence-case, but "Code Origin" and "Source Code Integration" are treated as proper feature names capitalized throughout this page (e.g. "Using Code Origin", "Enable Code Origin"). Lowercasing them here would be inconsistent with the rest of the doc, so keeping the capitalization for consistency.


[Source Code Integration][7] (for example, with GitHub, GitLab, or Azure DevOps) is required as a [prerequisite](#prerequisites). On its own, it uses static analysis of your repository to automatically determine code locations for some languages and frameworks, without meeting the other requirements.

To get full tracer-instrumented coverage for the languages and frameworks listed in [compatibility requirements](#compatibility-requirements), also [enable Code Origin](#enable-code-origin) in your SDK. Data from both methods appears in the same Code Origin section of the Trace Explorer and powers the same [IDE integration](#in-your-ide) and [Live Debugger](#in-the-trace-explorer) workflows.

## Further Reading

{{< partial name="whats-next/whats-next.html" >}}
Expand Down
Loading