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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Before you begin, review the [Dynamic Instrumentation prerequisites][12]. Ruby a
1. If you don't already have APM enabled, in your Agent configuration, set the `DD_APM_ENABLED` environment variable to `true` and listening to the port `8126/TCP`.
2. Run your service with Dynamic Instrumentation enabled by setting the `DD_DYNAMIC_INSTRUMENTATION_ENABLED` environment variable to `true`. Specify `DD_SERVICE`, `DD_ENV`, and `DD_VERSION` Unified Service Tags so you can filter and group your instrumentations and target active clients across these dimensions.
3. After starting your service with Dynamic Instrumentation enabled, you can start using Dynamic Instrumentation on the [APM > Dynamic Instrumentation page][3].
4. For a better experience, Dynamic Instrumentation automatically enables [autocomplete and search (in Preview)][14].

**Note**: Dynamic Instrumentation initializes when the application processes its first HTTP request. Ensure your application receives at least one request after startup before creating probes.

Expand Down Expand Up @@ -124,3 +125,4 @@ The following features available in other languages are not supported for Ruby:
[11]: /dynamic_instrumentation/expression-language/
[12]: /dynamic_instrumentation/#prerequisites
[13]: https://github.com/DataDog/dd-trace-rb
[14]: /dynamic_instrumentation/symdb/
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ site_support_id: autocomplete_search
---

{{< beta-callout url="#" btn_hidden="true" >}}
Autocomplete and search are in Preview for Python and .NET.
Autocomplete and search are in Preview for Python, .NET, and Ruby.
{{< /beta-callout >}}

## Overview
Expand Down Expand Up @@ -43,6 +43,7 @@ Select your runtime below:
{{< image-card href="/dynamic_instrumentation/symdb/python" src="integrations_logos/python.png" alt="Python" >}}
{{< image-card href="/dynamic_instrumentation/symdb/dotnet" src="integrations_logos/dotnet-core.png" alt="Dotnet" >}}
{{< image-card href="/dynamic_instrumentation/symdb/dotnet" src="integrations_logos/dotnet-framework.png" alt="Dotnet" >}}
{{< image-card href="/dynamic_instrumentation/symdb/ruby" src="integrations_logos/ruby.png" alt="Ruby" >}}
{{< /card-grid >}}

## Explore autocomplete and search
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: Enable Autocomplete and Search for Ruby
description: Configure Ruby applications to enable IDE-like autocomplete and search features for Dynamic Instrumentation.
is_beta: true
private: false
code_lang: ruby
type: multi-code-lang
code_lang_weight: 60
aliases:
- /dynamic_instrumentation/symdb/ruby
- /tracing/dynamic_instrumentation/symdb/ruby
---
{{< beta-callout url="#" btn_hidden="true" >}}
Autocomplete and search are in Preview.
{{< /beta-callout >}}

## Requirements

- [Dynamic Instrumentation][1] is enabled for your service.
- Tracing library [`dd-trace-rb`][6] 2.37.0 or higher is installed.
- Ruby 2.7 or higher. On Ruby 2.6, parameter names are not available for autocomplete because the runtime does not expose them.

## Installation

Autocomplete and search are enabled automatically when you run your service with Dynamic Instrumentation enabled:

1. Run your service with Dynamic Instrumentation enabled by setting the `DD_DYNAMIC_INSTRUMENTATION_ENABLED` environment variable to `true`.
2. Specify `DD_SERVICE` and `DD_VERSION` [Unified Service Tags][5].
3. Invoke your service:

```shell
export DD_SERVICE=<YOUR_SERVICE>
export DD_ENV=<YOUR_ENV>
export DD_VERSION=<YOUR_VERSION>
export DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
bundle exec rails server
```

After starting your service with Dynamic Instrumentation enabled, you can use Dynamic Instrumentation's IDE-like features on the [**APM** > **Dynamic Instrumentation**][4] page.

## Additional notes

### Disabling autocomplete and search

To disable autocomplete and search for your service, set the `DD_SYMBOL_DATABASE_UPLOAD_ENABLED` environment variable to `false`:

```shell
export DD_SYMBOL_DATABASE_UPLOAD_ENABLED=false
```

### Forking servers

When your application uses a forking server (Puma in clustered mode, Unicorn, Passenger), each worker process uploads its own symbol set after the fork. Workers that load additional code after forking continue to upload incrementally as new classes are loaded.

[1]: /dynamic_instrumentation
[4]: https://app.datadoghq.com/dynamic-instrumentation
[5]: /getting_started/tagging/unified_service_tagging
[6]: https://github.com/DataDog/dd-trace-rb
Loading