Skip to content
Merged
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
33 changes: 32 additions & 1 deletion content/en/tracing/trace_pipeline/ingestion_mechanisms.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,23 @@
[1]: https://github.com/DataDog/dd-trace-cpp/releases/tag/v0.1.0
[2]: /tracing/trace_collection/proxy_setup
{{% /tab %}}
{{% tab "Rust" %}}
**Local configuration**

For Rust applications, set by-service sampling rates with the `DD_TRACE_SAMPLING_RULES` environment variable.

For example, to send 50% of the traces for the service named `my-service` and 10% for the rest of the traces:

```
export DD_TRACE_SAMPLING_RULES='[{"service": "my-service", "sample_rate": 0.5},{"sample_rate": 0.1}]'
```

Configure a rate limit by setting the `DD_TRACE_RATE_LIMIT` environment variable to the maximum traces per second per service instance. If no `DD_TRACE_RATE_LIMIT` value is set, a limit of 100 traces per second is applied.

Read more about sampling controls in the [Rust SDK documentation][1].

[1]: /tracing/trace_collection/dd_libraries/rust
{{% /tab %}}
{{% tab ".NET" %}}
For .NET applications, set a global sampling rate for the library using the `DD_TRACE_SAMPLE_RATE` environment variable. Set by-service sampling rates with the `DD_TRACE_SAMPLING_RULES` environment variable.

Expand Down Expand Up @@ -400,7 +417,7 @@

- Set Manual Drop on a span to make sure that **no** child span is ingested. The [error and rare samplers](#error-and-rare-traces) are ignored in the Agent.

{{< programming-lang-wrapper langs="java,python,ruby,go,nodejs,.NET,php,cpp" >}}
{{< programming-lang-wrapper langs="java,python,ruby,go,nodejs,.NET,php,cpp,rust" >}}

Check warning on line 420 in content/en/tracing/trace_pipeline/ingestion_mechanisms.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.words_case_sensitive

Use 'Node.js' instead of 'nodejs'.
{{< programming-lang lang="java" >}}

Manually keep a trace:
Expand Down Expand Up @@ -685,6 +702,11 @@
//method impl follows
```

{{< /programming-lang >}}
{{< programming-lang lang="rust" >}}

<div class="alert alert-info">The Rust SDK uses the OpenTelemetry API and does not support the Datadog <code>ManualKeep</code>/<code>ManualDrop</code> tags. To force keep or drop a trace in Rust, set the OpenTelemetry <code>sampling.priority</code> attribute on the root span using <a href="/tracing/trace_collection/custom_instrumentation/rust">custom instrumentation</a>.</div>

{{< /programming-lang >}}
{{< /programming-lang-wrapper >}}

Expand Down Expand Up @@ -805,6 +827,15 @@

[1]: https://github.com/DataDog/dd-trace-cpp/releases/tag/v0.1.0
{{% /tab %}}
{{% tab "Rust" %}}
For Rust applications, set by-service and by-operation name **span** sampling rules with the `DD_SPAN_SAMPLING_RULES` environment variable.

For example, to collect `100%` of the spans from the service named `my-service`, for the operation `http.request`, up to `50` spans per second:

```
@env DD_SPAN_SAMPLING_RULES=[{"service": "my-service", "name": "http.request", "sample_rate":1.0, "max_per_second": 50}]
```
{{% /tab %}}
{{% tab ".NET" %}}
Starting from version [v2.18.0][1], for .NET applications, set by-service and by-operation name **span** sampling rules with the `DD_SPAN_SAMPLING_RULES` environment variable.

Expand Down
Loading