Skip to content

Add Operator Path to APM Single Step Instrumentation#22007

Merged
brett0000FF merged 13 commits intomasterfrom
brett0000FF/ssi-k8operator
Mar 29, 2024
Merged

Add Operator Path to APM Single Step Instrumentation#22007
brett0000FF merged 13 commits intomasterfrom
brett0000FF/ssi-k8operator

Conversation

@brett0000FF
Copy link
Copy Markdown
Contributor

@brett0000FF brett0000FF commented Feb 29, 2024

What does this PR do? What is the motivation?

  • Split Kubernetes tab into Helm and Operator.
  • Add content for Operator.

Preview: https://docs-staging.datadoghq.com/brett0000FF/ssi-k8operator/tracing/trace_collection/automatic_instrumentation/single-step-apm/?tab=kubernetes

TODO

  • Verify code snippets for new Operator instructions.

Merge instructions

  • Please merge after reviewing

Additional notes

@brett0000FF brett0000FF requested a review from a team as a code owner February 29, 2024 20:34
@github-actions
Copy link
Copy Markdown
Contributor

Preview links (active after the build_preview check completes)

Modified Files

@brett0000FF brett0000FF requested a review from Kyle-Verhoog March 4, 2024 18:59
@brett0000FF brett0000FF requested a review from a team as a code owner March 13, 2024 23:03
@github-actions github-actions bot added the Architecture Everything related to the Doc backend label Mar 13, 2024
@github-actions github-actions bot removed the Architecture Everything related to the Doc backend label Mar 15, 2024
```
2. Create `datadog-agent.yaml` with the spec of your Datadog Agent deployment configuration. The simplest configuration is as follows:
```yaml
kind: DatadogAgent
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch these two lines places

apiSecret:
secretName: datadog-secret
keyName: api-key
appSecret:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove this

{{< collapse-content title="Installing with Datadog Operator" level="h4" >}}

### Installation
To enable single step instrumentation with the Datadog Operator:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add more context here. Following the steps below will add support of SSI in the whole cluster: we will be emitting traces for every app written in one of SSI-supported languages in the cluster.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, not sure where is the best place to add, but worth mentioning that SSI is supported by Operator 1.5.0+.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I'm adding that extra context to each section, and I'm adding the Operator version to step 1.

</ul>
</div>

3. Run the following command:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After applying datadog-agent.yaml, we should allow few minutes for Datadog Cluster Agent to complete its leader election process. Only after that restarting apps will result in instrumentation.

datadog:
apiKeyExistingSecret: datadog-secret
site: <DATADOG_SITE>
You can choose to enable or disable instrumentation for applications in specific namespaces. The file you need to configure depends on if you enabled Single Step Instrumentation with Datadog Operator or Helm:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add the following information:

  1. enabledNamespaces and disabledNamespaces cannot be set at the same time. This will result in SSI configuration not being applied at all.
  2. By default, kube-system namespace and the namespace where Datadog resources are running are not instrumented.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For point 2, I think this is essentially covered by the note we have at the beginning of the installation section:

<div class="alert alert-info">Single Step Instrumentation doesn't instrument applications in the namespace where you install the Datadog Agent. It's recommended to install the Agent in a separate namespace in your cluster where you don't run your applications.</div>

What do you think?

@liliyadd
Copy link
Copy Markdown

Few nits:

  1. At the very beginning where we say

You can enable APM by installing the Agent with either:

Datadog Operator
Datadog Helm chart

The links don't lead anywhere.

  1. The section

Here you can also optionally configure the following:
Enabling or disabling instrumentation for namespaces.
Specifying tracing library versions.
Choosing specific pod specifications.

I'm not sure Choosing specific pod specifications needs to be part of this instruction. It's an alternate way to SSI of instrumentation, not the part of it.

@brett0000FF brett0000FF merged commit af92bfe into master Mar 29, 2024
@brett0000FF brett0000FF deleted the brett0000FF/ssi-k8operator branch March 29, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants