<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Instrument for distributed tracing on Grafana Labs</title><link>https://grafana.com/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/</link><description>Recent content in Instrument for distributed tracing on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/index.xml" rel="self" type="application/rss+xml"/><item><title>About instrumentation</title><link>https://grafana.com/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/about-instrumentation/</link><pubDate>Fri, 03 Apr 2026 18:14:38 +0000</pubDate><guid>https://grafana.com/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/about-instrumentation/</guid><content><![CDATA[&lt;h1 id=&#34;about-instrumentation&#34;&gt;About instrumentation&lt;/h1&gt;
&lt;p&gt;Instrumentation is the act of modifying the source code of a service to emit span information tied to a common trace ID. Traces themselves are a metaobject, comprised of nothing but spans that hold the same ID.&lt;/p&gt;
&lt;p align=&#34;center&#34;&gt;&lt;img src=&#34;/media/docs/tempo/intro/tempo-get-started-overview.svg&#34; alt=&#34;Tracing pipeline overview&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;instrumentation-methods&#34;&gt;Instrumentation methods&lt;/h2&gt;
&lt;p&gt;To add instrumentation, the code for a service uses a Software Development Kit (SDK) which supplies language-specific libraries that allow the:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Creation of a new trace, starting with a new root span.&lt;/li&gt;
&lt;li&gt;Addition of new spans, that are siblings of children of pre-existing spans.&lt;/li&gt;
&lt;li&gt;Addition of span attributes to add contextual information to each span, as well as span links and events.&lt;/li&gt;
&lt;li&gt;Closure of spans when a unit of work is complete.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Adding code to carry out these operations is known as &lt;strong&gt;manual instrumentation&lt;/strong&gt;, as it requires manual intervention by an engineer to write code to deal with traces, as well as to determine where in the code traces/spans should start, the attributes and other data that should be attached to spans, and where traces/spans should end.&lt;/p&gt;
&lt;p&gt;There is an alternative/companion to manual instrumentation, &lt;strong&gt;auto-instrumentation&lt;/strong&gt;.
Auto-instrumentation is the act of allowing a tracing SDK to determine where traces/spans should start, what information should be added to spans, and where traces/spans should stop.
Essentially, manual instrumentation is pre-packaged for a large number of popular frameworks and libraries which are used inside a service&amp;rsquo;s code, and it&amp;rsquo;s these libraries/frameworks that are actually emitting spans for a trace.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Zero-code instrumentation&lt;/strong&gt; uses eBPF technology to instrument applications without code changes.

    &lt;a href=&#34;/docs/beyla/v2.9.x/&#34;&gt;Grafana Beyla&lt;/a&gt; is an example of a zero-code instrumentation tool.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hybrid instrumentation&lt;/strong&gt; combines auto and manual instrumentation, using automatic for most code and manual for custom tracing logic.&lt;/p&gt;
&lt;p&gt;These libraries usually include those dealing with networking, so for example a request coming into a service might be via an auto-instrumented HTTP library, which would then start a trace until it sent a response back via HTTP to the requester.
Along the course of the request, the service might use other libraries that process data, and if they&amp;rsquo;re also auto-instrumented then new spans are generated for the trace that include suitable attributes.&lt;/p&gt;
&lt;p&gt;This produces a trace that can be very useful, but ultimately doesn&amp;rsquo;t include any spans that are specific to service code that isn&amp;rsquo;t executing library commands.
Because of this, the best traced services are usually those that include a mixture of auto and manual instrumentation.&lt;/p&gt;
&lt;p&gt;Traces usually exist in relation to a request made to an application, and spans are generated when new units of work occur whilst processing that request. A trace usually ends when a response to the request is sent.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://opentelemetry.io/docs/instrumentation/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry SDK&lt;/a&gt; is Grafana&amp;rsquo;s recommended solution for instrumenting, and it supports a myriad of modern languages, detailed in the linked page.&lt;/p&gt;
&lt;p&gt;Additionally, instrumentation SDKs usually emit span information to a local receiver/collector. Examples of these are Grafana Alloy and the OpenTelemetry Collector. These receivers can then carry out additional processing on the traces (such as tail sampling, span batching, process filtering, etc.) to modify a trace and its spans before they&amp;rsquo;re sent to a final destination, usually a tracing backend like Grafana Tempo.&lt;/p&gt;
&lt;h2 id=&#34;propagation&#34;&gt;Propagation&lt;/h2&gt;
&lt;p&gt;Modern applications are not usually not the monolithic applications of old, where single binaries contained all of the code, and multiple instances of the monoliths were run to &amp;lsquo;scale&amp;rsquo; to increased traffic. Modern applications are built using a large number of microservices, each one specifically designed to handle specific portions of a request/data flow.&lt;/p&gt;
&lt;p&gt;Traces are (usually) tied to a request/response model, being initiated when a request is received by application and ending when a response is returned. Each request could flow through a number of different services (eg. an API service, a caching service, a processing service, a database service, etc.), and therefore to ensure that the trace includes every service that the data is routed through there needs to be some way of sending the details about a trace with the data that&amp;rsquo;s sent to each service.&lt;/p&gt;
&lt;p&gt;This is called trace propagation, and the actual mechanics of it alter depending on the way that data is passed around services. The majority of services in the modern application world use REST (via HTTP) or protobufs (via gRPC, which is itself handled by HTTP/2). Because a trace is just a metaobject comprised of spans, all that needs to happen to continue a trace from one service to another is the addition of a trace ID and the last current span ID to the data send to a downstream service.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/tempo/architecture/Tempo-TracePropagation.png&#34;
  alt=&#34;Distributed Trace Propagation&#34; width=&#34;3018&#34;
     height=&#34;1680&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Many instrumentation SDKs, include propagators that can handle a number of different transport protocols, and when matched with appropriate auto-instrumentation mean that an engineer doesn&amp;rsquo;t even have to consider writing any code to inject the downstream data with the trace information, it gets handled automatically (for example in the case of HTTP, headers are included that specifically deal with trace information that gets extracted by the OpenTelemetry SDK in the downstream service to carry on a trace).&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://www.w3.org/TR/trace-context/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;W3C Trace Context&lt;/a&gt; is the default way of sending propagation information in OpenTelemetry SDKs.
However, the SDK also allows you to provide custom propagators to it instead, which means that if an application uses a custom protocol or networking scheme, engineers can write propagators and extractors to handle these as well.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/tempo/architecture/Tempo-CustomPropagation.png&#34;
  alt=&#34;Customer Trace Propagation&#34; width=&#34;3018&#34;
     height=&#34;1680&#34;/&gt;&lt;/p&gt;
]]></content><description>&lt;h1 id="about-instrumentation">About instrumentation&lt;/h1>
&lt;p>Instrumentation is the act of modifying the source code of a service to emit span information tied to a common trace ID. Traces themselves are a metaobject, comprised of nothing but spans that hold the same ID.&lt;/p></description></item><item><title>Best practices for traces</title><link>https://grafana.com/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/best-practices/</link><pubDate>Fri, 03 Apr 2026 18:14:38 +0000</pubDate><guid>https://grafana.com/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/best-practices/</guid><content><![CDATA[&lt;h1 id=&#34;best-practices-for-traces&#34;&gt;Best practices for traces&lt;/h1&gt;
&lt;p&gt;This page provides some general best practices for tracing.&lt;/p&gt;


&lt;div data-shared=&#34;best-practices-traces.md&#34;&gt;
            &lt;h2 id=&#34;span-and-resource-attributes&#34;&gt;Span and resource attributes&lt;/h2&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/tempo/v2.10.x/introduction/&#34;&gt;Traces&lt;/a&gt; are built from spans, which denote units of work such as a call to, or from, an upstream service. Spans are constructed primarily of span and resource attributes.
Spans also have a hierarchy, where parent spans can have children or siblings.&lt;/p&gt;
&lt;p&gt;In the screenshot below, the left side of the screen (1) shows the list of results for the query. The right side (2) lists each span that makes up the selected trace.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/static/img/docs/tempo/screenshot-trace-explore-spans-g10.png&#34;
  alt=&#34;Traces example with query results and spans&#34; width=&#34;1474&#34;
     height=&#34;788&#34;/&gt;&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;span attribute&lt;/strong&gt; is a key/value pair that provides context for its span. For example, if the span deals with calling another service via HTTP, an attribute could include the HTTP URL (maybe as the span attribute key &lt;code&gt;http.url&lt;/code&gt;) and the HTTP status code returned (as the span attribute &lt;code&gt;http.status_code&lt;/code&gt;). Span attributes can consist of varying, non-null types.&lt;/p&gt;
