From bd452fe904abcfe07a0b6e4fc089ece22fc28bf7 Mon Sep 17 00:00:00 2001 From: Domas Date: Tue, 26 Sep 2023 16:52:32 +0300 Subject: [PATCH] Trace View: Remove "deployment.environment" default traces 2 logs tag (#74986) * Remove deployment.environment default tag * format * remove mentions from docs --- docs/sources/datasources/jaeger/_index.md | 20 +++++++++---------- .../tempo/configure-tempo-data-source.md | 20 +++++++++---------- docs/sources/datasources/zipkin/_index.md | 20 +++++++++---------- .../TraceToLogs/TraceToLogsSettings.tsx | 2 +- .../explore/TraceView/createSpanLink.tsx | 10 +--------- 5 files changed, 32 insertions(+), 40 deletions(-) diff --git a/docs/sources/datasources/jaeger/_index.md b/docs/sources/datasources/jaeger/_index.md index b7578eaffe3..91143aed8b5 100644 --- a/docs/sources/datasources/jaeger/_index.md +++ b/docs/sources/datasources/jaeger/_index.md @@ -110,16 +110,16 @@ To use a variable you need to wrap it in `${}`. For example: `${__span.name}`. The following table describes the ways in which you can configure your trace to logs settings: -| Setting name | Description | -| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Data source** | Defines the target data source. You can select only Loki or Splunk \[logs\] data sources. | -| **Span start time shift** | Shifts the start time for the logs query, based on the span's start time. You can use time units, such as `5s`, `1m`, `3h`. To extend the time to the past, use a negative value. Default: `0`. | -| **Span end time shift** | Shifts the end time for the logs query, based on the span's end time. You can use time units. Default: `0`. | -| **Tags** | Defines the tags to use in the logs query. Default: `cluster`, `hostname`, `namespace`, `pod`, `service.name`, `service.namespace`, `deployment.environment`. You can change the tag name for example to remove dots from the name if they are not allowed in the target data source. For example, map `http.status` to `http_status`. | -| **Filter by trace ID** | Toggles whether to append the trace ID to the logs query. | -| **Filter by span ID** | Toggles whether to append the span ID to the logs query. | -| **Use custom query** | Toggles use of custom query with interpolation. | -| **Query** | Input to write custom query. Use variable interpolation to customize it with variables from span. | +| Setting name | Description | +| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Data source** | Defines the target data source. You can select only Loki or Splunk \[logs\] data sources. | +| **Span start time shift** | Shifts the start time for the logs query, based on the span's start time. You can use time units, such as `5s`, `1m`, `3h`. To extend the time to the past, use a negative value. Default: `0`. | +| **Span end time shift** | Shifts the end time for the logs query, based on the span's end time. You can use time units. Default: `0`. | +| **Tags** | Defines the tags to use in the logs query. Default: `cluster`, `hostname`, `namespace`, `pod`, `service.name`, `service.namespace`. You can change the tag name for example to remove dots from the name if they are not allowed in the target data source. For example, map `http.status` to `http_status`. | +| **Filter by trace ID** | Toggles whether to append the trace ID to the logs query. | +| **Filter by span ID** | Toggles whether to append the span ID to the logs query. | +| **Use custom query** | Toggles use of custom query with interpolation. | +| **Query** | Input to write custom query. Use variable interpolation to customize it with variables from span. | ### Trace to metrics diff --git a/docs/sources/datasources/tempo/configure-tempo-data-source.md b/docs/sources/datasources/tempo/configure-tempo-data-source.md index aab61bce8f8..8cdc4264cb4 100644 --- a/docs/sources/datasources/tempo/configure-tempo-data-source.md +++ b/docs/sources/datasources/tempo/configure-tempo-data-source.md @@ -93,16 +93,16 @@ To use a variable you need to wrap it in `${}`. For example `${__span.name}`. The following table describes the ways in which you can configure your trace to logs settings: -| Setting name | Description | -| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Data source** | Defines the target data source. You can select only Loki or Splunk \[logs\] data sources. | -| **Span start time shift** | Shifts the start time for the logs query, based on the span's start time. You can use time units, such as `5s`, `1m`, `3h`. To extend the time to the past, use a negative value. Default: `0`. | -| **Span end time shift** | Shifts the end time for the logs query, based on the span's end time. You can use time units. Default: `0`. | -| **Tags** | Defines the tags to use in the logs query. Default: `cluster`, `hostname`, `namespace`, `pod`, `service.name`, `service.namespace`, `deployment.environment`. You can change the tag name for example to remove dots from the name if they are not allowed in the target data source. For example, map `http.status` to `http_status`. | -| **Filter by trace ID** | Toggles whether to append the trace ID to the logs query. | -| **Filter by span ID** | Toggles whether to append the span ID to the logs query. | -| **Use custom query** | Toggles use of custom query with interpolation. | -| **Query** | Input to write custom query. Use variable interpolation to customize it with variables from span. | +| Setting name | Description | +| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Data source** | Defines the target data source. You can select only Loki or Splunk \[logs\] data sources. | +| **Span start time shift** | Shifts the start time for the logs query, based on the span's start time. You can use time units, such as `5s`, `1m`, `3h`. To extend the time to the past, use a negative value. Default: `0`. | +| **Span end time shift** | Shifts the end time for the logs query, based on the span's end time. You can use time units. Default: `0`. | +| **Tags** | Defines the tags to use in the logs query. Default: `cluster`, `hostname`, `namespace`, `pod`, `service.name`, `service.namespace`. You can change the tag name for example to remove dots from the name if they are not allowed in the target data source. For example, map `http.status` to `http_status`. | +| **Filter by trace ID** | Toggles whether to append the trace ID to the logs query. | +| **Filter by span ID** | Toggles whether to append the span ID to the logs query. | +| **Use custom query** | Toggles use of custom query with interpolation. | +| **Query** | Input to write custom query. Use variable interpolation to customize it with variables from span. | ## Trace to metrics diff --git a/docs/sources/datasources/zipkin/_index.md b/docs/sources/datasources/zipkin/_index.md index e90bb21c76b..c1d96a86256 100644 --- a/docs/sources/datasources/zipkin/_index.md +++ b/docs/sources/datasources/zipkin/_index.md @@ -108,16 +108,16 @@ To use a variable you need to wrap it in `${}`. For example `${__span.name}`. The following table describes the ways in which you can configure your trace to logs settings: -| Setting name | Description | -| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Data source** | Defines the target data source. You can select only Loki or Splunk \[logs\] data sources. | -| **Span start time shift** | Shifts the start time for the logs query, based on the span's start time. You can use time units, such as `5s`, `1m`, `3h`. To extend the time to the past, use a negative value. Default: `0`. | -| **Span end time shift** | Shifts the end time for the logs query, based on the span's end time. You can use time units. Default: `0`. | -| **Tags** | Defines the tags to use in the logs query. Default: `cluster`, `hostname`, `namespace`, `pod`, `service.name`, `service.namespace`, `deployment.environment`. You can change the tag name for example to remove dots from the name if they are not allowed in the target data source. For example, map `http.status` to `http_status`. | -| **Filter by trace ID** | Toggles whether to append the trace ID to the logs query. | -| **Filter by span ID** | Toggles whether to append the span ID to the logs query. | -| **Use custom query** | Toggles use of custom query with interpolation. | -| **Query** | Input to write custom query. Use variable interpolation to customize it with variables from span. | +| Setting name | Description | +| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Data source** | Defines the target data source. You can select only Loki or Splunk \[logs\] data sources. | +| **Span start time shift** | Shifts the start time for the logs query, based on the span's start time. You can use time units, such as `5s`, `1m`, `3h`. To extend the time to the past, use a negative value. Default: `0`. | +| **Span end time shift** | Shifts the end time for the logs query, based on the span's end time. You can use time units. Default: `0`. | +| **Tags** | Defines the tags to use in the logs query. Default: `cluster`, `hostname`, `namespace`, `pod`, `service.name`, `service.namespace`. You can change the tag name for example to remove dots from the name if they are not allowed in the target data source. For example, map `http.status` to `http_status`. | +| **Filter by trace ID** | Toggles whether to append the trace ID to the logs query. | +| **Filter by span ID** | Toggles whether to append the span ID to the logs query. | +| **Use custom query** | Toggles use of custom query with interpolation. | +| **Query** | Input to write custom query. Use variable interpolation to customize it with variables from span. | ### Trace to metrics diff --git a/public/app/core/components/TraceToLogs/TraceToLogsSettings.tsx b/public/app/core/components/TraceToLogs/TraceToLogsSettings.tsx index f5a201340cd..b0b1e7dd793 100644 --- a/public/app/core/components/TraceToLogs/TraceToLogsSettings.tsx +++ b/public/app/core/components/TraceToLogs/TraceToLogsSettings.tsx @@ -156,7 +156,7 @@ export function TraceToLogsSettings({ options, onOptionsChange }: Props) { diff --git a/public/app/features/explore/TraceView/createSpanLink.tsx b/public/app/features/explore/TraceView/createSpanLink.tsx index 4cd70903c08..930edd74c89 100644 --- a/public/app/features/explore/TraceView/createSpanLink.tsx +++ b/public/app/features/explore/TraceView/createSpanLink.tsx @@ -115,15 +115,7 @@ export function createSpanLinkFactory({ /** * Default keys to use when there are no configured tags. */ -const defaultKeys = [ - 'cluster', - 'hostname', - 'namespace', - 'pod', - 'service.name', - 'service.namespace', - 'deployment.environment', -].map((k) => ({ +const defaultKeys = ['cluster', 'hostname', 'namespace', 'pod', 'service.name', 'service.namespace'].map((k) => ({ key: k, value: k.includes('.') ? k.replace('.', '_') : undefined, }));