From b824e66a45480ee6762360fc3b8b0956d2b4ea1c Mon Sep 17 00:00:00 2001 From: Simplychee Date: Mon, 23 Dec 2024 16:55:35 +0200 Subject: [PATCH 01/17] ai agent rca --- docs/user-guide/observability/assistantiq.md | 34 ++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/docs/user-guide/observability/assistantiq.md b/docs/user-guide/observability/assistantiq.md index 25ba1797..70800e7c 100644 --- a/docs/user-guide/observability/assistantiq.md +++ b/docs/user-guide/observability/assistantiq.md @@ -18,7 +18,7 @@ You can now leverage the insights from your dialog and enhance data analysis to ![AI Agent screen](https://dytvr9ot2sszz.cloudfront.net/logz-docs/explore-dashboard/ai-agent-dec3.png) -

Using AI Agent

+## Using AI Agent AI Agent is available in **[Explore](https://app.logz.io/#/dashboard/explore)**, **[Kubernetes 360](https://app.logz.io/#/dashboard/observability/k8s360)**, and **[App 360](https://app.logz.io/#/dashboard/spm/services/table)**. Click the AI Agent button at the top to open the interface. @@ -37,6 +37,36 @@ Some data sources may not be available in all observability tools (Explore, App Once you provide input to the agent, the **dashboard's data** will be shared with Claude3. -![AI Agent screen](https://dytvr9ot2sszz.cloudfront.net/logz-docs/explore-dashboard/ai-agent-response-dec3.png) +ai-agent-answer + +## AI Agent Root Cause Analyzer + +Logz.io's Root Cause Analyzer (RCA) leverages GenAI to diagnose the root causes of exceptions within applications. By analyzing context and data, RCA delivers deep insights and actionable recommendations, streamlining the troubleshooting process and accelerating root cause analysis. + +RCA adapts dynamically to the specific context of each problem, functioning like a knowledgeable team member who understands the nuances of the issue and provides accurate and effective analysis. + +It comprehends the situation, identifies the necessary information for thorough analysis, and proactively seeks the data required. + +rca-popup + + +### How to use RCA + +:::info note +RCA is currently available to Logz.io users in the **US region** using **[Explore](https://docs.logz.io/docs/user-guide/new-explore/)**. +::: + + +To activate RCA, navigate to [Explore > Exceptions](https://app.logz.io/#/dashboard/explore). Select the exception you want to analyze, then hover over it and click **AI Analyzer** to activate the RCA process. + +rca-button + +Once activated, RCA begins a multi-step process, gathering relevant information, analyzing it, and taking further actions to identify the root cause of the issue. You can click on each step to view a detailed explanation of what RCA is doing to move closer to finding the root cause. + +Please note that the analysis may take a few minutes. Once completed, RCA will display its **Root Cause Analysis**, outlining possible causes for the issue and providing recommendations to address it or prevent it from recurring. + +rca-end + + For further assistance with the AI Agent, read the [FAQ](https://docs.logz.io/docs/user-guide/observability/faq) or [contact Logz.io's Support Team](mailto:help@logz.io). \ No newline at end of file From 7f9db674b68de7e408f0fbc7da36f2d73dbc817f Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 24 Dec 2024 10:41:14 +0200 Subject: [PATCH 02/17] note about token --- .../general-shipping/data-shipping-tokens_vars.md | 7 +++---- .../finding-your-metrics-account-token.md | 15 +++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/_include/general-shipping/data-shipping-tokens_vars.md b/docs/_include/general-shipping/data-shipping-tokens_vars.md index 1fe77c65..018f26fe 100644 --- a/docs/_include/general-shipping/data-shipping-tokens_vars.md +++ b/docs/_include/general-shipping/data-shipping-tokens_vars.md @@ -1,7 +1,6 @@ -From your account, go to the **Manage Tokens** > **Data shipping tokens** tab. of your Operations workspace. It can be reached by selecting ** > Settings > Manage tokens** in the **ADMIN ZONE** section of the side navigation menu. +From your account, go to the **Manage Tokens** > **Data shipping tokens** tab. Or select ** > Settings > Manage tokens** in the side navigation menu. -+ Click the product option. ++ Select the relevant telemetry (Logs, Metrics, or Traces). + The Listener URL for your account is displayed above the token table. -+ The token for each account is listed in the table along with the date it was created. - ++ The token for each account is listed in the table along with the date it was created. \ No newline at end of file diff --git a/docs/user-guide/admin/authentication-tokens/finding-your-metrics-account-token.md b/docs/user-guide/admin/authentication-tokens/finding-your-metrics-account-token.md index cd5f2fbc..a8fad335 100644 --- a/docs/user-guide/admin/authentication-tokens/finding-your-metrics-account-token.md +++ b/docs/user-guide/admin/authentication-tokens/finding-your-metrics-account-token.md @@ -6,7 +6,12 @@ description: Get and manage your metrics API tokens keywords: [api token management, api token, api, token, key creation, token authentication, security, secured login] --- -When you're setting up data shipping to your Metrics account, you'll need to include your Metrics shipping token. The token routes your data to the right account in Logz.io. +When setting up data shipping to your Metrics account, you'll need to include your Metrics shipping token. The token routes your data to the right account in Logz.io. + +:::important note +An account can have only **one** metrics token at a time. Multiple tokens are not supported. +::: + Here's how to get the metrics token: @@ -22,11 +27,9 @@ Here's how to get the metrics token: You must have admin permissions for the Logz.io Infrastructure Monitoring account to view the **Manage accounts** page. If you're not an admin user for the account, consult with an account admin to get the Infrastructure Monitoring token information. -From your main account, go to the **Manage accounts** page. It can be reached by selecting ** > Settings > Manage accounts**. +From your main account, navigate to **Manage accounts** page. It can be reached by selecting ** > Settings > Manage accounts**. -Scroll down to the Metrics account section, -and click the account you want to ship to. -The account's token and other settings are displayed. +Scroll to the Metrics Account section and select the account to which you want to ship data. This will display the account's token and configuration settings. -![Metrics Shipping Token](https://dytvr9ot2sszz.cloudfront.net/logz-docs/accounts/metrics-token-resized.png) +![Metrics Shipping Token](https://dytvr9ot2sszz.cloudfront.net/logz-docs/accounts/metrics-account-overview.png) From af4033a0bc04cd9db030ca88f977c47a0a23c63d Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 24 Dec 2024 14:29:26 +0200 Subject: [PATCH 03/17] editing trace section --- docs/shipping/App360/App360.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/shipping/App360/App360.md b/docs/shipping/App360/App360.md index ecfc31f1..e6795d63 100644 --- a/docs/shipping/App360/App360.md +++ b/docs/shipping/App360/App360.md @@ -174,11 +174,15 @@ service: traces: receivers: [otlp] processors: [tail_sampling, batch] - exporters: [logzio/traces, spanmetrics] + exporters: [logzio/traces] + traces/spm: + receivers: [otlp] + processors: [batch] + exporters: [spanmetrics] metrics/spanmetrics: receivers: [spanmetrics] processors: [metricstransform/metrics-rename, metricstransform/labels-rename] - exporters: [prometheusremotewrite/spm] + exporters: [prometheusremotewrite/spm] telemetry: logs: level: "debug" From ba99452c2f2e79e1ab0637c54be8615a5e06ba49 Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 24 Dec 2024 14:46:39 +0200 Subject: [PATCH 04/17] note about chart --- docs/shipping/Code/nestjs.md | 4 ++++ docs/shipping/Code/node-js.md | 4 ++++ docs/shipping/Code/python.md | 4 ++++ docs/shipping/Code/ruby.md | 4 ++++ docs/shipping/Orchestration/istio-traces.md | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/docs/shipping/Code/nestjs.md b/docs/shipping/Code/nestjs.md index 2fbe507e..081f133e 100644 --- a/docs/shipping/Code/nestjs.md +++ b/docs/shipping/Code/nestjs.md @@ -329,6 +329,10 @@ logzio-k8s-telemetry logzio-helm/logzio-k8s-telemetry #### Define the logzio-k8s-telemetry service dns +:::note +If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` +::: + In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. If you are not sure what your cluster domain name is, you can run the following command to look it up: diff --git a/docs/shipping/Code/node-js.md b/docs/shipping/Code/node-js.md index ebf77aec..df5fa60b 100644 --- a/docs/shipping/Code/node-js.md +++ b/docs/shipping/Code/node-js.md @@ -931,6 +931,10 @@ logzio-k8s-telemetry logzio-helm/logzio-k8s-telemetry #### Define the logzio-k8s-telemetry dns name +:::note +If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` +::: + In most cases, the service name will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. diff --git a/docs/shipping/Code/python.md b/docs/shipping/Code/python.md index f658e251..3c1609f6 100644 --- a/docs/shipping/Code/python.md +++ b/docs/shipping/Code/python.md @@ -1639,6 +1639,10 @@ logzio-monitoring logzio-helm/logzio-monitoring -n monitoring **3. Define the logzio-k8s-telemetry service DNS** +:::note +If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` +::: + Typically, the service name will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. If you're unsude what your cluster domain name is, run the following command to find it: ```shell diff --git a/docs/shipping/Code/ruby.md b/docs/shipping/Code/ruby.md index c3dec063..eab60862 100644 --- a/docs/shipping/Code/ruby.md +++ b/docs/shipping/Code/ruby.md @@ -185,6 +185,10 @@ logzio-k8s-telemetry logzio-helm/logzio-k8s-telemetry ### Define the logzio-k8s-telemetry service dns +:::note +If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` +::: + In most cases, the service name will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. diff --git a/docs/shipping/Orchestration/istio-traces.md b/docs/shipping/Orchestration/istio-traces.md index 98e5d1dc..746b8158 100644 --- a/docs/shipping/Orchestration/istio-traces.md +++ b/docs/shipping/Orchestration/istio-traces.md @@ -56,6 +56,10 @@ logzio-monitoring logzio-helm/logzio-monitoring ### 3. Define the logzio-k8s-telemetry service name +:::note +If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` +::: + In most cases, the service name will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. If you are not sure what your cluster domain name is, you can run the following command to look it up: From 9b846b122445528765e6835e95a322572628dddf Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 24 Dec 2024 16:17:17 +0200 Subject: [PATCH 05/17] edits --- docs/shipping/Code/nestjs.md | 21 ++++++++++-------- docs/shipping/Code/node-js.md | 21 +++++++++--------- docs/shipping/Code/python.md | 19 ++++++++++------ docs/shipping/Code/ruby.md | 21 ++++++++++-------- docs/shipping/Orchestration/istio-traces.md | 24 +++++++++++++-------- 5 files changed, 62 insertions(+), 44 deletions(-) diff --git a/docs/shipping/Code/nestjs.md b/docs/shipping/Code/nestjs.md index 081f133e..48006ba9 100644 --- a/docs/shipping/Code/nestjs.md +++ b/docs/shipping/Code/nestjs.md @@ -327,23 +327,26 @@ logzio-k8s-telemetry logzio-helm/logzio-k8s-telemetry {@include: ../../_include/tracing-shipping/replace-tracing-token.html} `<>` - Your Logz.io account region code. [Available regions](https://docs.logz.io/docs/user-guide/admin/hosting-regions/account-region/#available-regions). -#### Define the logzio-k8s-telemetry service dns +#### Define the service DNS -:::note -If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` -::: +You'll need the following service DNS: + +`http://<>.<>.svc.cluster.local:<>/`. + +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the port for your agent's protocol. +Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). + +If you're not sure what your cluster domain name is, you can run the following command to look it up: -In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. - -If you are not sure what your cluster domain name is, you can run the following command to look it up: - ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ sh -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' ``` It will deploy a small pod that extracts your cluster domain name from your Kubernetes environment. You can remove this pod after it has returned the cluster domain name. - + +In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. #### Download instrumentation packages diff --git a/docs/shipping/Code/node-js.md b/docs/shipping/Code/node-js.md index df5fa60b..fc1583e4 100644 --- a/docs/shipping/Code/node-js.md +++ b/docs/shipping/Code/node-js.md @@ -929,25 +929,26 @@ logzio-k8s-telemetry logzio-helm/logzio-k8s-telemetry {@include: ../../_include/tracing-shipping/replace-tracing-token.html} `<>` - Your Logz.io account region code. [Available regions](https://docs.logz.io/docs/user-guide/admin/hosting-regions/account-region/#available-regions). -#### Define the logzio-k8s-telemetry dns name +#### Define the DNS name -:::note -If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` -::: +You'll need the following service DNS: -In most cases, the service name will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. +`http://<>.<>.svc.cluster.local:<>/`. +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the port for your agent's protocol. +Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). + +If you're not sure what your cluster domain name is, you can run the following command to look it up: - -To find your cluster domain name, run the following command: - ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ shell -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' ``` - + This command deploys a temporary pod to extract your cluster domain name. You can remove the pod after retrieving the domain name. - + +In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. {@include: ../../_include/tracing-shipping/node-steps.md} diff --git a/docs/shipping/Code/python.md b/docs/shipping/Code/python.md index 3c1609f6..2ecdf596 100644 --- a/docs/shipping/Code/python.md +++ b/docs/shipping/Code/python.md @@ -1637,21 +1637,26 @@ logzio-monitoring logzio-helm/logzio-monitoring -n monitoring `<>` - Your Logz.io account region code. [Available regions](https://docs.logz.io/docs/user-guide/admin/hosting-regions/account-region/#available-regions). -**3. Define the logzio-k8s-telemetry service DNS** +**3. Define the service DNS** -:::note -If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` -::: +You'll need the following service DNS: + +`http://<>.<>.svc.cluster.local:<>/`. + +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the port for your agent's protocol. +Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). + +If you're not sure what your cluster domain name is, you can run the following command to look it up: -Typically, the service name will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. If you're unsude what your cluster domain name is, run the following command to find it: - ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ sh -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' ``` - + This command deploys a pod to extract your cluster domain name, which can be removed after. +In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. **4. Install general Python OpenTelemetry instrumentation components** diff --git a/docs/shipping/Code/ruby.md b/docs/shipping/Code/ruby.md index eab60862..bc844305 100644 --- a/docs/shipping/Code/ruby.md +++ b/docs/shipping/Code/ruby.md @@ -183,24 +183,27 @@ logzio-k8s-telemetry logzio-helm/logzio-k8s-telemetry `<>` - Your Logz.io account region code. [Available regions](https://docs.logz.io/docs/user-guide/admin/hosting-regions/account-region/#available-regions). -### Define the logzio-k8s-telemetry service dns +### Define the service DNS -:::note -If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` -::: +You'll need the following service DNS: +`http://<>.<>.svc.cluster.local:<>/`. + +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the port for your agent's protocol. +Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). + +If you're not sure what your cluster domain name is, you can run the following command to look it up: -In most cases, the service name will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. - -If you are not sure what your cluster domain name is, you can run the following command to look it up: - ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ sh -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' ``` - + It will deploy a small pod that extracts your cluster domain name from your Kubernetes environment. You can remove this pod after it has returned the cluster domain name. +In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. + ### Download instrumentation packages Run the following command from the application directory: diff --git a/docs/shipping/Orchestration/istio-traces.md b/docs/shipping/Orchestration/istio-traces.md index 746b8158..6b12e5a8 100644 --- a/docs/shipping/Orchestration/istio-traces.md +++ b/docs/shipping/Orchestration/istio-traces.md @@ -54,22 +54,28 @@ logzio-monitoring logzio-helm/logzio-monitoring {@include: ../../_include/tracing-shipping/replace-tracing-token.html} -### 3. Define the logzio-k8s-telemetry service name +### 3. Define the service DNS name -:::note -If you're using the unified logzio-monitoring chart, update the service to point to the specified host: `http://logzio-monitoring-otel-collector.monitoring.svc.cluster.local:4317/` -::: +### Define the service DNS + +You'll need the following service DNS: + +`http://<>.<>.svc.cluster.local:<>/`. + +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the port for your agent's protocol. +Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). + +If you're not sure what your cluster domain name is, you can run the following command to look it up: -In most cases, the service name will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. - -If you are not sure what your cluster domain name is, you can run the following command to look it up: - ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ sh -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' ``` - + It will deploy a small pod that extracts your cluster domain name from your Kubernetes environment. You can remove this pod after it has returned the cluster domain name. + +In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. ### 4. Set Istio to send traces to Logz.io From 2c879d5caba9cbe8e9c4d22f87cfba7e432b53ca Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 24 Dec 2024 16:48:46 +0200 Subject: [PATCH 06/17] even more changes --- docs/shipping/Code/nestjs.md | 10 ++++------ docs/shipping/Code/node-js.md | 7 +++---- docs/shipping/Code/python.md | 8 +++----- docs/shipping/Code/ruby.md | 7 +++---- docs/shipping/Orchestration/istio-traces.md | 13 ++++--------- 5 files changed, 17 insertions(+), 28 deletions(-) diff --git a/docs/shipping/Code/nestjs.md b/docs/shipping/Code/nestjs.md index 48006ba9..0151733c 100644 --- a/docs/shipping/Code/nestjs.md +++ b/docs/shipping/Code/nestjs.md @@ -331,22 +331,20 @@ logzio-k8s-telemetry logzio-helm/logzio-k8s-telemetry You'll need the following service DNS: -`http://<>.<>.svc.cluster.local:<>/`. +`http://<>-otel-collector.<>.svc.cluster.local:<>/`. Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). -Replace `<>` with the port for your agent's protocol. Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). +Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). If you're not sure what your cluster domain name is, you can run the following command to look it up: ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ -sh -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' +sh -c 'nslookup kubernetes.<> | grep Name | sed "s/Name:\skubernetes.<>//"' ``` -It will deploy a small pod that extracts your cluster domain name from your Kubernetes environment. You can remove this pod after it has returned the cluster domain name. - -In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. +It will deploy a small pod that extracts your cluster domain name from your Kubernetes environment. You can remove this pod after it has returned the cluster domain name. #### Download instrumentation packages diff --git a/docs/shipping/Code/node-js.md b/docs/shipping/Code/node-js.md index fc1583e4..70112b30 100644 --- a/docs/shipping/Code/node-js.md +++ b/docs/shipping/Code/node-js.md @@ -933,22 +933,21 @@ logzio-k8s-telemetry logzio-helm/logzio-k8s-telemetry You'll need the following service DNS: -`http://<>.<>.svc.cluster.local:<>/`. +`http://<>-otel-collector.<>.svc.cluster.local:<>/`. Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). -Replace `<>` with the port for your agent's protocol. Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). +Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). If you're not sure what your cluster domain name is, you can run the following command to look it up: ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ -shell -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' +shell -c 'nslookup kubernetes.<> | grep Name | sed "s/Name:\skubernetes.<>//"' ``` This command deploys a temporary pod to extract your cluster domain name. You can remove the pod after retrieving the domain name. -In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. {@include: ../../_include/tracing-shipping/node-steps.md} diff --git a/docs/shipping/Code/python.md b/docs/shipping/Code/python.md index 2ecdf596..74b958bb 100644 --- a/docs/shipping/Code/python.md +++ b/docs/shipping/Code/python.md @@ -1641,23 +1641,21 @@ logzio-monitoring logzio-helm/logzio-monitoring -n monitoring You'll need the following service DNS: -`http://<>.<>.svc.cluster.local:<>/`. +`http://<>-otel-collector.<>.svc.cluster.local:<>/`. Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). -Replace `<>` with the port for your agent's protocol. Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). +Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). If you're not sure what your cluster domain name is, you can run the following command to look it up: ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ -sh -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' +sh -c 'nslookup kubernetes.<> | grep Name | sed "s/Name:\skubernetes.<>//"' ``` This command deploys a pod to extract your cluster domain name, which can be removed after. -In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. - **4. Install general Python OpenTelemetry instrumentation components** ```shell diff --git a/docs/shipping/Code/ruby.md b/docs/shipping/Code/ruby.md index bc844305..042feb9e 100644 --- a/docs/shipping/Code/ruby.md +++ b/docs/shipping/Code/ruby.md @@ -187,22 +187,21 @@ logzio-k8s-telemetry logzio-helm/logzio-k8s-telemetry You'll need the following service DNS: -`http://<>.<>.svc.cluster.local:<>/`. +`http://<>-otel-collector.<>.svc.cluster.local:<>/`. Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). -Replace `<>` with the port for your agent's protocol. Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). +Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). If you're not sure what your cluster domain name is, you can run the following command to look it up: ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ -sh -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' +sh -c 'nslookup kubernetes.<> | grep Name | sed "s/Name:\skubernetes.<>//"' ``` It will deploy a small pod that extracts your cluster domain name from your Kubernetes environment. You can remove this pod after it has returned the cluster domain name. -In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. ### Download instrumentation packages diff --git a/docs/shipping/Orchestration/istio-traces.md b/docs/shipping/Orchestration/istio-traces.md index 6b12e5a8..6f490c57 100644 --- a/docs/shipping/Orchestration/istio-traces.md +++ b/docs/shipping/Orchestration/istio-traces.md @@ -56,27 +56,22 @@ logzio-monitoring logzio-helm/logzio-monitoring ### 3. Define the service DNS name -### Define the service DNS - You'll need the following service DNS: -`http://<>.<>.svc.cluster.local:<>/`. +`http://<>-otel-collector.<>.svc.cluster.local:<>/`. Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). -Replace `<>` with the port for your agent's protocol. Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). +Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). If you're not sure what your cluster domain name is, you can run the following command to look it up: ```shell kubectl run -it --image=k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3 --restart=Never shell -- \ -sh -c 'nslookup kubernetes.default | grep Name | sed "s/Name:\skubernetes.default//"' +sh -c 'nslookup kubernetes.<> | grep Name | sed "s/Name:\skubernetes.<>//"' ``` -It will deploy a small pod that extracts your cluster domain name from your Kubernetes environment. You can remove this pod after it has returned the cluster domain name. - -In most cases, the service dns will be `logzio-k8s-telemetry.default.svc.cluster.local`, where `default` is the namespace where you deployed the helm chart and `svc.cluster.name` is your cluster domain name. - +It will deploy a small pod that extracts your cluster domain name from your Kubernetes environment. You can remove this pod after it has returned the cluster domain name. ### 4. Set Istio to send traces to Logz.io From 5045b8966272019a379d5267266ebc3ff2953f51 Mon Sep 17 00:00:00 2001 From: Simplychee Date: Wed, 25 Dec 2024 12:50:42 +0200 Subject: [PATCH 07/17] edits --- docs/shipping/Code/nestjs.md | 2 +- docs/shipping/Code/python.md | 2 +- docs/shipping/Code/ruby.md | 2 +- docs/shipping/Orchestration/istio-traces.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/shipping/Code/nestjs.md b/docs/shipping/Code/nestjs.md index 0151733c..cba8b133 100644 --- a/docs/shipping/Code/nestjs.md +++ b/docs/shipping/Code/nestjs.md @@ -333,7 +333,7 @@ You'll need the following service DNS: `http://<>-otel-collector.<>.svc.cluster.local:<>/`. -Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`). Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). diff --git a/docs/shipping/Code/python.md b/docs/shipping/Code/python.md index 74b958bb..a1f01bf0 100644 --- a/docs/shipping/Code/python.md +++ b/docs/shipping/Code/python.md @@ -1643,7 +1643,7 @@ You'll need the following service DNS: `http://<>-otel-collector.<>.svc.cluster.local:<>/`. -Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`). Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). diff --git a/docs/shipping/Code/ruby.md b/docs/shipping/Code/ruby.md index 042feb9e..d46b0771 100644 --- a/docs/shipping/Code/ruby.md +++ b/docs/shipping/Code/ruby.md @@ -189,7 +189,7 @@ You'll need the following service DNS: `http://<>-otel-collector.<>.svc.cluster.local:<>/`. -Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`). Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). diff --git a/docs/shipping/Orchestration/istio-traces.md b/docs/shipping/Orchestration/istio-traces.md index 6f490c57..d2cff85c 100644 --- a/docs/shipping/Orchestration/istio-traces.md +++ b/docs/shipping/Orchestration/istio-traces.md @@ -60,7 +60,7 @@ You'll need the following service DNS: `http://<>-otel-collector.<>.svc.cluster.local:<>/`. -Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`). Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). From f807a8230d4bcfc83d912d8195a805f5e8d4f19f Mon Sep 17 00:00:00 2001 From: Simplychee Date: Wed, 25 Dec 2024 13:11:34 +0200 Subject: [PATCH 08/17] chart names --- docs/shipping/Code/nestjs.md | 2 +- docs/shipping/Code/node-js.md | 2 +- docs/shipping/Code/python.md | 2 +- docs/shipping/Code/ruby.md | 2 +- docs/shipping/Orchestration/istio-traces.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/shipping/Code/nestjs.md b/docs/shipping/Code/nestjs.md index cba8b133..c9e4805e 100644 --- a/docs/shipping/Code/nestjs.md +++ b/docs/shipping/Code/nestjs.md @@ -333,7 +333,7 @@ You'll need the following service DNS: `http://<>-otel-collector.<>.svc.cluster.local:<>/`. -Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`). +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`, `logzio-monitoring`). Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). diff --git a/docs/shipping/Code/node-js.md b/docs/shipping/Code/node-js.md index 70112b30..440b9f43 100644 --- a/docs/shipping/Code/node-js.md +++ b/docs/shipping/Code/node-js.md @@ -935,7 +935,7 @@ You'll need the following service DNS: `http://<>-otel-collector.<>.svc.cluster.local:<>/`. -Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry-otel-collector`, `logzio-k8s-telemetry`). +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`, `logzio-monitoring`). Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). diff --git a/docs/shipping/Code/python.md b/docs/shipping/Code/python.md index a1f01bf0..6cefea11 100644 --- a/docs/shipping/Code/python.md +++ b/docs/shipping/Code/python.md @@ -1643,7 +1643,7 @@ You'll need the following service DNS: `http://<>-otel-collector.<>.svc.cluster.local:<>/`. -Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`). +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`, `logzio-monitoring`). Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). diff --git a/docs/shipping/Code/ruby.md b/docs/shipping/Code/ruby.md index d46b0771..7b4368a7 100644 --- a/docs/shipping/Code/ruby.md +++ b/docs/shipping/Code/ruby.md @@ -189,7 +189,7 @@ You'll need the following service DNS: `http://<>-otel-collector.<>.svc.cluster.local:<>/`. -Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`). +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`, `logzio-monitoring`). Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). diff --git a/docs/shipping/Orchestration/istio-traces.md b/docs/shipping/Orchestration/istio-traces.md index d2cff85c..cf935ec0 100644 --- a/docs/shipping/Orchestration/istio-traces.md +++ b/docs/shipping/Orchestration/istio-traces.md @@ -60,7 +60,7 @@ You'll need the following service DNS: `http://<>-otel-collector.<>.svc.cluster.local:<>/`. -Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`). +Replace `<>` with the relevant service you're using (`logzio-k8s-telemetry`, `logzio-monitoring`). Replace `<>` with your Helm chart's deployment namespace (e.g., default or monitoring). Replace `<>` with the [port for your agent's protocol](https://github.com/logzio/logzio-helm/blob/master/charts/logzio-telemetry/values.yaml#L249-L267) (Default is 4317). From 97c75f7fafd5fd80cf6428cc866a0c9c5d06f234 Mon Sep 17 00:00:00 2001 From: Simplychee Date: Wed, 25 Dec 2024 14:47:09 +0200 Subject: [PATCH 09/17] debug to info --- docs/shipping/AWS/aws-ec2.md | 2 +- docs/shipping/AWS/aws-ecs-fargate.md | 2 +- docs/shipping/Operating-Systems/windows.md | 2 +- docs/shipping/Other/consul.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/shipping/AWS/aws-ec2.md b/docs/shipping/AWS/aws-ec2.md index fe33ad98..8ea6e3c3 100644 --- a/docs/shipping/AWS/aws-ec2.md +++ b/docs/shipping/AWS/aws-ec2.md @@ -134,7 +134,7 @@ service: exporters: [prometheusremotewrite] telemetry: logs: - level: "debug" + level: "info" metrics: address: localhost:8888 ``` diff --git a/docs/shipping/AWS/aws-ecs-fargate.md b/docs/shipping/AWS/aws-ecs-fargate.md index 3d34a4d7..4aa9fc10 100644 --- a/docs/shipping/AWS/aws-ecs-fargate.md +++ b/docs/shipping/AWS/aws-ecs-fargate.md @@ -176,7 +176,7 @@ service: exporters: [ prometheusremotewrite ] telemetry: logs: - level: "debug" + level: "info" ``` ### AWS::Lambda::Function The `logzioFirehoseSubscriptionFiltersFunction` Lambda function is designed to handle the process of filtering log data for Logz.io, and add and remove cloudwatch logs subscription filters diff --git a/docs/shipping/Operating-Systems/windows.md b/docs/shipping/Operating-Systems/windows.md index 7ce01983..f519e811 100644 --- a/docs/shipping/Operating-Systems/windows.md +++ b/docs/shipping/Operating-Systems/windows.md @@ -134,7 +134,7 @@ service: exporters: [prometheusremotewrite] telemetry: logs: - level: "debug" + level: "info" metrics: address: localhost:8888 ``` diff --git a/docs/shipping/Other/consul.md b/docs/shipping/Other/consul.md index 79cdf12b..eb73ee28 100644 --- a/docs/shipping/Other/consul.md +++ b/docs/shipping/Other/consul.md @@ -130,7 +130,7 @@ service: - prometheusremotewrite telemetry: logs: - level: "debug" + level: "info" ``` From 19a4bccb54d59f13f577aa4e2308e9c0b9b9181a Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 31 Dec 2024 12:06:53 +0200 Subject: [PATCH 10/17] adding deployment markers --- docs/user-guide/explore/deployment-markers.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/user-guide/explore/deployment-markers.md diff --git a/docs/user-guide/explore/deployment-markers.md b/docs/user-guide/explore/deployment-markers.md new file mode 100644 index 00000000..a1064a2b --- /dev/null +++ b/docs/user-guide/explore/deployment-markers.md @@ -0,0 +1,58 @@ +--- +sidebar_position: 3 +title: Deployment Markers +description: What are deployment markers and how you can utilize them +image: https://dytvr9ot2sszz.cloudfront.net/logz-docs/social-assets/docs-social.jpg +keywords: [logz.io, deployment, deployment markers, log analysis, observability, explore] +--- + +Deployment markers are indicators used to mark the exact point in time when a deployment or release occurs. These markers provide a visual reference, allowing teams to correlate deployments with system behavior changes. + +## Adding Deployment Markers to Explore + +To integrate your deployments with Explore, use the [API endpoint](https://api-docs.logz.io/docs/logz/deployments/) to create deployment markers. + +Here's an example payload: + +``` +{ + "markers": [ + { + "description": "marker description", + "title": "marker title", + "tag": "DEPLOYMENT", + "timestamp": 1613311091679, + "metadata": { + "region": "us-east-1", + "deployedBy": "bot" + } + } + ] +} +``` + +### 1. Select the markers you want to view + +The deployment logs sent via API appear as Deployment markers in Explore, accessible through the **Visualize** menu. + +Open **Visualize > Deployment markers** to view all markers within your search time frame. You can toggle markers on or off to focus on those most relevant to your analysis. + +![Select Deployment markers to enable them in Exception graphs](https://dytvr9ot2sszz.cloudfront.net/logz-docs/kibana-discover/select-deployments.png) + +### 2. View the markers in the Exceptions tab + +Hover over the markers in your histogram to view their title and time stamp. + +:::tip +When sending Deployment marker logs, it is recommended to send the service name in the **title** field. +::: + + +### 3. View additional details in the marker log + +Some of the fields in the deployment logs sent by API are not rendered. These include the **description** and additional **metadata** fields. + +You can run the search `_exists_: __logzio_marker_title` to retrieve your marker logs. Switch to the JSON log view to look up the additional details and context available for your Deployment markers. + +![Search deployment logs](https://dytvr9ot2sszz.cloudfront.net/logz-docs/kibana-discover/search-deployment-logs_aug2021.png) + From 464b6549cd9d1fc2395ec6787281b5ddab8843ab Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 31 Dec 2024 12:20:05 +0200 Subject: [PATCH 11/17] order --- docs/user-guide/explore/best-practices.md | 2 +- docs/user-guide/explore/deployment-markers.md | 2 +- docs/user-guide/explore/exceptions.md | 2 +- docs/user-guide/explore/save-search.md | 2 +- docs/user-guide/explore/troubleshooting/_category_.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/user-guide/explore/best-practices.md b/docs/user-guide/explore/best-practices.md index a3a5eb07..a32e3e6e 100644 --- a/docs/user-guide/explore/best-practices.md +++ b/docs/user-guide/explore/best-practices.md @@ -1,5 +1,5 @@ --- -sidebar_position: 8 +sidebar_position: 9 title: Explore Best Practices description: Best practices in Log management and Explore image: https://dytvr9ot2sszz.cloudfront.net/logz-docs/social-assets/docs-social.jpg diff --git a/docs/user-guide/explore/deployment-markers.md b/docs/user-guide/explore/deployment-markers.md index a1064a2b..13a7a4a1 100644 --- a/docs/user-guide/explore/deployment-markers.md +++ b/docs/user-guide/explore/deployment-markers.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 5 title: Deployment Markers description: What are deployment markers and how you can utilize them image: https://dytvr9ot2sszz.cloudfront.net/logz-docs/social-assets/docs-social.jpg diff --git a/docs/user-guide/explore/exceptions.md b/docs/user-guide/explore/exceptions.md index 1e0e9ded..cdd0b351 100644 --- a/docs/user-guide/explore/exceptions.md +++ b/docs/user-guide/explore/exceptions.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 title: Exceptions description: Find and highlight exceptions with Logz.io image: https://dytvr9ot2sszz.cloudfront.net/logz-docs/social-assets/docs-social.jpg diff --git a/docs/user-guide/explore/save-search.md b/docs/user-guide/explore/save-search.md index fec3a8ab..bd3c13b4 100644 --- a/docs/user-guide/explore/save-search.md +++ b/docs/user-guide/explore/save-search.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 title: Saved Search description: Save your search to easily access and share them image: https://dytvr9ot2sszz.cloudfront.net/logz-docs/social-assets/docs-social.jpg diff --git a/docs/user-guide/explore/troubleshooting/_category_.json b/docs/user-guide/explore/troubleshooting/_category_.json index e7ce12b5..ed671a1d 100644 --- a/docs/user-guide/explore/troubleshooting/_category_.json +++ b/docs/user-guide/explore/troubleshooting/_category_.json @@ -1,6 +1,6 @@ { "label": "Troubleshooting", - "position": 8, + "position": 10, "link": { "type": "generated-index", "description": "Troubleshooting guides for common logs and Explore issues." From 95f71e8b9c625d9ca9723e3cfa9dc09802bb660b Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 31 Dec 2024 13:36:13 +0200 Subject: [PATCH 12/17] nested metrics --- docs/shipping/Code/go.md | 225 +++++++++++++++++++-------------------- 1 file changed, 112 insertions(+), 113 deletions(-) diff --git a/docs/shipping/Code/go.md b/docs/shipping/Code/go.md index f04a538c..05123195 100644 --- a/docs/shipping/Code/go.md +++ b/docs/shipping/Code/go.md @@ -112,6 +112,118 @@ if err != nil { l.Stop() // Drains the log buffer ``` + + + +This integration uses the OpenTelemetry logging exporter to send logs to Logz.io via the OpenTelemetry Protocol (OTLP) listener. + +### Prerequisites + +- Go 1.21 or newer + +:::note +If you need an example aplication to test this integration, please refer to our [Go OpenTelemetry repository](https://github.com/logzio/opentelemetry-examples/tree/main/go/logs). +::: + +### Configure the instrumentation + + +1. Install OpenTelemetry dependencies: + + ```bash + go get go.opentelemetry.io/otel + go get go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp + go get go.opentelemetry.io/otel/exporters/stdout/stdoutlog + ``` + +2. Create a new file named `otel.go` and add the following code to set up OpenTelemetry logging: + + + ```go + package main + + import ( + "context" + "fmt" + "log" + + "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp" + "go.opentelemetry.io/otel/exporters/stdout/stdoutlog" + "go.opentelemetry.io/otel/log/global" + sdklog "go.opentelemetry.io/otel/sdk/log" + ) + + func newLoggerProvider() (*sdklog.LoggerProvider, error) { + // Create stdout log exporter + stdoutExporter, err := stdoutlog.New(stdoutlog.WithPrettyPrint()) + if err != nil { + return nil, fmt.Errorf("failed to create stdout exporter: %w", err) + } + + // Create OTLP HTTP log exporter for Logz.io + httpExporter, err := otlploghttp.New(context.Background(), + otlploghttp.WithEndpoint("otlp-listener.logz.io"), + otlploghttp.WithHeaders(map[string]string{ + "Authorization": "Bearer ", + "user-agent": "logzio-go-logs-otlp", + }), + otlploghttp.WithURLPath("/v1/logs"), + ) + if err != nil { + return nil, fmt.Errorf("failed to create OTLP HTTP exporter: %w", err) + } + + // Create a logger provider with both exporters + loggerProvider := sdklog.NewLoggerProvider( + sdklog.WithProcessor(sdklog.NewBatchProcessor(stdoutExporter)), // For stdout + sdklog.WithProcessor(sdklog.NewBatchProcessor(httpExporter)), // For HTTP export + ) + + return loggerProvider, nil + } + + // setupOTelSDK bootstraps the OpenTelemetry logging pipeline. + func setupOTelSDK(ctx context.Context) (shutdown func(context.Context) error, err error) { + // Set up logger provider. + loggerProvider, err := newLoggerProvider() + if err != nil { + return nil, err + } + + // Set the global logger provider + global.SetLoggerProvider(loggerProvider) + + // Return a shutdown function + shutdown = func(ctx context.Context) error { + err := loggerProvider.Shutdown(ctx) + if err != nil { + log.Printf("Error during logger provider shutdown: %v", err) + } + return err + } + + return shutdown, nil + } + + ``` + + + {@include: ../../_include/log-shipping/log-shipping-token.md} + Update the `listener.logz.io` part in `https://otlp-listener.logz.io/v1/logs` with the URL for [your hosting region](https://docs.logz.io/docs/user-guide/admin/hosting-regions/account-region). + + +3. Run your application. + +### Check Logz.io for your logs + + +Allow some time for data ingestion, then open [Open Search Dashboards](https://app.logz.io/#/dashboard/osd). + +Encounter an issue? See our [log shipping troubleshooting](https://docs.logz.io/docs/user-guide/log-management/troubleshooting/log-shipping-troubleshooting/) guide. + + + + ## Metrics @@ -379,119 +491,6 @@ Install the pre-built dashboard to enhance the observability of your metrics. {@include: ../../_include/metric-shipping/generic-dashboard.html} - - - -This integration uses the OpenTelemetry logging exporter to send logs to Logz.io via the OpenTelemetry Protocol (OTLP) listener. - -### Prerequisites - -- Go 1.21 or newer - -:::note -If you need an example aplication to test this integration, please refer to our [Go OpenTelemetry repository](https://github.com/logzio/opentelemetry-examples/tree/main/go/logs). -::: - -### Configure the instrumentation - - -1. Install OpenTelemetry dependencies: - - ```bash - go get go.opentelemetry.io/otel - go get go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp - go get go.opentelemetry.io/otel/exporters/stdout/stdoutlog - ``` - -2. Create a new file named `otel.go` and add the following code to set up OpenTelemetry logging: - - - ```go - package main - - import ( - "context" - "fmt" - "log" - - "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp" - "go.opentelemetry.io/otel/exporters/stdout/stdoutlog" - "go.opentelemetry.io/otel/log/global" - sdklog "go.opentelemetry.io/otel/sdk/log" - ) - - func newLoggerProvider() (*sdklog.LoggerProvider, error) { - // Create stdout log exporter - stdoutExporter, err := stdoutlog.New(stdoutlog.WithPrettyPrint()) - if err != nil { - return nil, fmt.Errorf("failed to create stdout exporter: %w", err) - } - - // Create OTLP HTTP log exporter for Logz.io - httpExporter, err := otlploghttp.New(context.Background(), - otlploghttp.WithEndpoint("otlp-listener.logz.io"), - otlploghttp.WithHeaders(map[string]string{ - "Authorization": "Bearer ", - "user-agent": "logzio-go-logs-otlp", - }), - otlploghttp.WithURLPath("/v1/logs"), - ) - if err != nil { - return nil, fmt.Errorf("failed to create OTLP HTTP exporter: %w", err) - } - - // Create a logger provider with both exporters - loggerProvider := sdklog.NewLoggerProvider( - sdklog.WithProcessor(sdklog.NewBatchProcessor(stdoutExporter)), // For stdout - sdklog.WithProcessor(sdklog.NewBatchProcessor(httpExporter)), // For HTTP export - ) - - return loggerProvider, nil - } - - // setupOTelSDK bootstraps the OpenTelemetry logging pipeline. - func setupOTelSDK(ctx context.Context) (shutdown func(context.Context) error, err error) { - // Set up logger provider. - loggerProvider, err := newLoggerProvider() - if err != nil { - return nil, err - } - - // Set the global logger provider - global.SetLoggerProvider(loggerProvider) - - // Return a shutdown function - shutdown = func(ctx context.Context) error { - err := loggerProvider.Shutdown(ctx) - if err != nil { - log.Printf("Error during logger provider shutdown: %v", err) - } - return err - } - - return shutdown, nil - } - - ``` - - - {@include: ../../_include/log-shipping/log-shipping-token.md} - Update the `listener.logz.io` part in `https://otlp-listener.logz.io/v1/logs` with the URL for [your hosting region](https://docs.logz.io/docs/user-guide/admin/hosting-regions/account-region). - - -3. Run your application. - -### Check Logz.io for your logs - - -Allow some time for data ingestion, then open [Open Search Dashboards](https://app.logz.io/#/dashboard/osd). - -Encounter an issue? See our [log shipping troubleshooting](https://docs.logz.io/docs/user-guide/log-management/troubleshooting/log-shipping-troubleshooting/) guide. - - - - - ## Traces From 077baa2ae44e3dd940ba6dec23d3d2a421af2d2f Mon Sep 17 00:00:00 2001 From: Simplychee Date: Sun, 5 Jan 2025 14:53:57 +0200 Subject: [PATCH 13/17] support help center link --- docusaurus.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index cd5b4063..e0bce563 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -192,6 +192,10 @@ const config = { label: 'Videos', href: 'https://logz.io/learn/video/', }, + { + label: 'Support Help Center', + href: 'https://logzio-support.atlassian.net/servicedesk/customer/portals', + }, { label: 'Notices for 3rd Party Software included with the Logz.io Platform', to: 'https://dytvr9ot2sszz.cloudfront.net/logz-docs/legal/3rd-party-software-included-with-the-logz.io-platform-sep-2022.pdf', From 486f3512dcc8521e5306ef8e13984b44c6dd9b45 Mon Sep 17 00:00:00 2001 From: bardabun Date: Tue, 7 Jan 2025 12:59:03 +0200 Subject: [PATCH 14/17] Update python.md --- docs/shipping/Code/python.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/shipping/Code/python.md b/docs/shipping/Code/python.md index 6cefea11..5787b71e 100644 --- a/docs/shipping/Code/python.md +++ b/docs/shipping/Code/python.md @@ -1451,10 +1451,10 @@ The OpenTelemetry Collector receives traces from the application and exports the #### Build Docker Images -Build Docker images for both the Node.js application and the OpenTelemetry Collector: +Build Docker images for both the Python application and the OpenTelemetry Collector: ```shell -# Build Node.js application image +# Build Python application image cd python-app/ docker build --platform linux/amd64 -t your-python-app:latest . @@ -1490,7 +1490,7 @@ aws logs create-log-group --log-group-name /ecs/otel-collector #### Define ECS Task -Create a task definition (task-definition.json) for ECS that defines both the Node.js application container and the OpenTelemetry Collector container. +Create a task definition (task-definition.json) for ECS that defines both the Python application container and the OpenTelemetry Collector container. #### task-definition.json From b29750550d4db3a1b723c2d9e11d774faa8f95ca Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 7 Jan 2025 13:33:18 +0200 Subject: [PATCH 15/17] images --- docs/user-guide/explore/deployment-markers.md | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/user-guide/explore/deployment-markers.md b/docs/user-guide/explore/deployment-markers.md index 13a7a4a1..55bd1409 100644 --- a/docs/user-guide/explore/deployment-markers.md +++ b/docs/user-guide/explore/deployment-markers.md @@ -8,11 +8,11 @@ keywords: [logz.io, deployment, deployment markers, log analysis, observability, Deployment markers are indicators used to mark the exact point in time when a deployment or release occurs. These markers provide a visual reference, allowing teams to correlate deployments with system behavior changes. -## Adding Deployment Markers to Explore +## Adding deployment markers to Explore -To integrate your deployments with Explore, use the [API endpoint](https://api-docs.logz.io/docs/logz/deployments/) to create deployment markers. +To integrate deployments markers with Explore, use the [API endpoint](https://api-docs.logz.io/docs/logz/deployments/) to create markers. -Here's an example payload: +Below is an example payload: ``` { @@ -31,23 +31,24 @@ Here's an example payload: } ``` -### 1. Select the markers you want to view +### Viewing deployment markers -The deployment logs sent via API appear as Deployment markers in Explore, accessible through the **Visualize** menu. +Deployment logs sent via the API will appear as deployment markers in Explore. You can find them in the **Visualize** menu. -Open **Visualize > Deployment markers** to view all markers within your search time frame. You can toggle markers on or off to focus on those most relevant to your analysis. +Open **Visualize > Deployment markers** to view all markers within your selected time frame. Toggle markers on or off to focus on the most relevant ones for your analysis. -![Select Deployment markers to enable them in Exception graphs](https://dytvr9ot2sszz.cloudfront.net/logz-docs/kibana-discover/select-deployments.png) +add-deployment-marker -### 2. View the markers in the Exceptions tab +Once added, deployment markers will be displayed across your histogram. Hover over a marker to view additional details such as its title, timestamp, and description. + +![View deployment markers](https://dytvr9ot2sszz.cloudfront.net/logz-docs/explore-dashboard/view-deployment-markers.png) -Hover over the markers in your histogram to view their title and time stamp. :::tip -When sending Deployment marker logs, it is recommended to send the service name in the **title** field. +Include the service name in the `title` field when sending deployment marker logs for easier identification. ::: - + \ No newline at end of file From afce09565d08489dc2dca644001876d155a36af0 Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 7 Jan 2025 15:35:08 +0200 Subject: [PATCH 16/17] marker logs --- docs/user-guide/explore/deployment-markers.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/user-guide/explore/deployment-markers.md b/docs/user-guide/explore/deployment-markers.md index 55bd1409..b2ab7070 100644 --- a/docs/user-guide/explore/deployment-markers.md +++ b/docs/user-guide/explore/deployment-markers.md @@ -48,13 +48,10 @@ Once added, deployment markers will be displayed across your histogram. Hover ov Include the service name in the `title` field when sending deployment marker logs for easier identification. ::: - \ No newline at end of file +![Search deployment logs](https://dytvr9ot2sszz.cloudfront.net/logz-docs/explore-dashboard/deployment-json-view.png) \ No newline at end of file From c6d260f4ff1b6ef26e5f1c5f9f97a899a40ae455 Mon Sep 17 00:00:00 2001 From: Simplychee Date: Tue, 7 Jan 2025 15:39:42 +0200 Subject: [PATCH 17/17] image --- docs/user-guide/explore/deployment-markers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/explore/deployment-markers.md b/docs/user-guide/explore/deployment-markers.md index b2ab7070..ba1e2e7a 100644 --- a/docs/user-guide/explore/deployment-markers.md +++ b/docs/user-guide/explore/deployment-markers.md @@ -37,7 +37,7 @@ Deployment logs sent via the API will appear as deployment markers in Explore. Y Open **Visualize > Deployment markers** to view all markers within your selected time frame. Toggle markers on or off to focus on the most relevant ones for your analysis. -add-deployment-marker +add-deployment-marker Once added, deployment markers will be displayed across your histogram. Hover over a marker to view additional details such as its title, timestamp, and description.