&lt;p&gt;Unlike a span attribute, a &lt;strong&gt;resource attribute&lt;/strong&gt; is a key/value pair that describes the context of how the span was collected. Generally, these attributes describe the process that created the span.
This could be a set of resource attributes concerning a Kubernetes cluster, in which case you may see resource attributes, for example: &lt;code&gt;k8s.namespace&lt;/code&gt;, &lt;code&gt;k8s.container_name&lt;/code&gt;, and &lt;code&gt;k8s.cluster&lt;/code&gt;.
These can also include information on the libraries that were used to instrument the spans for a trace, or any other infrastructure information.&lt;/p&gt;
&lt;p&gt;For more information, read the &lt;a href=&#34;https://opentelemetry.io/docs/specs/otel/overview/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Attribute and Resource&lt;/a&gt; sections in the OpenTelemetry specification.&lt;/p&gt;
&lt;h3 id=&#34;naming-conventions-for-span-and-resource-attributes&#34;&gt;Naming conventions for span and resource attributes&lt;/h3&gt;
&lt;p&gt;The OpenTelemetry project defines a number of semantic conventions for attributes, which can help you to determine which attributes are most important to include in your spans. These conventions provide a common vocabulary for describing different types of entities, which can help to ensure that your data is consistent and meaningful.&lt;/p&gt;
&lt;p&gt;When naming attributes, use consistent, nested namespaces to ensures that attribute keys are obvious to anyone observing the spans of a trace and that common attributes can be shared by spans.
Using our example from above, the &lt;code&gt;http&lt;/code&gt; prefix of the attribute is the namespace, and &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;status_code&lt;/code&gt; are keys within that namespace.
Attributes can also be nested, for example &lt;code&gt;http.url.protocol&lt;/code&gt; might be &lt;code&gt;HTTP&lt;/code&gt; or &lt;code&gt;HTTPS&lt;/code&gt;, whereas &lt;code&gt;http.url.path&lt;/code&gt; might be &lt;code&gt;/api/v1/query&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For more details around semantic naming conventions, refer to the &lt;a href=&#34;https://opentelemetry.io/docs/specs/otel/common/attribute-naming/#recommendations-for-opentelemetry-authors&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Recommendations for OpenTelemetry Authors&lt;/a&gt; and &lt;a href=&#34;https://github.com/open-telemetry/semantic-conventions/blob/main/docs/README.md&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Semantic Conventions&lt;/a&gt; documentation.&lt;/p&gt;
&lt;p&gt;Some third-party libraries provide auto-instrumentation that generate span and span attributes when included in a source base.&lt;/p&gt;
&lt;p&gt;For more information about instrumenting your app for tracing, refer to the &lt;a href=&#34;/docs/tempo/latest/getting-started/instrumentation/&#34;&gt;Instrument for distributed tracing&lt;/a&gt; documentation.&lt;/p&gt;
&lt;h3 id=&#34;how-many-attributes-should-spans-have&#34;&gt;How many attributes should spans have?&lt;/h3&gt;
&lt;p&gt;The decision of how many attributes to include in your spans is up to you. There is no hard and fast rule.
Keep the number of attributes to a minimum, as each attribute adds overhead to the tracing system.
In Grafana Cloud, this results in higher tracing costs.&lt;/p&gt;
&lt;p&gt;Only include attributes that are relevant to the operation that the span represents. For example, if you are tracing an HTTP request, you might include attributes such as the request method, the URL, and the response status code.&lt;/p&gt;
&lt;p&gt;If you are unsure whether or not to include an attribute, it is always better to err on the side of caution and leave it out. You can always add additional attributes later if you need them.&lt;/p&gt;
&lt;p&gt;In general, consider the following guidelines:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Don&amp;rsquo;t include metrics or logs as attributes in your spans.&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t use redundant attributes.&lt;/li&gt;
&lt;li&gt;When determining which attributes to add, consider an application&amp;rsquo;s service flow, and execution in the context of only the current span.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The OpenTelemetry project doesn&amp;rsquo;t specify a maximum number of attributes that a span can have.
However, the default limits for the number of attributes per span is &lt;a href=&#34;https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#attribute-limits&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;128 entries&lt;/a&gt;, so you will have to adjust that. There are also default limits on attribute value and name character lengths.&lt;/p&gt;
&lt;h2 id=&#34;determining-where-to-add-spans&#34;&gt;Determining where to add spans&lt;/h2&gt;
&lt;p&gt;When instrumenting, determine the smallest piece of work that you need to observe in a trace to be of value to ensure that you don’t over (or under) instrument.&lt;/p&gt;
&lt;p&gt;Creating a new span for any work that has a relatively significant duration allows the observation of a trace to immediately show where significant amounts of time are spent during the processing of a request into your application or system.&lt;/p&gt;
&lt;p&gt;For example, adding a span for a call to another services (either instrumented or not) may take an unknown amount of time to complete, and therefore being able to separate this work shows when services are taking longer than expected.&lt;/p&gt;
&lt;p&gt;Adding a span for a piece of work that might call many other functions in a loop is a good signal of how long that loop is taking (you might add a span attribute that counts how many time the loop runs to determine if the duration is acceptable).
However, adding a span for each method or function call in that loop might not, as it might produce hundreds or thousands of worthless spans.&lt;/p&gt;
&lt;h2 id=&#34;span-length&#34;&gt;Span length&lt;/h2&gt;
&lt;p&gt;While there are some (high) default limits to the length that a span (and by definition, the traces they belong to) can be, these can be adjusted by 
    &lt;a href=&#34;/docs/tempo/v2.10.x/configuration/#ingestion-limits&#34;&gt;these configurations&lt;/a&gt;.
