← Back to Pull requests

Document setup of OpenResty instrumentation for APM #40696

Merged
duncanhewett merged 1 files (19 lines) on Oct 15, 2026 22:01 UTC
View on GitHub
duncanhewett duncanhewett commented on Oct 14, 2026 18:55 UTC
Author

<!-- Note: Please remember to review the Datadog Documentation Contribution Guidelines if you have not yet done so. -->

What does this PR do? What is the motivation?

OpenResty is supported by the NGINX module but not currently documented.

<!-- _Brief_ description of context for changes, the problem you're solving, from the user's and reviewer's perspectives, NOT a detailed itemization or justification. The reviewer needs to be able to quickly understand why the changes were made. Keep it short. See PR Etiquette for examples. -->

Merge readiness

  • Ready for merge

  • <!--
    If you're waiting for a release or there are other considerations that you want us to be aware of, list them here. If the PR is ready to be merged once it receives the required reviews, check the box above after you've created the PR.
    -->

    AI assistance

    <!-- If you used AI tools (Claude Code, GitHub Copilot, Cursor, etc.) while working on this PR, briefly note how. This helps reviewers understand the contribution. Examples: "Used Claude Code for initial draft", "Copilot autocomplete for code examples", "AI-assisted research, manually written". Leave blank if not applicable. -->

    For Datadog employees:

  • ⚠️ Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). If you've already created your PR with an incorrect branch name, please rename your branch and open a fresh PR.

  • 🤖 New: Comment with /review to run an automated check that catches common issues before a Documentation team member reviews your PR.
  • Additional notes

    <!-- Anything else we should know when reviewing?-->

    <!-- Previewing the PR: Assuming you are a Datadog employee and named your branch <yourname>/<description>, a preview build will run and links to the preview output will be auto-generated and posted in the PR comments. The links will 404 until the preview build is finished running. -->

    Diff: 19 lines (+18 / -1) across 1 files Reviewer: melamos Review duration: 1626m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.21) × (1 − Review Confidence (0.74)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.21 · 19 lines diff across 1 files
    0.21
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.53 · 5 substantive comment(s)
    0.53
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    74%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.179
    Real PR Conversation Timeline
    13 items
    github-actions[bot] github-actions[bot] commented on Oct 14, 2026 18:59 UTC
    Bot

    Preview links (active after the build_preview check completes)

    Modified Files


  • https://docs-staging.datadoghq.com/duncan.hewett/openresty-tracing/tracing/trace_collection/proxy_setup/nginx
  • melamos melamos commented on code on Oct 14, 2026 19:19 UTC
    Code Review
    hugo/content/en/tracing/trace_collection/proxy_setup/nginx.md:1
    @@ -344,6 +345,18 @@ To set a different service name per Ingress using annotations:
     ```
     The above overrides the default `nginx-ingress-controller.ingress-nginx` service name.
     
    +## OpenResty

    ## OpenResty with Datadog module
    

    Optional: this parallels ## NGINX with Datadog module and gives the section a more specific heading. If you take it, update the #openresty anchor on line 25 to #openresty-with-datadog-module.

    melamos melamos commented on code on Oct 14, 2026 19:19 UTC
    Code Review
    hugo/content/en/tracing/trace_collection/proxy_setup/nginx.md:1
    @@ -344,6 +345,18 @@ To set a different service name per Ingress using annotations:
     ```
     The above overrides the default `nginx-ingress-controller.ingress-nginx` service name.
     
    +## OpenResty
    +
    +OpenResty is built on NGINX, and each nginx-datadog release includes a separate OpenResty build of the module. The setup is similar to [NGINX with Datadog module](#nginx-with-datadog-module).

    It's not clear why users should care about NGINX setup here, so I'm suggesting deleting that sentence. If there's some reason for them to follow that link (for example, for additional configuration options or something), better to say so explicitly.

    OpenResty is built on NGINX, and each `nginx-datadog` release includes a separate OpenResty build of the module.
    

    melamos melamos commented on code on Oct 14, 2026 19:19 UTC
    Code Review
    hugo/content/en/tracing/trace_collection/proxy_setup/nginx.md:1
    @@ -344,6 +345,18 @@ To set a different service name per Ingress using annotations:
     ```
     The above overrides the default `nginx-ingress-controller.ingress-nginx` service name.
     
    +## OpenResty
    +
    +OpenResty is built on NGINX, and each nginx-datadog release includes a separate OpenResty build of the module. The setup is similar to [NGINX with Datadog module](#nginx-with-datadog-module).
    +
    +To install the Datadog NGINX module for OpenResty:
    +1. Download the appropriate `openresty-` prefixed version from the [latest nginx-datadog GitHub release][1].
    +2. Choose the tarball corresponding to the specific OpenResty, version and CPU architecture. Use the four-part OpenResty version from `openresty -v` (for example, `1.31.1.1`), not the NGINX core version it is built on.

    2. Choose the tarball that matches your OpenResty version and CPU architecture. Use the four-part OpenResty version from `openresty -v` (for example, `1.31.1.1`), not the NGINX core version it's built on.
    

    melamos melamos commented on code on Oct 14, 2026 19:19 UTC
    Code Review
    hugo/content/en/tracing/trace_collection/proxy_setup/nginx.md:1
    @@ -344,6 +345,18 @@ To set a different service name per Ingress using annotations:
     ```
     The above overrides the default `nginx-ingress-controller.ingress-nginx` service name.
     
    +## OpenResty
    +
    +OpenResty is built on NGINX, and each nginx-datadog release includes a separate OpenResty build of the module. The setup is similar to [NGINX with Datadog module](#nginx-with-datadog-module).
    +
    +To install the Datadog NGINX module for OpenResty:
    +1. Download the appropriate `openresty-` prefixed version from the [latest nginx-datadog GitHub release][1].
    +2. Choose the tarball corresponding to the specific OpenResty, version and CPU architecture. Use the four-part OpenResty version from `openresty -v` (for example, `1.31.1.1`), not the NGINX core version it is built on.
    +
    +Extract the `ngx_http_datadog_module.so` file from the downloaded tarball using `tar` and place it in `/usr/local/openresty/nginx/modules`, creating this directory if necessary. Add the `load_module` directive at the top of `/usr/local/openresty/nginx/conf/nginx.conf`.

    3. Extract `ngx_http_datadog_module.so` from the tarball and place it in `/usr/local/openresty/nginx/modules`. Create the directory if it doesn't exist.
    4. At the top of `/usr/local/openresty/nginx/conf/nginx.conf`, load the module:
    
        
    nginx
    load_module modules/ngx_http_datadog_module.so;

    These are sequential steps, so they belong in the numbered list. The section also needs its own load_module example so it works on its own without the NGINX section.

    melamos melamos commented on code on Oct 14, 2026 19:19 UTC
    Code Review
    hugo/content/en/tracing/trace_collection/proxy_setup/nginx.md:1
    @@ -344,6 +345,18 @@ To set a different service name per Ingress using annotations:
     ```
     The above overrides the default `nginx-ingress-controller.ingress-nginx` service name.
     
    +## OpenResty
    +
    +OpenResty is built on NGINX, and each nginx-datadog release includes a separate OpenResty build of the module. The setup is similar to [NGINX with Datadog module](#nginx-with-datadog-module).
    +
    +To install the Datadog NGINX module for OpenResty:
    +1. Download the appropriate `openresty-` prefixed version from the [latest nginx-datadog GitHub release][1].
    +2. Choose the tarball corresponding to the specific OpenResty, version and CPU architecture. Use the four-part OpenResty version from `openresty -v` (for example, `1.31.1.1`), not the NGINX core version it is built on.
    +
    +Extract the `ngx_http_datadog_module.so` file from the downloaded tarball using `tar` and place it in `/usr/local/openresty/nginx/modules`, creating this directory if necessary. Add the `load_module` directive at the top of `/usr/local/openresty/nginx/conf/nginx.conf`.
    +
    +The `datadog_*` directives and the `DD_` environment variables behave the same as on NGINX.

    The `datadog_*` directives described in the module's [API documentation][4] and the `DD_*` environment variables work the same way in OpenResty as in NGINX.
    

    melamos melamos commented on code on Oct 14, 2026 19:26 UTC
    Code Review
    hugo/content/en/tracing/trace_collection/proxy_setup/nginx.md:1
    @@ -344,6 +345,18 @@ To set a different service name per Ingress using annotations:
     ```
     The above overrides the default `nginx-ingress-controller.ingress-nginx` service name.
     
    +## OpenResty
    +
    +OpenResty is built on NGINX, and each nginx-datadog release includes a separate OpenResty build of the module. The setup is similar to [NGINX with Datadog module](#nginx-with-datadog-module).
    +
    +To install the Datadog NGINX module for OpenResty:
    +1. Download the appropriate `openresty-` prefixed version from the [latest nginx-datadog GitHub release][1].

    1. Download the appropriate `openresty-` prefixed version from the [latest `nginx-datadog` GitHub release][1].
    

    melamos melamos requested changes on Oct 14, 2026 19:31 UTC
    Changes Requested Reviewer

    Thanks for adding OpenResty coverage! I left a few suggestions. The main one is moving the extract and load_module steps into the numbered list and giving the section its own load_module example, so it works without the NGINX section. There's also a stray comma on line 354. The rest are small wording tweaks.

    duncanhewett duncanhewett commented on Oct 15, 2026 21:29 UTC
    Author

    Thanks for adding OpenResty coverage! I left a few suggestions. The main one is moving the extract and load_module steps into the numbered list and giving the section its own load_module example, so it works without the NGINX section. There's also a stray comma on line 354. The rest are small wording tweaks.

    @melamos Thanks for the review - I've applied all the suggested changes.

    melamos melamos approved these changes on Oct 15, 2026 21:55 UTC
    Approved Reviewer

    Thanks for the fixes! 🙂

    xlamorlette-datadog xlamorlette-datadog approved these changes on Oct 16, 2026 09:15 UTC
    Approved Reviewer

    Approved these changes.

    Yeison2020 Yeison2020 commented on Oct 16, 2026 12:09 UTC
    Contributor

    LGTM!

    Reviewers
    Assignees
    duncanhewett duncanhewett
    Labels
    risk: low confidence: 74.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 20.9% (LOW) · Higher = larger blast radius
    20.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 74.5% · Lower = rushed or shallow review
    74.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 5.3% · Safe to merge
    5.3%