From e1bbd3e0ad331ca39357be406627a74d378d2a9f Mon Sep 17 00:00:00 2001
From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Date: Thu, 19 Dec 2024 23:55:27 +1100
Subject: [PATCH] [8.x] Update the annotation step in the OTel Kubernetes flow
(#204260) (#204917)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
# Backport
This will backport the following commits from `main` to `8.x`:
- [Update the annotation step in the OTel Kubernetes flow
(#204260)](https://github.com/elastic/kibana/pull/204260)
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
Co-authored-by: Giorgos Bamparopoulos
---
.../otel_kubernetes/otel_kubernetes_panel.tsx | 77 ++++++++++++++-----
1 file changed, 59 insertions(+), 18 deletions(-)
diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx
index 942cecb13aeeb..cf7fd341a1cab 100644
--- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx
+++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx
@@ -18,11 +18,14 @@ import {
EuiFlexGroup,
EuiFlexItem,
EuiButtonEmpty,
+ EuiAccordion,
+ useEuiTheme,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { FormattedMessage } from '@kbn/i18n-react';
import { DASHBOARD_APP_LOCATOR } from '@kbn/deeplinks-analytics';
+import { css } from '@emotion/react';
import { EmptyPrompt } from '../shared/empty_prompt';
import { GetStartedPanel } from '../shared/get_started_panel';
import { FeedbackButtons } from '../shared/feedback_buttons';
@@ -44,6 +47,7 @@ export const OtelKubernetesPanel: React.FC = () => {
} = useKibana();
const apmLocator = share.url.locators.get('APM_LOCATOR');
const dashboardLocator = share.url.locators.get(DASHBOARD_APP_LOCATOR);
+ const theme = useEuiTheme();
if (error) {
return (
@@ -187,7 +191,7 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\
'xpack.observability_onboarding.otelKubernetesPanel.theOperatorAutomatesTheLabel',
{
defaultMessage:
- 'Enable automatic instrumentation for your applications by annotating the pods template (spec.template.metadata.annotations) in your Deployment or relevant workload object (StatefulSet, Job, CronJob, etc.)',
+ 'The Operator automates the injection of auto-instrumentation libraries into the annotated pods for some languages.',
}
)}
@@ -225,9 +229,27 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\
]}
/>
-
- {`# To annotate specific deployment Pods modify its manifest
-apiVersion: apps/v1
+
+ {i18n.translate(
+ 'xpack.observability_onboarding.otelKubernetesPanel.step3a.title',
+ { defaultMessage: '3(a) - Start with one of these annotations methods:' }
+ )}
+
+
+
+
+ {`apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
@@ -242,24 +264,43 @@ spec:
containers:
- image: myapplication-image
name: app
- ...
-
-# To annotate all resources in a namespace
-kubectl annotate namespace my-namespace instrumentation.opentelemetry.io/inject-${idSelected}="${namespace}/elastic-instrumentation"
-
-# Restart your deployment
-kubectl rollout restart deployment myapp -n my-namespace
+ ...`}
+
+
+
+
+
+ {`kubectl annotate namespace my-namespace instrumentation.opentelemetry.io/inject-${idSelected}="${namespace}/elastic-instrumentation"`}
+
+
+
+
+ {i18n.translate(
+ 'xpack.observability_onboarding.otelKubernetesPanel.step3b.title',
+ {
+ defaultMessage:
+ '3(b) - Restart deployment and ensure the annotations are applied and the auto-instrumentation library is injected:',
+ }
+ )}
+
+
+
+ {`kubectl rollout restart deployment myapp -n my-namespace
-# Check annotations have been applied correctly and auto-instrumentation library is injected
kubectl describe pod -n my-namespace`}
-
-