Traces that include a large number of spans and/or long-running spans can have an impact on the time taken to query them once stored.
Cloud Traces users should contact Grafana Support to modify overrides.&lt;/p&gt;
&lt;p&gt;For long-running spans and traces, the best way to see this impact on requests is to send a few test cases and see what the performance looks like and to evaluate the trace size.&lt;/p&gt;
&lt;p&gt;From there, you can modify the configuration for Tempo or determine ways to re-architect how the trace is produced.&lt;/p&gt;
&lt;p&gt;You can consider breaking up the spans in several ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Decompose the query
&lt;ul&gt;
&lt;li&gt;For example, if a complex SQL query involves multiple operations (for example, uses joins, subqueries, or unions), consider creating separate spans for each significant operation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Improve granulation of long-running spans
&lt;ul&gt;
&lt;li&gt;For long-running operations, you could create a new span for every predetermined interval of execution time.


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;This requires time-based tracking in your application&amp;rsquo;s code and is more complex to implement.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Use span linking
&lt;ul&gt;
&lt;li&gt;Should data flow hit bottlenecks where further operations on that data might be batched at a later time, the use of &lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#links-between-spans&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;span links&lt;/a&gt; can help keep traces constrained to an acceptable time range, while sharing context with other traces that work on the same data. This can also improve the readability of traces.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
]]></content><description>&lt;h1 id="best-practices-for-traces">Best practices for traces&lt;/h1>
&lt;p>This page provides some general best practices for tracing.&lt;/p>
&lt;div data-shared="best-practices-traces.md">
&lt;h2 id="span-and-resource-attributes">Span and resource attributes&lt;/h2>
&lt;p>
&lt;a href="/docs/tempo/v2.10.x/introduction/">Traces&lt;/a> are built from spans, which denote units of work such as a call to, or from, an upstream service. Spans are constructed primarily of span and resource attributes.
Spans also have a hierarchy, where parent spans can have children or siblings.&lt;/p></description></item><item><title>Set up instrumentation</title><link>https://grafana.com/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/set-up-instrumentation/</link><pubDate>Fri, 03 Apr 2026 18:14:38 +0000</pubDate><guid>https://grafana.com/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/set-up-instrumentation/</guid><content><![CDATA[&lt;h1 id=&#34;set-up-instrumentation&#34;&gt;Set up instrumentation&lt;/h1&gt;
&lt;p&gt;Client instrumentation is the first building block to a functioning distributed tracing visualization pipeline.
Client instrumentation is the process of adding instrumentation points in the application that create and offload spans.&lt;/p&gt;
&lt;p&gt;When you set up instrumentation, you:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Choose an instrumentation method to use with your application&lt;/li&gt;
&lt;li&gt;Instrument your application to generate traces&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After you set up instrumentation, you can &lt;a href=&#34;../set-up-collector/&#34;&gt;set up a collector&lt;/a&gt; to receive traces from your application.
Refer to &lt;a href=&#34;../about-instrumentation/&#34;&gt;About instrumentation&lt;/a&gt; for more information about instrumentation and how it works.&lt;/p&gt;
&lt;h2 id=&#34;choose-an-instrumentation-method&#34;&gt;Choose an instrumentation method&lt;/h2&gt;
&lt;p&gt;When sending traces to Tempo, you can choose between four methods:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Auto-instrumentation applies instrumentation automatically using agents or middleware, without code changes.&lt;/li&gt;
&lt;li&gt;Zero-code instrumentation, which uses eBPF technology to instrument applications without code changes. &lt;a href=&#34;/docs/beyla/latest/&#34;&gt;Grafana Beyla&lt;/a&gt; is an example of a zero-code instrumentation tool.&lt;/li&gt;
&lt;li&gt;Manual instrumentation involves adding code to create spans and traces, giving full control over collected data.&lt;/li&gt;
&lt;li&gt;Hybrid instrumentation, which combines auto and manual instrumentation, using automatic for most code and manual for custom tracing logic.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Refer to 
    &lt;a href=&#34;/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/about-instrumentation/&#34;&gt;About instrumentation&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;If you are using OTel or Alloy, refer to &lt;a href=&#34;/docs/opentelemetry/instrument/&#34;&gt;Instrument an application with OpenTelemetry&lt;/a&gt; for more information.
