Skip to content

Commit

Permalink
[Observability Onboarding] Adjust wording for instrumentation and doc…
Browse files Browse the repository at this point in the history
… links (#198164)

Closes #197620


![Image](https://github.com/user-attachments/assets/e94dd9ff-bd5b-49a6-9b39-fdf54a4e3e58)

* Newly introduced cert-manager doc link goes to
https://ela.st/8-16-otel-cert-manager
* Instrumentation docs link goes to
https://ela.st/8-16-otel-apm-instrumentation
* Code sample for instrumentation replaced

---------

Co-authored-by: Mykola Harmash <[email protected]>
  • Loading branch information
flash1293 and mykolaharmash authored Oct 30, 2024
1 parent 7cad9c3 commit 03c8c4a
Showing 1 changed file with 40 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\
<p>
<FormattedMessage
id="xpack.observability_onboarding.otelKubernetesPanel.injectAutoinstrumentationLibrariesForLabel"
defaultMessage="Install the OpenTelemetry Operator using the kube-stack Helm chart and the provided values file. For automatic certificate renewal, we recommend installing the {link}."
defaultMessage="Install the OpenTelemetry Operator using the kube-stack Helm chart and the provided values file. For automatic certificate renewal, we recommend installing the {link}, and customize the values.yaml file before the installation as described {doc}."
values={{
link: (
<EuiLink
Expand All @@ -115,6 +115,18 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\
)}
</EuiLink>
),
doc: (
<EuiLink
href="https://ela.st/8-16-otel-cert-manager"
target="_blank"
data-test-subj="observabilityOnboardingOtelKubernetesPanelCertManagerDocsLink"
>
{i18n.translate(
'xpack.observability_onboarding.otelKubernetesPanel.certmanagerDocsLinkLabel',
{ defaultMessage: 'in our documentation' }
)}
</EuiLink>
),
}}
/>{' '}
<EuiIconTip
Expand Down Expand Up @@ -175,7 +187,7 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\
'xpack.observability_onboarding.otelKubernetesPanel.theOperatorAutomatesTheLabel',
{
defaultMessage:
'The Operator automates the injection of auto-instrumentation libraries into the annotated pods for some languages.',
'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.)',
}
)}
</p>
Expand Down Expand Up @@ -213,17 +225,33 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\
]}
/>
<EuiSpacer />
<EuiCodeBlock paddingSize="m" language="yaml" lineNumbers={{ highlight: '5-6' }}>
{`apiVersion: v1
kind: Pod
<EuiCodeBlock paddingSize="m" language="yaml">
{`# To annotate specific deployment Pods modify its manifest
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
annotations:
instrumentation.opentelemetry.io/inject-${idSelected}: "${namespace}/elastic-instrumentation"
name: myapp
spec:
containers:
- name: my-app
image: my-app:latest`}
...
template:
metadata:
annotations:
instrumentation.opentelemetry.io/inject-${idSelected}: "${namespace}/elastic-instrumentation"
...
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
# Check annotations have been applied correctly and auto-instrumentation library is injected
kubectl describe pod <myapp-pod-name> -n my-namespace`}
</EuiCodeBlock>
<EuiSpacer />
<CopyToClipboardButton
Expand All @@ -239,7 +267,7 @@ spec:
values={{
link: (
<EuiLink
href={`/path`}
href="https://ela.st/8-16-otel-apm-instrumentation"
data-test-subj="observabilityOnboardingOtelKubernetesPanelReferToTheDocumentationLink"
target="_blank"
>
Expand Down

0 comments on commit 03c8c4a

Please sign in to comment.