Skip to content

Commit

Permalink
Document Datadog Serverless Plugin, Macro and CLI (DataDog#8423)
Browse files Browse the repository at this point in the history
* Document Datadog Serverless Plugin, Macro and CLI

* removing duplicate

* Apply suggestions from code review

Co-authored-by: Kaylyn Sigler <kaylyn.sigler@datadoghq.com>
  • Loading branch information
tianchu and Kaylyn Sigler authored Sep 28, 2020
1 parent d1f51cc commit 8f049cc
Show file tree
Hide file tree
Showing 25 changed files with 351 additions and 203 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ content/en/serverless/datadog_lambda_library/nodejs.md
content/en/serverless/datadog_lambda_library/ruby.md
content/en/serverless/datadog_lambda_library/go.md
content/en/serverless/datadog_lambda_library/java.md
content/en/serverless/serverless_integrations/plugin.md
content/en/serverless/serverless_integrations/macro.md
content/en/serverless/serverless_integrations/cli.md

# Runtime data
pids
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ build_live:
variables:
CONFIG: ${LIVE_CONFIG}
URL: ${LIVE_DOMAIN}
UNTRACKED_EXTRAS: "data,content/en/agent/basic_agent_usage/heroku.md,content/en/agent/basic_agent_usage/ansible.md,content/en/agent/basic_agent_usage/chef.md,content/en/agent/basic_agent_usage/puppet.md,content/en/developers/integrations,content/en/agent/basic_agent_usage/saltstack.md,content/en/developers/amazon_cloudformation.md,content/en/integrations,content/en/logs/log_collection/android.md,content/en/logs/log_collection/ios.md,content/en/tracing/setup/android.md,content/en/tracing/setup/ruby.md,content/en/security_monitoring/default_rules,content/en/serverless/forwarder.md,content/en/serverless/datadog_lambda_library/python.md,content/en/serverless/datadog_lambda_library/nodejs.md,content/en/serverless/datadog_lambda_library/ruby.md,content/en/serverless/datadog_lambda_library/go.md,content/en/serverless/datadog_lambda_library/java.md,content/en/real_user_monitoring/android.md,content/en/real_user_monitoring/browser/_index.md"
UNTRACKED_EXTRAS: "data,content/en/agent/basic_agent_usage/heroku.md,content/en/agent/basic_agent_usage/ansible.md,content/en/agent/basic_agent_usage/chef.md,content/en/agent/basic_agent_usage/puppet.md,content/en/developers/integrations,content/en/agent/basic_agent_usage/saltstack.md,content/en/developers/amazon_cloudformation.md,content/en/integrations,content/en/logs/log_collection/android.md,content/en/logs/log_collection/ios.md,content/en/tracing/setup/android.md,content/en/tracing/setup/ruby.md,content/en/security_monitoring/default_rules,content/en/serverless/forwarder.md,content/en/serverless/datadog_lambda_library/python.md,content/en/serverless/datadog_lambda_library/nodejs.md,content/en/serverless/datadog_lambda_library/ruby.md,content/en/serverless/datadog_lambda_library/go.md,content/en/serverless/datadog_lambda_library/java.md,content/en/real_user_monitoring/android.md,content/en/real_user_monitoring/browser/_index.md,content/en/serverless/serverless_integrations/plugin.md,content/en/serverless/serverless_integrations/macro.md,content/en/serverless/serverless_integrations/cli.md"
CONFIGURATION_FILE: "./local/bin/py/build/configurations/pull_config.yaml"
LOCAL: "False"
script:
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ clean-auto-doc: ##Remove all doc automatically created
rm -f content/en/serverless/datadog_lambda_library/go.md ;fi
@if [ content/en/serverless/datadog_lambda_library/java.md ]; then \
rm -f content/en/serverless/datadog_lambda_library/java.md ;fi
@if [ content/en/serverless/serverless_integrations/plugin.md ]; then \
rm -f content/en/serverless/serverless_integrations/plugin.md ;fi
@if [ content/en/serverless/serverless_integrations/macro.md ]; then \
rm -f content/en/serverless/serverless_integrations/macro.md ;fi
@if [ content/en/serverless/serverless_integrations/cli.md ]; then \
rm -f content/en/serverless/serverless_integrations/cli.md ;fi
@if [ content/en/real_user_monitoring/android.md ]; then \
rm -f content/en/real_user_monitoring/android.md ;fi
@if [ content/en/real_user_monitoring/browser/_index.md ]; then \
Expand Down
16 changes: 16 additions & 0 deletions config/_default/menus/menus.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,24 @@ main:
weight: 6
- name: Serverless Integrations
url: serverless/serverless_integrations
identifier: serverless_integrations
parent: serverless
weight: 7
- name: Datadog Serverless Plugin
url: serverless/serverless_integrations/plugin
parent: serverless_integrations
identifier: serverless_integrations_plugin
weight: 701
- name: Datadog Serverless Macro
url: serverless/serverless_integrations/macro
parent: serverless_integrations
identifier: serverless_integrations_macro
weight: 702
- name: Datadog Serverless CLI
url: serverless/serverless_integrations/cli
parent: serverless_integrations
identifier: serverless_integrations_cli
weight: 703
- name: Serverless Tagging
url: serverless/serverless_tagging
parent: serverless
Expand Down
2 changes: 1 addition & 1 deletion content/en/account_management/rbac/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ Proceed to archive creation, or update at any moment while editing the archive.

Use the Logs Archive API either to [assign][1] or [revoke][2] a role from a given Archive.


[1]: /api/v2/logs-archives/#grant-role-to-an-archive
[2]: /api/v2/logs-archives/#revoke-role-from-an-archive

{{% /tab %}}
{{< /tabs >}}

Expand Down
1 change: 0 additions & 1 deletion content/en/agent/docker/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,3 @@ etcdctl set /datadog/check_configs/httpd/instances '[[{"apache_status_url": "htt
[8]: /integrations/gunicorn/
[9]: /integrations/apache/#setup
[10]: /integrations/http_check/#setup
[11]: /getting_started/tagging/unified_service_tagging/?tab=docker#containerized-environment
1 change: 0 additions & 1 deletion content/en/agent/docker/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,3 @@ For Kubernetes environements, refer to the [Kubernetes short lived container doc
[8]: /agent/logs/advanced_log_collection/?tab=docker#multi-line-aggregation
[9]: /agent/guide/autodiscovery-management/
[10]: /agent/kubernetes/log/#short-lived-containers
[11]: /integrations/journald/?tab=host#filter-journal-units
46 changes: 23 additions & 23 deletions content/en/agent/kubernetes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ To install the Datadog Agent on your Kubernetes cluster:

| Metrics | Logs | APM | Process | NPM | Linux | Windows |
|---------|------|-----|---------|-----|------------------------|-------------------------|
| X | X | X | X | | [Manifest template][3] | [Manifest template][5] |
| X | X | X | | | [Manifest template][7] | [Manifest template][9] |
| X | X | | | | [Manifest template][11] | [Manifest template][12] |
| X | | X | | | [Manifest template][16] | [Manifest template][17] |
| | | | | X | [Manifest template][18] | no template |
| X | | | | | [Manifest template][19] | [Manifest template][20] |
| X | X | X | X | | [Manifest template][3] | [Manifest template][4] |
| X | X | X | | | [Manifest template][5] | [Manifest template][6] |
| X | X | | | | [Manifest template][7] | [Manifest template][8] |
| X | | X | | | [Manifest template][9] | [Manifest template][10] |
| | | | | X | [Manifest template][11] | no template |
| X | | | | | [Manifest template][12] | [Manifest template][13] |

To enable trace collection completely, [extra steps are required on your application Pod configuration][14]. Refer also to the [logs][15], [APM][4], [processes][6], and [Network Performance Monitoring][8] documentation pages to learn how to enable each feature individually.
To enable trace collection completely, [extra steps are required on your application Pod configuration][14]. Refer also to the [logs][15], [APM][16], [processes][17], and [Network Performance Monitoring][18] documentation pages to learn how to enable each feature individually.

**Note**: Those manifests are set for the `default` namespace by default. If you are in a custom namespace, update the `metadata.namespace` parameter before applying them.

Expand All @@ -152,7 +152,7 @@ To install the Datadog Agent on your Kubernetes cluster:
datadog-agent 2 2 2 2 2 <none> 10s
```

7. Optional - **Setup Kubernetes State metrics**: Download the [Kube-State manifests folder][10] and apply them to your Kubernetes cluster to automatically collects [kube-state metrics][13]:
7. Optional - **Setup Kubernetes State metrics**: Download the [Kube-State manifests folder][19] and apply them to your Kubernetes cluster to automatically collects [kube-state metrics][20]:

```shell
kubectl apply -f <NAME_OF_THE_KUBE_STATE_MANIFESTS_FOLDER>
Expand All @@ -161,23 +161,23 @@ To install the Datadog Agent on your Kubernetes cluster:
[1]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
[2]: https://app.datadoghq.com/account/settings#api
[3]: /resources/yaml/datadog-agent-all-features.yaml
[4]: /agent/kubernetes/apm/
[5]: /resources/yaml/datadog-agent-windows-all-features.yaml
[6]: /infrastructure/process/?tab=kubernetes#installation
[7]: /resources/yaml/datadog-agent-logs-apm.yaml
[8]: /network_performance_monitoring/installation/
[9]: /resources/yaml/datadog-agent-windows-logs-apm.yaml
[10]: https://github.com/kubernetes/kube-state-metrics/tree/master/examples/standard
[11]: /resources/yaml/datadog-agent-logs.yaml
[12]: /resources/yaml/datadog-agent-windows-logs.yaml
[13]: /agent/kubernetes/data_collected/#kube-state-metrics
[4]: /resources/yaml/datadog-agent-windows-all-features.yaml
[5]: /resources/yaml/datadog-agent-logs-apm.yaml
[6]: /resources/yaml/datadog-agent-windows-logs-apm.yaml
[7]: /resources/yaml/datadog-agent-logs.yaml
[8]: /resources/yaml/datadog-agent-windows-logs.yaml
[9]: /resources/yaml/datadog-agent-apm.yaml
[10]: /resources/yaml/datadog-agent-windows-apm.yaml
[11]: /resources/yaml/datadog-agent-npm.yaml
[12]: /resources/yaml/datadog-agent-vanilla.yaml
[13]: /resources/yaml/datadog-agent-windows-vanilla.yaml
[14]: /agent/kubernetes/apm/#setup
[15]: /agent/kubernetes/log/
[16]: /resources/yaml/datadog-agent-apm.yaml
[17]: /resources/yaml/datadog-agent-windows-apm.yaml
[18]: /resources/yaml/datadog-agent-npm.yaml
[19]: /resources/yaml/datadog-agent-vanilla.yaml
[20]: /resources/yaml/datadog-agent-windows-vanilla.yaml
[16]: /agent/kubernetes/apm/
[17]: /infrastructure/process/?tab=kubernetes#installation
[18]: /network_performance_monitoring/installation/
[19]: https://github.com/kubernetes/kube-state-metrics/tree/master/examples/standard
[20]: /agent/kubernetes/data_collected/#kube-state-metrics
{{% /tab %}}
{{% tab "Operator" %}}

Expand Down
36 changes: 18 additions & 18 deletions content/en/logs/processing/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ Datadog reserves the right to disable underperforming parsing rules, processors,

JSON Logs preprocessing applies on all logs before they actually enter [Log Pipelines][1] processing. Preprocessing runs a series of operations based on reserved attributes:

* Trigger new [log integrations][16] based on the **source** of incoming logs.
* Append incoming logs with all [**host** tags][22].
* Apply reserved attribute remapper processors (namely [**date** remapper][12], [**status** remapper][15], [**service** remapper][19], [**message** remapper][20] and [**trace ID** remapper][21]) for the related JSON attributes of all incoming JSON logs.
* Trigger new [log integrations][12] based on the **source** of incoming logs.
* Append incoming logs with all [**host** tags][13].
* Apply reserved attribute remapper processors (namely [**date** remapper][14], [**status** remapper][15], [**service** remapper][16], [**message** remapper][17] and [**trace ID** remapper][18]) for the related JSON attributes of all incoming JSON logs.

JSON Logs pre processing comes with a default configuration that works for standard log forwarders. Edit this configuration at any time to adapt to custom or specific log forwarding approaches. To change the default values, go to the [configuration page][5] and edit `Pre processing for JSON logs`:

Expand All @@ -88,9 +88,9 @@ JSON Logs pre processing comes with a default configuration that works for stand

### *source* attribute

If a JSON formatted log file includes the `ddsource` attribute, Datadog interprets its value as the log's source. To use the same source names Datadog uses, see the [Integration Pipeline Library][16].
If a JSON formatted log file includes the `ddsource` attribute, Datadog interprets its value as the log's source. To use the same source names Datadog uses, see the [Integration Pipeline Library][12].

**Note**: Logs coming from a containerized environment require the use of an [environment variable][17] to override the default source and service values.
**Note**: Logs coming from a containerized environment require the use of an [environment variable][19] to override the default source and service values.


### *host* attribute
Expand All @@ -115,7 +115,7 @@ By default Datadog generates a timestamp and appends it in a date attribute when
* `published_date`
* `syslog.timestamp`

You can also specify alternate attributes to use as the source of a log's date by setting a [log date remapper processor][12].
You can also specify alternate attributes to use as the source of a log's date by setting a [log date remapper processor][14].

**Note**: Datadog rejects a log entry if its official date is older than 18 hours in the past.

Expand All @@ -125,7 +125,7 @@ The recognized date formats are: <a href="https://www.iso.org/iso-8601-date-and-

### *message* attribute

By default, Datadog ingests the message value as the body of the log entry. That value is then highlighted and displayed in the [logstream][13], where it is indexed for [full text search][14].
By default, Datadog ingests the message value as the body of the log entry. That value is then highlighted and displayed in the [logstream][20], where it is indexed for [full text search][21].

### *status* attribute

Expand All @@ -147,7 +147,7 @@ Using the Datadog Agent or the RFC5424 format automatically sets the service val

### *trace_id* attribute

By default, [Datadog tracers can automatically inject trace and span IDs in the logs][18]. However, if a JSON formatted log includes the following attributes, Datadog interprets its value as the log's `trace_id`:
By default, [Datadog tracers can automatically inject trace and span IDs in the logs][22]. However, if a JSON formatted log includes the following attributes, Datadog interprets its value as the log's `trace_id`:

* `dd.trace_id`
* `contextMap.dd.trace_id`
Expand All @@ -168,14 +168,14 @@ By default, [Datadog tracers can automatically inject trace and span IDs in the
[9]: /logs/processing/parsing/
[10]: /logs/faq/log-parsing-best-practice/
[11]: /logs/faq/how-to-investigate-a-log-parsing-issue/
[12]: /logs/processing/processors/#log-date-remapper
[13]: /logs/explorer/?tab=logstream#visualization
[14]: /logs/explorer/search/
[12]: https://app.datadoghq.com/logs/pipelines/pipeline/library
[13]: /getting_started/tagging/#introduction
[14]: /logs/processing/processors/#log-date-remapper
[15]: /logs/processing/processors/#log-status-remapper
[16]: https://app.datadoghq.com/logs/pipelines/pipeline/library
[17]: /agent/docker/log/#examples
[18]: /tracing/connect_logs_and_traces/
[19]: /logs/processing/processors/?tab=ui#service-remapper
[20]: /logs/processing/processors/?tab=ui#log-message-remapper
[21]: /logs/processing/processors/?tab=ui#trace-remapper
[22]: /getting_started/tagging/#introduction
[16]: /logs/processing/processors/?tab=ui#service-remapper
[17]: /logs/processing/processors/?tab=ui#log-message-remapper
[18]: /logs/processing/processors/?tab=ui#trace-remapper
[19]: /agent/docker/log/#examples
[20]: /logs/explorer/?tab=logstream#visualization
[21]: /logs/explorer/search/
[22]: /tracing/connect_logs_and_traces/
12 changes: 6 additions & 6 deletions content/en/monitors/service_level_objectives/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For example, if you have a Metric Monitor that is configured to alert when user

1. Select a single monitor or,
2. Select multiple monitors (up to 20) or,
3. Select a single [multi-alert monitor][6] and select specific monitor groups (up to 20) to be included in SLO calculation using the **Calculate on selected groups** toggle.
3. Select a single [multi-alert monitor][5] and select specific monitor groups (up to 20) to be included in SLO calculation using the **Calculate on selected groups** toggle.

**Supported Monitor Types:**

Expand Down Expand Up @@ -74,7 +74,7 @@ In certain cases, there is an exception to the status calculation for monitor-ba

By changing any of these conditions to something other than their defaults, the overall status for a monitor-based SLO using just that one Synthetic test could appear to be better than the aggregated statuses of the Synthetic test's individual groups.

For more information on Synthetic test alerting conditions, visit the Synthetic Monitoring [documentation][7].
For more information on Synthetic test alerting conditions, visit the Synthetic Monitoring [documentation][6].

## Underlying monitor and SLO histories

Expand All @@ -86,7 +86,7 @@ Datadog recommends against using monitors with `Alert Recovery Threshold` and `W

SLO calculations do not take into account when a monitor is resolved manually or as a result of the **_After x hours automatically resolve this monitor from a triggered state_** setting. If these are important tools for your workflow, consider cloning your monitor, removing auto-resolve settings and `@-notification`s, and using the clone for your SLO.

Confirm you are using the preferred SLI type for your use case. Datadog supports monitor-based SLIs and metric-based SLIs as [described in the SLO metric documentation][5].
Confirm you are using the preferred SLI type for your use case. Datadog supports monitor-based SLIs and metric-based SLIs as [described in the SLO metric documentation][7].

## Further Reading

Expand All @@ -96,6 +96,6 @@ Confirm you are using the preferred SLI type for your use case. Datadog supports
[2]: https://app.datadoghq.com/slo
[3]: https://app.datadoghq.com/slo/new/monitor
[4]: https://app.datadoghq.com/monitors#create
[5]: /monitors/service_level_objectives/metric/
[6]: /monitors/monitor_types/metric/?tab=threshold#alert-grouping
[7]: /synthetics/api_tests/?tab=httptest#alert-conditions
[5]: /monitors/monitor_types/metric/?tab=threshold#alert-grouping
[6]: /synthetics/api_tests/?tab=httptest#alert-conditions
[7]: /monitors/service_level_objectives/metric/
1 change: 1 addition & 0 deletions content/en/real_user_monitoring/browser/data_collected.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ Custom User Actions are User Actions declared and sent manually via the [`addUse
| `user_action.type` | string | Type of the user action. For [Custom User Actions][5], it is set to `custom`. |
| `event.name` | string | Name of the user action. For automatically collected User Actions, the element which the user interacted with. |


[1]: /real_user_monitoring/browser/?tab=us#initialization-parameters
[2]: /real_user_monitoring/browser/advanced_configuration/?tab=npm#add-global-context
[3]: /real_user_monitoring/browser/advanced_configuration/?tab=npm#custom-user-actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ datadog-ci sourcemaps upload /path/to/dist \
--minified-path-prefix=https://hostname.com/static/js
```

[1]: https://app.datadoghq.com/account/settings#api

[1]: https://app.datadoghq.com/account/settings#api
{{% /tab %}}
{{% tab "EU" %}}

Expand All @@ -99,8 +99,8 @@ datadog-ci sourcemaps upload /path/to/dist \
--minified-path-prefix=https://hostname.com/static/js
```

[1]: https://app.datadoghq.com/account/settings#api

[1]: https://app.datadoghq.com/account/settings#api
{{% /tab %}}
{{< /tabs >}}

Expand Down
Loading

0 comments on commit 8f049cc

Please sign in to comment.