These instructions are specific to Grafana Cloud, but can be adapted for self-hosted Tempo.&lt;/p&gt;
&lt;h2 id=&#34;instrument-your-app&#34;&gt;Instrument your app&lt;/h2&gt;
&lt;p&gt;Most of the popular client instrumentation frameworks have SDKs in the most commonly used programming languages.
You should pick one according to your application needs.&lt;/p&gt;
&lt;p&gt;OpenTelemetry has the most active development in the community and may be a better long-term choice.&lt;/p&gt;
&lt;p&gt;Popular instrumentation frameworks include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://opentelemetry.io/docs/concepts/instrumenting/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://zipkin.io/pages/tracers_instrumentation&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Zipkin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/docs/beyla/&#34;&gt;Grafana Beyla&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;instrument-using-opentelemetry&#34;&gt;Instrument using OpenTelemetry&lt;/h3&gt;
&lt;p&gt;A collection of tools, APIs, and SDKs, OpenTelemetry helps engineers instrument, generate, collect, and export telemetry data such as metrics, logs, and traces, to analyze software performance and behavior.
For more information refer to &lt;a href=&#34;/oss/opentelemetry/&#34;&gt;OpenTelemetry overview&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you are using OTel with Grafana Cloud, refer to &lt;a href=&#34;/docs/opentelemetry/instrument/&#34;&gt;Instrument an application with OpenTelemetry&lt;/a&gt; for more information.&lt;/p&gt;
&lt;h4 id=&#34;use-opentelemetry-auto-instrumentation-frameworks&#34;&gt;Use OpenTelemetry auto-instrumentation frameworks&lt;/h4&gt;
&lt;p&gt;OpenTelemetry provides auto-instrumentation agents and libraries of Java, .NET, Python, Go, and JavaScript applications, among others.
For more information, refer for the &lt;a href=&#34;https://opentelemetry.io/docs/instrumentation/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Instrumentation documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;These libraries capture telemetry
information from a client application with minimal manual instrumentation of the codebase.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-java-instrumentation&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Java auto-instrumentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry .NET auto-instrumentation&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/blog/2023/10/31/how-to-configure-opentelemetry-.net-automatic-instrumentation-with-grafana-cloud&#34;&gt;How to configure OpenTelemetry .NET automatic instrumentation with Grafana Cloud&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-python-contrib&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Python auto-instrumentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-go-instrumentation&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Go auto-instrumentation&lt;/a&gt; and &lt;a href=&#34;https://opentelemetry.io/docs/instrumentation/go/getting-started/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Jaeger client libraries have been deprecated. For more information, refer to the &lt;a href=&#34;https://www.jaegertracing.io/docs/1.50/client-libraries/#deprecating-jaeger-clients&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Deprecating Jaeger clients article&lt;/a&gt;. Jaeger recommends using OpenTelemetry SDKs.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h4 id=&#34;additional-otel-resources&#34;&gt;Additional OTel resources&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/docs/grafana-cloud/monitor-applications/application-observability/&#34;&gt;Grafana Application Observability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-go-instrumentation/tree/main/examples&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Go instrumentation examples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://opentelemetry.io/docs/instrumentation/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Language Specific Instrumentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;instrument-with-zipkin-auto-instrumentation&#34;&gt;Instrument with Zipkin auto-instrumentation&lt;/h3&gt;
&lt;p&gt;Zipkin is a distributed tracing system that helps gather timing data needed to troubleshoot latency problems in microservice architectures.&lt;/p&gt;
&lt;p&gt;Refer to the &lt;a href=&#34;https://zipkin.io/pages/tracers_instrumentation.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Zipkin Language Specific Instrumentation&lt;/a&gt; documentation for more information.&lt;/p&gt;
&lt;p&gt;If you are using Zipkin with Alloy, refer to the Zipkin receiver, 
    &lt;a href=&#34;/docs/alloy/v2.9.x/reference/components/otelcol/otelcol.receiver.zipkin/&#34;&gt;otelcol.receiver.zipkin documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In addition, you can use Zipkin to instrument a library, refer to &lt;a href=&#34;https://zipkin.io/pages/instrumenting.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Instrumenting a library with Zipkin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Within Grafana, you can also use these Zipkin specific features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/docs/grafana/latest/datasources/zipkin/&#34;&gt;Zipkin data source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/docs/grafana-cloud/send-data/metrics/metrics-prometheus/prometheus-config-examples/the-zipkin-community-zipkin/&#34;&gt;Monitor Zipkin with Prometheus and Grafana Cloud&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;instrument-with-grafana-beyla&#34;&gt;Instrument with Grafana Beyla&lt;/h3&gt;
