Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otel: Add OpenTelemetry functionality to NGINX Unit #1463

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Oct 22, 2024

  1. otel: add opentelemetry rust crate code

    This is purely the source code of the rust end of opentelemetry. It does
    not have build tooling wired up yet, nor is this used from the C code.
    
    Signed-off-by: Ava Hahn <a.hahn@f5.com>
    Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
    
    Co-authored-by: Ava Hahn <a.hahn@f5.com>
    javorszky and avahahn committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    93b7702 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2024

  1. otel: add build tooling to include otel code

    Adds the --otel flag to the configure command and the various build time
    variables and checks that are needed in this flow.
    
    It also includes the nxt_otel.c and nxt_otel.h files that are needed for
    the rest of Unit to talk to the compiled static library that's generated
    from the rust crate.
    
    Signed-off-by: Ava Hahn <a.hahn@f5.com>
    Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
    
    Co-authored-by: Ava Hahn <a.hahn@f5.com>
    javorszky and avahahn committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    6b6f9c6 View commit details
    Browse the repository at this point in the history
  2. otel: add header parsing and test call state

    Enables Unit to parse the tracestate and traceparent headers and add it
    to the list, as well as calls to nxt_otel_test_and_call_state.
    
    Signed-off-by: Ava Hahn <a.hahn@f5.com>
    avahahn committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    2ef8f21 View commit details
    Browse the repository at this point in the history
  3. otel: configuration items and their validation

    Adds code responsible for users to apply the `telemetry` configuration
    options.
    
    configuration snippet as follows:
    {
        "settings": {
            "telemetry": {
                "batch_size": 20,
                "endpoint": "http://lgtm:4318/v1/traces",
                "protocol": "http",
                "sampling_ratio": 1
            }
        },
        "listeners": {
            "*:80": {
                "pass": "routes"
            }
        },
        "routes": [
            {
                "match": {
                    "headers": {
                        "accept": "*text/html*"
                    }
                },
                "action": {
                    "share": "/usr/share/unit/welcome/welcome.html"
                }
            },
            {
                "action": {
                    "share": "/usr/share/unit/welcome/welcome.md"
                }
            }
        ]
    }
    
    Signed-off-by: Ava Hahn <a.hahn@f5.com>
    Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
    
    Co-authored-by: Ava Hahn <a.hahn@f5.com>
    javorszky and avahahn committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    91d1d2f View commit details
    Browse the repository at this point in the history
  4. .editorconfig: fix bracket balance of editorconfig file

    Tiny bracket balance fix.
    
    Signed-off-by: Ava Hahn <a.hahn@f5.com>
    Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
    avahahn committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    efffea4 View commit details
    Browse the repository at this point in the history
  5. docs/openapi: update OpenAPI references

    These changes are generated by the openapi generator through a make
    command.
    
    Signed-off-by: Ava Hahn <a.hahn@f5.com>
    Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
    avahahn committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    ee3b440 View commit details
    Browse the repository at this point in the history