Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC-12346 Update the Datadog integration for SQL 'statistics' to SQL 'activity #19407

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
16 changes: 10 additions & 6 deletions src/current/_data/redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,9 @@
sources: ['operate-cockroachdb-kubernetes.md']
versions: ['v21.2']

- destination: plan-your-cluster-serverless.md
sources:
- 'planning-your-serverless-cluster.md'
- 'learn-about-pricing.md'
- 'learn-about-request-units.md'
versions: ['cockroachcloud']
- destination: log-sql-activity-to-datadog.md
sources: ['log-sql-statistics-to-datadog.md']
versions: ['v23.1', 'v23.2', 'v24.1', 'v24.2', 'v24.3', 'v25.1']

- destination: logging-overview.md
sources: ['debug-and-error-logs.md']
Expand All @@ -276,6 +273,13 @@
sources: ['cloud-deployment.md']
versions: ['v1.1', 'v2.0', 'v2.1', 'v19.1', 'v19.2', 'v20.1', 'v20.2', 'v21.1']

- destination: plan-your-cluster-serverless.md
sources:
- 'planning-your-serverless-cluster.md'
- 'learn-about-pricing.md'
- 'learn-about-request-units.md'
versions: ['cockroachcloud']

- destination: provision-a-cluster-with-terraform.md
sources:
- 'migrate-from-free-to-dedicated.md'
Expand Down
4 changes: 2 additions & 2 deletions src/current/_includes/releases/v23.2/v23.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ In CockroachDB Self-Hosted, all available features are free to use unless their
</tr>
<tr>
<td>
<p class="feature-summary">Integrate SQL statistics with Datadog for end-to-end observability</p>
<p class="feature-description"><a href="https://www.cockroachlabs.com/docs/v23.2/log-sql-statistics-to-datadog">SQL statistics</a> such as statements and transactions can be emitted with fine granularity to Datadog as logs to allow end to end observability using both metrics and logs.</p>
<p class="feature-summary">Integrate SQL activity with Datadog for end-to-end observability</p>
<p class="feature-description"><a href="https://www.cockroachlabs.com/docs/v23.2/log-sql-activity-to-datadog">SQL activity</a> such as statements and transactions can be emitted with fine granularity to Datadog as logs to allow end to end observability using both metrics and logs.</p>
</td>
<td>23.2</td>
<td class="icon-center">{% include icon-yes.html %}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,9 @@
]
},
{
"title": "Log SQL Statistics to Datadog",
"title": "Log SQL Activity to Datadog",
"urls": [
"/${VERSION}/log-sql-statistics-to-datadog.html"
"/${VERSION}/log-sql-activity-to-datadog.html"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,9 @@
]
},
{
"title": "Log SQL Statistics to Datadog",
"title": "Log SQL Activity to Datadog",
"urls": [
"/${VERSION}/log-sql-statistics-to-datadog.html"
"/${VERSION}/log-sql-activity-to-datadog.html"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,9 @@
]
},
{
"title": "Log SQL Statistics to Datadog",
"title": "Log SQL Activity to Datadog",
"urls": [
"/${VERSION}/log-sql-statistics-to-datadog.html"
"/${VERSION}/log-sql-activity-to-datadog.html"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,9 @@
]
},
{
"title": "Log SQL Statistics to Datadog",
"title": "Log SQL Activity to Datadog",
"urls": [
"/${VERSION}/log-sql-statistics-to-datadog.html"
"/${VERSION}/log-sql-activity-to-datadog.html"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,9 @@
]
},
{
"title": "Log SQL Statistics to Datadog",
"title": "Log SQL Activity to Datadog",
"urls": [
"/${VERSION}/log-sql-statistics-to-datadog.html"
"/${VERSION}/log-sql-activity-to-datadog.html"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,9 @@
]
},
{
"title": "Log SQL Statistics to Datadog",
"title": "Log SQL Activity to Datadog",
"urls": [
"/${VERSION}/log-sql-statistics-to-datadog.html"
"/${VERSION}/log-sql-activity-to-datadog.html"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/current/v23.1/cockroachdb-feature-availability.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ The [schema-conversion summary report]({% link cockroachcloud/migrations-page.md

The [SQL Shell]({% link cockroachcloud/sql-shell.md %}) in the CockroachDB {{ site.data.products.cloud }} Console is in preview. The SQL Shell enables you to run [queries]({% link {{ page.version.version }}/selection-queries.md %}) on your CockroachDB {{ site.data.products.cloud }} cluster directly from your browser.

### Log SQL Statistics to Datadog
### Log SQL Activity to Datadog

Configure [logging of `sampled_query` events to Datadog]({% link {{ page.version.version }}/log-sql-statistics-to-datadog.md %}) for finer granularity and long-term retention of SQL statistics. The [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) contain common SQL event and execution details for sessions, transactions, and statements.
Configure [logging of `sampled_query` events to Datadog]({% link {{ page.version.version }}/log-sql-activity-to-datadog.md %}) for finer granularity and long-term retention of SQL activity. The [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) contain common SQL event and execution details for sessions, transactions, and statements.

CockroachDB supports a built-in integration with [Datadog](https://www.datadoghq.com/) which sends query events as logs via the [Datadog HTTP API](https://docs.datadoghq.com/api/latest/logs/). This integration is the recommended path to achieve high throughput data ingestion, which will in turn provide more query events for greater workload observability.

Expand Down
2 changes: 1 addition & 1 deletion src/current/v23.1/configure-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Along with the [common sink parameters](#common-sink-parameters), each HTTP serv
| `headers` | Map of key-value string pairs which will be appended to every request as custom HTTP headers. |
| `buffering` | Configures buffering of log messages for the sink, with the following sub-parameters:<br><br><ul><li>`max-staleness`: The maximum time a log message will wait in the buffer before a flush is triggered. Set to `0` to disable flushing based on elapsed time. Default: `5s`</li><li>`flush-trigger-size`: The number of bytes that will trigger the buffer to flush. Set to `0` to disable flushing based on accumulated size. Default: `1MiB`</li><li>`max-buffer-size`: The maximum size of the buffer: new log messages received when the buffer is full cause older messages to be dropped. Default: `50MiB`</li></ul>When `max-staleness` and `flush-trigger-size` are used together, whichever is reached first will trigger the flush. `buffering` is enabled by default for [HTTP](#output-to-http-network-collectors) log sinks. To explicitly disable log buffering, specify `buffering: NONE` instead. This setting is typically disabled for [security-related logs]({% link {{ page.version.version }}/logging-use-cases.md %}#security-and-audit-monitoring). See [Log buffering](#log-buffering-for-network-sinks) for more details and usage.|

For an example network logging configuration, see [Logging use cases]({% link {{ page.version.version }}/logging-use-cases.md %}#network-logging). For an example that uses `compression` and `headers` parameters, see [Configure an HTTP network collector for Datadog]({% link {{ page.version.version }}/log-sql-statistics-to-datadog.md %}#step-2-configure-an-http-network-collector-for-datadog).
For an example network logging configuration, see [Logging use cases]({% link {{ page.version.version }}/logging-use-cases.md %}#network-logging). For an example that uses `compression` and `headers` parameters, see [Configure an HTTP network collector for Datadog]({% link {{ page.version.version }}/log-sql-activity-to-datadog.md %}#step-2-configure-an-http-network-collector-for-datadog).

### Output to `stderr`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Log SQL statistics to Datadog
title: Log SQL Activity to Datadog
summary: Examples of common logging use cases and possible CockroachDB logging sink configurations.
toc: true
docs_area: manage
---

{% include_cached new-in.html version="v23.1.4" %} This tutorial describes how to configure logging of [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) to [Datadog](https://www.datadoghq.com/) for finer granularity and long-term retention of SQL statistics. The `sampled_query` events contain common SQL event and execution details for sessions, transactions, and statements.
{% include_cached new-in.html version="v23.1.4" %} This tutorial describes how to configure logging of [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) to [Datadog](https://www.datadoghq.com/) for finer granularity and long-term retention of SQL activity. The `sampled_query` events contain common SQL event and execution details for sessions, transactions, and statements.

CockroachDB supports a built-in integration with Datadog which sends query events as logs via the [Datadog HTTP API](https://docs.datadoghq.com/api/latest/logs/). This integration is the recommended path to achieve high throughput data ingestion, which will in turn provide more query events for greater workload observability.

Expand Down
2 changes: 1 addition & 1 deletion src/current/v23.1/logging-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This allows you to group channels that log related information (e.g., operationa
| [`SENSITIVE_ACCESS`]({% link {{ page.version.version }}/logging.md %}#sensitive_access) | SQL audit events (when enabled via [`ALTER TABLE ... EXPERIMENTAL_AUDIT`]({% link {{ page.version.version }}/alter-table.md %}#experimental_audit)). |
| [`SQL_EXEC`]({% link {{ page.version.version }}/logging.md %}#sql_exec) | SQL statement executions (when enabled via the `sql.trace.log_statement_execute` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %})) and uncaught Go panic errors during SQL statement execution.<br><br>**Warning**: Logging cluster-wide executions by enabling the `sql.trace.log_statement_execute` cluster setting will incur considerable overhead and may have a negative performance impact. |
| [`SQL_PERF`]({% link {{ page.version.version }}/logging.md %}#sql_perf) | SQL executions that impact performance, such as slow queries (when enabled via the `sql.log.slow_query.latency_threshold` and/or `sql.log.slow_query.experimental_full_table_scans.enabled` [cluster settings]({% link {{ page.version.version }}/cluster-settings.md %})). |
| [`TELEMETRY`]({% link {{ page.version.version }}/logging.md %}#telemetry) | Telemetry events for internal usage, except for [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) which may be [logged externally to Datadog]({% link {{ page.version.version }}/log-sql-statistics-to-datadog.md %}). |
| [`TELEMETRY`]({% link {{ page.version.version }}/logging.md %}#telemetry) | Telemetry events for internal usage, except for [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) which may be [logged externally to Datadog]({% link {{ page.version.version }}/log-sql-activity-to-datadog.md %}). |
| [`KV_DISTRIBUTION`]({% link {{ page.version.version }}/logging.md %}#kv_distribution) | Data distribution events, such as moving [replicas]({% link {{ page.version.version }}/architecture/overview.md %}#architecture-replica) between [stores]({% link {{ page.version.version }}/cockroach-start.md %}#store) in a cluster, adding replicas to [ranges]({% link {{ page.version.version }}/architecture/overview.md %}#range), and removing replicas from ranges. |

Logging channels are analogous to [logging facilities in Syslog](https://wikipedia.org/wiki/Syslog) or [logging services in Datadog](https://docs.datadoghq.com/logs/log_collection/?tab=http#reserved-attributes). For more details on the contents of each logging channel, see the [Logging reference]({% link {{ page.version.version }}/logging.md %}#logging-channels).
Expand Down
8 changes: 4 additions & 4 deletions src/current/v23.2/cockroachdb-feature-availability.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,19 @@ The [schema-conversion summary report]({% link cockroachcloud/migrations-page.md

The [SQL Shell]({% link cockroachcloud/sql-shell.md %}) in the CockroachDB {{ site.data.products.cloud }} Console is in preview. The SQL Shell enables you to run [queries]({% link {{ page.version.version }}/selection-queries.md %}) on your CockroachDB {{ site.data.products.cloud }} cluster directly from your browser.

### Log SQL Statistics to Datadog
### Log SQL Activity to Datadog

You can [log `sampled_query` and `sampled_transaction` events to Datadog]({% link {{ page.version.version }}/log-sql-statistics-to-datadog.md %}) for finer granularity and long-term retention of SQL statistics, and to reduce the performance impacts of logging these events locally. The [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) and the [`sampled_transaction` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_transaction) contain common SQL event and execution details for transactions, and statements.
You can [log `sampled_query` and `sampled_transaction` events to Datadog]({% link {{ page.version.version }}/log-sql-activity-to-datadog.md %}) for finer granularity and long-term retention of SQL activity, and to reduce the performance impacts of logging these events locally. The [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) and the [`sampled_transaction` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_transaction) contain common SQL event and execution details for transactions, and statements.

CockroachDB supports a built-in integration with [Datadog](https://www.datadoghq.com/) which sends these events as logs via the [Datadog HTTP API](https://docs.datadoghq.com/api/latest/logs/). This integration is the recommended path to achieve high throughput data ingestion, which will in turn provide more query and transaction events for greater workload observability.

### Custom Metrics Chart page for CockroachDB {{ site.data.products.cloud }} clusters

The [**Custom Metrics Chart** page]({% link cockroachcloud/custom-metrics-chart-page.md %}) for CockroachDB {{ site.data.products.cloud }} clusters allows you to create custom charts showing the time series data for an available metric or combination of metrics.

### Log SQL Statistics to Datadog
### Log SQL Activity to Datadog

Configure [logging of `sampled_query` events to Datadog]({% link {{ page.version.version }}/log-sql-statistics-to-datadog.md %}) for finer granularity and long-term retention of SQL statistics. The [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) contain common SQL event and execution details for sessions, transactions, and statements.
Configure [logging of `sampled_query` events to Datadog]({% link {{ page.version.version }}/log-sql-activity-to-datadog.md %}) for finer granularity and long-term retention of SQL activity. The [`sampled_query` events]({% link {{ page.version.version }}/eventlog.md %}#sampled_query) contain common SQL event and execution details for sessions, transactions, and statements.

CockroachDB supports a built-in integration with [Datadog](https://www.datadoghq.com/) which sends query events as logs via the [Datadog HTTP API](https://docs.datadoghq.com/api/latest/logs/). This integration is the recommended path to achieve high throughput data ingestion, which will in turn provide more query events for greater workload observability.

Expand Down
2 changes: 1 addition & 1 deletion src/current/v23.2/configure-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Along with the [common sink parameters](#common-sink-parameters), each HTTP serv
|<a id="file-based-headers"></a> `file-based-headers` | Map of key-filepath string pairs. The file specified by the filepath only contains a value that corresponds to the key. The key from the YAML configuration and the value contained in the file will be appended to every request as a custom HTTP header.<br><br>For example: `file-based-headers: {X-CRDB-HEADER-KEY: /some/path/to/file_with_value, X-ANOTHER-HEADER-KEY: /other/path/to/file_with_another_value}`<br><br>A value in a file can be updated without restarting the `cockroach` process. Instead, send SIGHUP to the `cockroach` process to notify it to refresh values.|
| `buffering` | Configures buffering of log messages for the sink, with the following sub-parameters:<br><br><ul><li>`max-staleness`: The maximum time a log message will wait in the buffer before a flush is triggered. Set to `0` to disable flushing based on elapsed time. Default: `5s`</li><li>`flush-trigger-size`: The number of bytes that will trigger the buffer to flush. Set to `0` to disable flushing based on accumulated size. Default: `1MiB`</li><li>`max-buffer-size`: The maximum size of the buffer: new log messages received when the buffer is full cause older messages to be dropped. Default: `50MiB`</li></ul>When `max-staleness` and `flush-trigger-size` are used together, whichever is reached first will trigger the flush. `buffering` is enabled by default for [HTTP](#output-to-http-network-collectors) log sinks. To explicitly disable log buffering, specify `buffering: NONE` instead. This setting is typically disabled for [security-related logs]({% link {{ page.version.version }}/logging-use-cases.md %}#security-and-audit-monitoring). See [Log buffering](#log-buffering-for-network-sinks) for more details and usage.|

For an example network logging configuration, see [Logging use cases]({% link {{ page.version.version }}/logging-use-cases.md %}#network-logging). For an example that uses `compression`, `headers`, `file-based-headers`, and `buffering` parameters, see [Configure an HTTP network collector for Datadog]({% link {{ page.version.version }}/log-sql-statistics-to-datadog.md %}#step-2-configure-an-http-network-collector-for-datadog).
For an example network logging configuration, see [Logging use cases]({% link {{ page.version.version }}/logging-use-cases.md %}#network-logging). For an example that uses `compression`, `headers`, `file-based-headers`, and `buffering` parameters, see [Configure an HTTP network collector for Datadog]({% link {{ page.version.version }}/log-sql-activity-to-datadog.md %}#step-2-configure-an-http-network-collector-for-datadog).

### Output to `stderr`

Expand Down
Loading
Loading