&lt;p&gt;Grafana Beyla is an eBPF-based application zero-code instrumentation tool to easily get started with Application Observability. Beyla uses eBPF to automatically inspect application executables and the OS networking layer, and capture trace spans related to web transactions and Rate Errors Duration (RED) metrics for Linux HTTP/S and gRPC services. All data capture occurs without any modifications to application code or configuration.&lt;/p&gt;
&lt;p&gt;Refer to 
    &lt;a href=&#34;/docs/beyla/v2.9.x/setup/&#34;&gt;Set up Beyla&lt;/a&gt; for information about how to instrument using Beyla.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;While Beyla is a good choice for metrics, span metrics, and service graphs, if you choose to use it for tracing, check the 
    &lt;a href=&#34;/docs/beyla/v2.9.x/&#34;&gt;Beyla documentation&lt;/a&gt; to verify that it meets your tracing needs.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;!-- update these blog links
## Grafana Blog

The Grafana blog periodically features instrumentation posts.

- [How to configure OpenTelemetry .NET automatic instrumentation with Grafana Cloud](https://grafana.com/blog/2023/10/31/how-to-configure-opentelemetry-.net-automatic-instrumentation-with-grafana-cloud)
- [Java Spring Boot Auto-Instrumentation](https://grafana.com/blog/2021/02/03/auto-instrumenting-a-java-spring-boot-application-for-traces-and-logs-using-opentelemetry-and-grafana-tempo/)
- [Go &#43; OpenMetrics Exemplars](https://grafana.com/blog/2020/11/09/trace-discovery-in-grafana-tempo-using-prometheus-exemplars-loki-2.0-queries-and-more/)
- [.NET](https://grafana.com/blog/2021/02/11/instrumenting-a-.net-web-api-using-opentelemetry-tempo-and-grafana-cloud/)
- [Python](https:/grafana.com/blog/2021/05/04/get-started-with-distributed-tracing-and-grafana-tempo-using-foobar-a-demo-written-in-python/)
--&gt;
&lt;h3 id=&#34;community-resources&#34;&gt;Community resources&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/mnadeem/nodejs-opentelemetry-tempo&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;NodeJS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/mnadeem/boot-opentelemetry-tempo&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Java Spring Boot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/dgzlopes/foobar-demo&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;
&lt;p&gt;After you set up instrumentation, you can &lt;a href=&#34;../set-up-collector/&#34;&gt;set up a collector&lt;/a&gt; to receive traces from your application.&lt;/p&gt;
]]></content><description>&lt;h1 id="set-up-instrumentation">Set up instrumentation&lt;/h1>
&lt;p>Client instrumentation is the first building block to a functioning distributed tracing visualization pipeline.
Client instrumentation is the process of adding instrumentation points in the application that create and offload spans.&lt;/p></description></item><item><title>Set up your collector</title><link>https://grafana.com/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/set-up-collector/</link><pubDate>Fri, 03 Apr 2026 18:14:38 +0000</pubDate><guid>https://grafana.com/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/set-up-collector/</guid><content><![CDATA[&lt;h1 id=&#34;set-up-your-collector&#34;&gt;Set up your collector&lt;/h1&gt;
&lt;p&gt;You can send data from your application using Grafana Alloy or OpenTelemetry Collector (OTel) collectors.&lt;/p&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/alloy/v2.9.x/&#34;&gt;Grafana Alloy&lt;/a&gt; is a vendor-neutral distribution of the OpenTelemetry (OTel) Collector.
Alloy uniquely combines the very best OSS observability signals in the community.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://opentelemetry.io/docs/collector/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Collector&lt;/a&gt; is a vendor-agnostic way to receive, process, and export telemetry data.&lt;/p&gt;
&lt;p&gt;The collector is a component that runs alongside your application and periodically gathers tracing data from it.
This method is suitable when you want to collect tracing from applications without modifying their source code.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how it works:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install and configure the collector on the same machine or container where your application is running.&lt;/li&gt;
&lt;li&gt;The collector periodically retrieves your application&amp;rsquo;s performance tracing data, regardless of the language or technology stack your application is using.&lt;/li&gt;
&lt;li&gt;The captured traces are then sent to the Tempo server for storage and analysis.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Using a collector provides a hassle-free option, especially when dealing with multiple applications or microservices, allowing you to centralize the tracing process without changing your application&amp;rsquo;s codebase.&lt;/p&gt;
&lt;h2 id=&#34;use-alloy&#34;&gt;Use Alloy&lt;/h2&gt;
&lt;p&gt;Grafana Labs maintains and supports Alloy, which packages various upstream OpenTelemetry Collector components. Alloy provides stability, support, and integration with Grafana Labs products.&lt;/p&gt;
&lt;p&gt;Refer to the 
    &lt;a href=&#34;/docs/tempo/v2.9.x/set-up-for-tracing/instrument-send/set-up-collector/grafana-alloy/&#34;&gt;Alloy documentation&lt;/a&gt; for information about Alloy and it&amp;rsquo;s tracing capabilities.&lt;/p&gt;
&lt;p&gt;Refer to 
    &lt;a href=&#34;/docs/alloy/v2.9.x/collect/&#34;&gt;Collect and forward data with Alloy&lt;/a&gt; for examples of collecting data.&lt;/p&gt;
&lt;h2 id=&#34;use-the-opentelemetry-collector&#34;&gt;Use the OpenTelemetry Collector&lt;/h2&gt;
&lt;p&gt;The OpenTelemetry project maintainers and the Cloud Native Computing Foundation maintain the upstream OpenTelemetry Collector. This is a community-supported project.&lt;/p&gt;
&lt;p&gt;Refer to the &lt;a href=&#34;https://opentelemetry.io/docs/collector/installation/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Install the Collector documentation&lt;/a&gt; for instructions on installation.&lt;/p&gt;
&lt;p&gt;Refer to the &lt;a href=&#34;https://github.com/grafana/opentelemetry-docs/blob/main/docs/sources/collector/opentelemetry-collector&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenTelemetry Collector documentation&lt;/a&gt; to use the upstream OpenTelemetry Collector with Grafana Labs products.&lt;/p&gt;
]]></content><description>&lt;h1 id="set-up-your-collector">Set up your collector&lt;/h1>
&lt;p>You can send data from your application using Grafana Alloy or OpenTelemetry Collector (OTel) collectors.&lt;/p>
&lt;p>
&lt;a href="/docs/alloy/v2.9.x/">Grafana Alloy&lt;/a> is a vendor-neutral distribution of the OpenTelemetry (OTel) Collector.
Alloy uniquely combines the very best OSS observability signals in the community.&lt;/p></description></item></channel></rss>