Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions docs/concepts/key-terms/tracing/span-metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ description: "Learn how attaching attributes to spans provides enhanced applicat
sidebar_order: 10
---

<Alert title="Looking for standalone counters, gauges, or distributions?">

Span metrics are great for enriching your existing traces with custom data. If you need metrics that are independent of tracing — such as business event counters, success/failure rates, or aggregates that aren't affected by trace sampling — use [Application Metrics](/product/explore/metrics/) instead.

</Alert>

Span metrics enable you to attach user defined attributes to spans, which might include application metrics or important debugging context within your application's traces. This approach provides context-rich performance monitoring by connecting attributes directly to the operations that generate them.

These attributes allow you to enrich trace spans with attributes that represent various types of measurement data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<Alert>

If you're using an HTTP framework with Sentry middleware (Gin, Echo, Fiber, etc.), transactions are already created automatically for incoming requests. You don't need to create transactions manually — use custom instrumentation to **add child spans** within your handlers. See <PlatformLink to="/tracing/instrumentation/auto-instrumentation/">Automatic Instrumentation</PlatformLink>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Learn how to add attributes to spans to monitor performance and de
sidebar_order: 10
---

<Include name="tracing/span-metrics-application-metrics-callout" />

<Alert>

To use span metrics, you must first <PlatformLink to="/tracing/">configure tracing</PlatformLink> in your application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
2 changes: 2 additions & 0 deletions docs/platforms/python/tracing/span-metrics/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Learn how to add attributes to spans in Sentry to monitor performa
sidebar_order: 20
---

<Include name="tracing/span-metrics-application-metrics-callout" />

<Alert>

To use span metrics, you must first <PlatformLink to="/tracing/">configure tracing</PlatformLink> in your application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

To add custom performance data to your application, you need to add custom instrumentation in the form of spans. Spans are a way to measure the time it takes for a specific action to occur. For example, you can create a span to measure the time it takes for a function to execute.

To get started, import the SDK.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ To capture transactions and spans customized to your organization's needs, you m

</Alert>

<Include name="tracing/span-metrics-application-metrics-callout" />

<PlatformContent includePath="performance/enable-manual-instrumentation" />

<PlatformContent includePath="performance/add-spans-example" />
Expand Down
5 changes: 5 additions & 0 deletions includes/tracing/span-metrics-application-metrics-callout.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Alert title="Looking for standalone counters, gauges, or distributions?">

Span metrics are great for enriching your existing traces with custom data. If you need metrics that are independent of tracing — such as business event counters, success/failure rates, or aggregates that aren't affected by trace sampling — use <PlatformLink to="/metrics/">Application Metrics</PlatformLink> instead.

</Alert>
Loading