diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 050624478..787b5da36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] steps: - name: Checkout diff --git a/.github/workflows/build_layer.yml b/.github/workflows/build_layer.yml index 789868ed0..d5d65ec4a 100644 --- a/.github/workflows/build_layer.yml +++ b/.github/workflows/build_layer.yml @@ -1,6 +1,8 @@ name: Build Layers for system-Tests on: + workflow_dispatch: + pull_request: push: branches: - "main" @@ -10,9 +12,10 @@ jobs: runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} strategy: + fail-fast: false matrix: arch: [arm64, amd64] - python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python_version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: Checkout diff --git a/.github/workflows/update-snapshots.yml b/.github/workflows/update-snapshots.yml index ed7097aed..81e0c5394 100644 --- a/.github/workflows/update-snapshots.yml +++ b/.github/workflows/update-snapshots.yml @@ -1,8 +1,7 @@ name: update-snapshots on: - schedule: - - cron: "0 15 * * *" # every day 11am EST + workflow_dispatch: jobs: check: @@ -47,8 +46,19 @@ jobs: working-directory: tests/integration run: yarn install - - name: Update Snapshots + - name: Update Snapshots (amd64) env: + ARCH: amd64 + UPDATE_SNAPSHOTS: true + BUILD_LAYERS: true + DD_API_KEY: ${{ secrets.DD_API_KEY }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + run: ./scripts/run_integration_tests.sh + + - name: Update Snapshots (arm64) + env: + ARCH: arm64 UPDATE_SNAPSHOTS: true BUILD_LAYERS: true DD_API_KEY: ${{ secrets.DD_API_KEY }} diff --git a/Dockerfile b/Dockerfile index 8da968fb2..ce59438db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ RUN set -eux; \ rm gcc && ln -s gcc10-gcc gcc; \ rm g++ && ln -s gcc10-g++ g++; \ rm cc && ln -s gcc10-cc cc; \ + rm c++ && ln -s gcc10-c++ c++; \ fi # Add Rust compiler which is needed to build dd-trace-py from source @@ -34,8 +35,6 @@ RUN rm -rf ./python/lib/$runtime/site-packages/jsonschema/tests RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_ast/iastpatch*.so RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_taint_tracking/*.so RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_stacktrace*.so -# _stack_v2 may not exist for some versions of ddtrace (e.g. under python 3.13) -RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/stack_v2/_stack_v2.*.so # remove *.dist-info directories except any entry_points.txt files and METADATA files required for Appsec Software Composition Analysis RUN find ./python/lib/$runtime/site-packages/*.dist-info \ -type f \ @@ -73,11 +72,12 @@ RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.h -delete RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.hpp -delete RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.pyx -delete -# Strip debug symbols using strip -g for all .so files in ddtrace. This is to +# Strip debug symbols and symbols that are not needed for relocation +# processing using strip --strip-unneeded for all .so files. This is to # reduce the size when ddtrace is built from sources. The release wheels are # already stripped of debug symbols. We should revisit this when serverless # benchmark uses pre-built wheels instead of building from sources. -RUN find ./python/lib/$runtime/site-packages/ddtrace -name "*.so" -exec strip -g {} \; +RUN find ./python/lib/$runtime/site-packages -name "*.so" -exec strip --strip-unneeded {} \; FROM scratch COPY --from=builder /build/python / diff --git a/README.md b/README.md index 658babc28..a1199e8eb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Slack](https://chat.datadoghq.com/badge.svg?bg=632CA6)](https://chat.datadoghq.com/) [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/DataDog/datadog-lambda-python/blob/main/LICENSE) -Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, 3.12, and 3.13) enables [enhanced Lambda metrics](https://docs.datadoghq.com/serverless/enhanced_lambda_metrics), [distributed tracing](https://docs.datadoghq.com/serverless/distributed_tracing), and [custom metric submission](https://docs.datadoghq.com/serverless/custom_metrics) from AWS Lambda functions. +Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14) enables [enhanced Lambda metrics](https://docs.datadoghq.com/serverless/enhanced_lambda_metrics), [distributed tracing](https://docs.datadoghq.com/serverless/distributed_tracing), and [custom metric submission](https://docs.datadoghq.com/serverless/custom_metrics) from AWS Lambda functions. ## Installation diff --git a/ci/datasources/runtimes.yaml b/ci/datasources/runtimes.yaml index f9456d396..2b19cf1c4 100644 --- a/ci/datasources/runtimes.yaml +++ b/ci/datasources/runtimes.yaml @@ -47,3 +47,11 @@ runtimes: python_version: "3.13" arch: "arm64" image: "3.13.0" + - name: "python314" + python_version: "3.14" + arch: "amd64" + image: "3.14.0" + - name: "python314" + python_version: "3.14" + arch: "arm64" + image: "3.14.0" diff --git a/ci/publish_layers.sh b/ci/publish_layers.sh index 9654582a2..d15931ac1 100755 --- a/ci/publish_layers.sh +++ b/ci/publish_layers.sh @@ -23,6 +23,8 @@ AWS_CLI_PYTHON_VERSIONS=( "python3.12" "python3.13" "python3.13" + "python3.14" + "python3.14" ) PYTHON_VERSIONS=( "3.8-amd64" @@ -37,6 +39,8 @@ PYTHON_VERSIONS=( "3.12-arm64" "3.13-amd64" "3.13-arm64" + "3.14-amd64" + "3.14-arm64" ) LAYER_PATHS=( ".layers/datadog_lambda_py-amd64-3.8.zip" @@ -51,6 +55,8 @@ LAYER_PATHS=( ".layers/datadog_lambda_py-arm64-3.12.zip" ".layers/datadog_lambda_py-amd64-3.13.zip" ".layers/datadog_lambda_py-arm64-3.13.zip" + ".layers/datadog_lambda_py-amd64-3.14.zip" + ".layers/datadog_lambda_py-arm64-3.14.zip" ) LAYERS=( "Datadog-Python38" @@ -65,6 +71,8 @@ LAYERS=( "Datadog-Python312-ARM" "Datadog-Python313" "Datadog-Python313-ARM" + "Datadog-Python314" + "Datadog-Python314-ARM" ) STAGES=('prod', 'sandbox', 'staging', 'gov-staging', 'gov-prod') diff --git a/datadog_lambda/__init__.py b/datadog_lambda/__init__.py index 2034d3cbf..059cead9e 100644 --- a/datadog_lambda/__init__.py +++ b/datadog_lambda/__init__.py @@ -1,12 +1,5 @@ +import datadog_lambda.config # noqa: F401 needs to be imported before `ddtrace` from datadog_lambda.cold_start import initialize_cold_start_tracing -import os - - -if os.environ.get("DD_INSTRUMENTATION_TELEMETRY_ENABLED") is None: - # Telemetry is required for Appsec Software Composition Analysis - os.environ["DD_INSTRUMENTATION_TELEMETRY_ENABLED"] = os.environ.get( - "DD_APPSEC_ENABLED", "false" - ) initialize_cold_start_tracing() diff --git a/datadog_lambda/config.py b/datadog_lambda/config.py index aaa1af5e8..eda6b5828 100644 --- a/datadog_lambda/config.py +++ b/datadog_lambda/config.py @@ -82,12 +82,6 @@ def _resolve_env(self, key, default=None, cast=None, depends_on_tracing=False): logs_injection = _get_env("DD_LOGS_INJECTION", "true", as_bool) merge_xray_traces = _get_env("DD_MERGE_XRAY_TRACES", "false", as_bool) - telemetry_enabled = _get_env( - "DD_INSTRUMENTATION_TELEMETRY_ENABLED", - "false", - as_bool, - depends_on_tracing=True, - ) otel_enabled = _get_env("DD_TRACE_OTEL_ENABLED", "false", as_bool) profiling_enabled = _get_env("DD_PROFILING_ENABLED", "false", as_bool) llmobs_enabled = _get_env("DD_LLMOBS_ENABLED", "false", as_bool) @@ -96,6 +90,7 @@ def _resolve_env(self, key, default=None, cast=None, depends_on_tracing=False): "DD_DATA_STREAMS_ENABLED", "false", as_bool, depends_on_tracing=True ) appsec_enabled = _get_env("DD_APPSEC_ENABLED", "false", as_bool) + sca_enabled = _get_env("DD_APPSEC_SCA_ENABLED", "false", as_bool) is_gov_region = _get_env("AWS_REGION", "", lambda x: x.startswith("us-gov-")) @@ -144,3 +139,11 @@ def _reset(self): "Python Lambda Layer FIPS mode is %s.", "enabled" if config.fips_mode_enabled else "not enabled", ) + + +if ( + "DD_INSTRUMENTATION_TELEMETRY_ENABLED" not in os.environ + and not config.sca_enabled + and not config.appsec_enabled +): + os.environ["DD_INSTRUMENTATION_TELEMETRY_ENABLED"] = "false" diff --git a/datadog_lambda/tag_object.py b/datadog_lambda/tag_object.py index 744e48933..67f6a14d7 100644 --- a/datadog_lambda/tag_object.py +++ b/datadog_lambda/tag_object.py @@ -62,6 +62,6 @@ def _should_try_string(obj): def _redact_val(k, v): split_key = k.split(".").pop() or k - if split_key in redactable_keys: + if split_key.lower() in redactable_keys: return "redacted" return v diff --git a/datadog_lambda/tracing.py b/datadog_lambda/tracing.py index 4faaed2df..225f5dd82 100644 --- a/datadog_lambda/tracing.py +++ b/datadog_lambda/tracing.py @@ -55,11 +55,6 @@ logger = logging.getLogger(__name__) dd_trace_context = None -if config.telemetry_enabled: - # Enable the telemetry client if the user has opted in - from ddtrace.internal.telemetry import telemetry_writer - - telemetry_writer.enable() propagator = HTTPPropagator() diff --git a/datadog_lambda/version.py b/datadog_lambda/version.py index 2e2e781ad..a23e0df67 100644 --- a/datadog_lambda/version.py +++ b/datadog_lambda/version.py @@ -1 +1 @@ -__version__ = "8.116.0" +__version__ = "8.118.0" diff --git a/pyproject.toml b/pyproject.toml index cf7d18059..0d08814fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "datadog_lambda" -version = "8.116.0" +version = "8.118.0" description = "The Datadog AWS Lambda Library" authors = ["Datadog, Inc. "] license = "Apache-2.0" @@ -22,13 +22,14 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] [tool.poetry.dependencies] python = ">=3.8.0,<4" datadog = ">=0.51.0,<1.0.0" wrapt = "^1.11.2" -ddtrace = ">=3.16.2,<4" +ddtrace = ">=3.16.2,<3.19.0" ujson = ">=5.9.0" botocore = { version = "^1.34.0", optional = true } requests = { version ="^2.22.0", optional = true } diff --git a/scripts/add_new_region.sh b/scripts/add_new_region.sh index 576d13e7f..210436294 100755 --- a/scripts/add_new_region.sh +++ b/scripts/add_new_region.sh @@ -25,6 +25,8 @@ LAYER_NAMES=( "Datadog-Python312-ARM" "Datadog-Python313" "Datadog-Python313-ARM" + "Datadog-Python314" + "Datadog-Python314-ARM" ) PYTHON_VERSIONS_FOR_AWS_CLI=( "python3.8" @@ -39,6 +41,8 @@ PYTHON_VERSIONS_FOR_AWS_CLI=( "python3.12" "python3.13" "python3.13" + "python3.14" + "python3.14" ) NEW_REGION=$1 diff --git a/scripts/build_layers.sh b/scripts/build_layers.sh index 23941b7a0..b78ca9abe 100755 --- a/scripts/build_layers.sh +++ b/scripts/build_layers.sh @@ -14,7 +14,7 @@ set -e LAYER_DIR=".layers" LAYER_FILES_PREFIX="datadog_lambda_py" -AVAILABLE_PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13") +AVAILABLE_PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14") AVAILABLE_ARCHS=("arm64" "amd64") if [ -z "$ARCH" ]; then diff --git a/scripts/check_format.sh b/scripts/check_format.sh index df5a67187..783a17d6a 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -2,7 +2,7 @@ set -e PYTHON_VERSION=$(python -c 'import sys; print(sys.version_info.major)') -pip install -Iv black==22.3.0 +pip install -Iv black==25.11.0 python -m black --check datadog_lambda/ --diff python -m black --check tests --diff diff --git a/scripts/list_layers.sh b/scripts/list_layers.sh index 6449e5115..d2710a7e7 100755 --- a/scripts/list_layers.sh +++ b/scripts/list_layers.sh @@ -23,6 +23,8 @@ LAYER_NAMES=( "Datadog-Python312-ARM" "Datadog-Python313" "Datadog-Python313-ARM" + "Datadog-Python314" + "Datadog-Python314-ARM" ) AVAILABLE_REGIONS=$(aws ec2 describe-regions | jq -r '.[] | .[] | .RegionName') LAYERS_MISSING_REGIONS=() diff --git a/scripts/publish_govcloud.sh b/scripts/publish_govcloud.sh index 5fd107b0e..5edd3b08e 100755 --- a/scripts/publish_govcloud.sh +++ b/scripts/publish_govcloud.sh @@ -88,7 +88,7 @@ do export REGION=$region - for python_version in "3.8" "3.9" "3.10" "3.11" "3.12" "3.13"; do + for python_version in "3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14"; do for arch in "amd64" "arm64"; do export PYTHON_VERSION=$python_version export ARCH=$arch diff --git a/scripts/publish_layers.sh b/scripts/publish_layers.sh index 8c78093f8..31a514d13 100755 --- a/scripts/publish_layers.sh +++ b/scripts/publish_layers.sh @@ -26,6 +26,8 @@ PYTHON_VERSIONS_FOR_AWS_CLI=( "python3.12" "python3.13" "python3.13" + "python3.14" + "python3.14" ) LAYER_PATHS=( ".layers/datadog_lambda_py-amd64-3.8.zip" @@ -40,6 +42,8 @@ LAYER_PATHS=( ".layers/datadog_lambda_py-arm64-3.12.zip" ".layers/datadog_lambda_py-amd64-3.13.zip" ".layers/datadog_lambda_py-arm64-3.13.zip" + ".layers/datadog_lambda_py-amd64-3.14.zip" + ".layers/datadog_lambda_py-arm64-3.14.zip" ) AVAILABLE_LAYERS=( "Datadog-Python38" @@ -54,6 +58,8 @@ AVAILABLE_LAYERS=( "Datadog-Python312-ARM" "Datadog-Python313" "Datadog-Python313-ARM" + "Datadog-Python314" + "Datadog-Python314-ARM" ) AVAILABLE_REGIONS=$(aws ec2 describe-regions | jq -r '.[] | .[] | .RegionName') diff --git a/scripts/run_integration_tests.sh b/scripts/run_integration_tests.sh index f6e4f537c..1dfa72b6b 100755 --- a/scripts/run_integration_tests.sh +++ b/scripts/run_integration_tests.sh @@ -33,8 +33,9 @@ python310=("python3.10" "3.10" $(xxd -l 4 -c 4 -p < /dev/random)) python311=("python3.11" "3.11" $(xxd -l 4 -c 4 -p < /dev/random)) python312=("python3.12" "3.12" $(xxd -l 4 -c 4 -p < /dev/random)) python313=("python3.13" "3.13" $(xxd -l 4 -c 4 -p < /dev/random)) +python314=("python3.14" "3.14" $(xxd -l 4 -c 4 -p < /dev/random)) -PARAMETERS_SETS=("python38" "python39" "python310" "python311" "python312" "python313") +PARAMETERS_SETS=("python38" "python39" "python310" "python311" "python312" "python313" "python314") if [ -z "$RUNTIME_PARAM" ]; then echo "Python version not specified, running for all python versions." diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 26f4e2156..59d572187 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -8,7 +8,7 @@ # Run unit tests in Docker set -e -PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13") +PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14") for python_version in "${PYTHON_VERSIONS[@]}" do diff --git a/scripts/sign_layers.sh b/scripts/sign_layers.sh index eb40062f0..d3c890d38 100755 --- a/scripts/sign_layers.sh +++ b/scripts/sign_layers.sh @@ -21,6 +21,8 @@ LAYER_FILES=( "datadog_lambda_py-arm64-3.12.zip" "datadog_lambda_py-amd64-3.13.zip" "datadog_lambda_py-arm64-3.13.zip" + "datadog_lambda_py-amd64-3.14.zip" + "datadog_lambda_py-arm64-3.14.zip" ) SIGNING_PROFILE_NAME="DatadogLambdaSigningProfile" diff --git a/tests/integration/snapshots/logs/async-metrics_python314.log b/tests/integration/snapshots/logs/async-metrics_python314.log new file mode 100644 index 000000000..8983a83c4 --- /dev/null +++ b/tests/integration/snapshots/logs/async-metrics_python314.log @@ -0,0 +1,1674 @@ +INIT_START Runtime Version: python:3.14.vX Runtime Version ARN: arn:aws:lambda:eu-west-1:XXXX:eu-west-1 +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:true", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "XXXX.execute-api.us-east-2.amazonaws.com", + "resource": "GET /", + "name": "aws.apigateway", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.apigateway.rest", + "http.url": "https://XXXX.execute-api.us-east-2.amazonaws.com/", + "endpoint": "/", + "http.method": "GET", + "resource_names": "GET /", + "span.kind": "server", + "apiid": "XXXX", + "apiname": "XXXX", + "stage": "Prod", + "request_id": "XXXX", + "_inferred_span.synchronicity": "sync", + "_inferred_span.tag_source": "self", + "http.status_code": "200", + "http.route": "/", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "true", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "api-gateway", + "function_trigger.event_source_arn": "XXXX", + "span.kind": "server", + "http.url": "https://XXXX.execute-api.us-east-2.amazonaws.com/Prod/", + "http.method": "GET", + "http.route": "/", + "http.status_code": "200" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms (init: XXXX ms) Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "datadog.serverless.dynamodb.stream.type", + "v": 1, + "e": XXXX, + "t": [ + "streamtype:NEW_AND_OLD_IMAGES", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "ExampleTableWithStream", + "resource": "ExampleTableWithStream", + "name": "aws.dynamodb", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.dynamodb", + "resource_names": "ExampleTableWithStream", + "span.kind": "server", + "tablename": "ExampleTableWithStream", + "event_source_arn": "arn:aws:dynamodb:us-east-1:XXXX:us-east-1/ExampleTableWithStream/stream/2015-06-27T00:48:05.899", + "event_id": "XXXX", + "event_name": "INSERT", + "event_version": "1.1", + "stream_view_type": "NEW_AND_OLD_IMAGES", + "size_bytes": "26", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web", + "span_links": [ + { + "trace_id": "XXXX", + "span_id": "XXXX", + "attributes": { + "ptr.kind": "aws.dynamodb.item", + "ptr.dir": "u", + "ptr.hash": "e2af34d333891f765c7f02d2da80895e", + "link.kind": "span-pointer" + } + }, + { + "trace_id": "XXXX", + "span_id": "XXXX", + "attributes": { + "ptr.kind": "aws.dynamodb.item", + "ptr.dir": "u", + "ptr.hash": "e2af34d333891f765c7f02d2da80895e", + "link.kind": "span-pointer" + } + }, + { + "trace_id": "XXXX", + "span_id": "XXXX", + "attributes": { + "ptr.kind": "aws.dynamodb.item", + "ptr.dir": "u", + "ptr.hash": "e2af34d333891f765c7f02d2da80895e", + "link.kind": "span-pointer" + } + } + ] + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "dynamodb", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "eventbridge.custom.event.sender", + "resource": "eventbridge.custom.event.sender", + "name": "aws.eventbridge", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.eventbridge", + "resource_names": "eventbridge.custom.event.sender", + "span.kind": "server", + "detail_type": "testdetail", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "eventbridge" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "XXXX.execute-api.eu-west-1.amazonaws.com", + "resource": "GET /httpapi/get", + "name": "aws.httpapi", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.httpapi", + "endpoint": "/httpapi/get", + "http.url": "https://XXXX.execute-api.eu-west-1.amazonaws.com/httpapi/get", + "http.method": "GET", + "http.protocol": "HTTP/1.1", + "http.source_ip": "XXXX", + "http.user_agent": "XXXX/7.64.1", + "resource_names": "GET /httpapi/get", + "request_id": "XXXX", + "apiid": "XXXX", + "apiname": "XXXX", + "stage": "$default", + "_inferred_span.synchronicity": "sync", + "_inferred_span.tag_source": "self", + "http.status_code": "200", + "http.route": "/httpapi/get", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "api-gateway", + "function_trigger.event_source_arn": "XXXX$default", + "span.kind": "server", + "http.url": "https://XXXX.execute-api.eu-west-1.amazonaws.com/httpapi/get", + "http.method": "GET", + "http.route": "/httpapi/get", + "http.status_code": "200" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "EXAMPLE", + "resource": "EXAMPLE", + "name": "aws.kinesis", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.kinesis", + "resource_names": "EXAMPLE", + "span.kind": "server", + "streamname": "EXAMPLE", + "shardid": "shardId-XXXX", + "event_source_arn": "arn:aws:kinesis:EXAMPLE", + "event_id": "XXXX", + "event_name": "aws:kinesis:record", + "event_version": "1.0", + "partition_key": "XXXX", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "kinesis", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "example-bucket", + "resource": "example-bucket", + "name": "aws.s3", + "error": 0, + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.s3", + "resource_names": "example-bucket", + "span.kind": "server", + "event_name": "ObjectCreated:Put", + "bucketname": "example-bucket", + "bucket_arn": "arn:aws:s3:::example-bucket", + "object_key": "test/key", + "object_size": "1024", + "object_etag": "XXXX", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web", + "span_links": [ + { + "trace_id": "XXXX", + "span_id": "XXXX", + "attributes": { + "ptr.kind": "aws.s3.object", + "ptr.dir": "u", + "ptr.hash": "1dc3e5d00dae48c1f07d95371a747788", + "link.kind": "span-pointer" + } + } + ] + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "s3", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "sns-lambda", + "resource": "sns-lambda", + "name": "aws.sns", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.sns", + "resource_names": "sns-lambda", + "span.kind": "server", + "topicname": "sns-lambda", + "topic_arn": "arn:aws:sns:us-east-2:XXXX:us-east-2-lambda", + "message_id": "XXXX", + "type": "Notification", + "subject": "TestInvoke", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "sns", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "my-queue", + "resource": "my-queue", + "name": "aws.sqs", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.sqs", + "resource_names": "my-queue", + "span.kind": "server", + "queuename": "my-queue", + "event_source_arn": "arn:aws:sqs:us-east-2:XXXX:us-east-2-queue", + "receipt_handle": "AQEBwJnKyrHigUMZj6rYigCgxlaS3SLy0a...", + "sender_id": "AIDAIENQZJOLO23YVJ4VO", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "sqs", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-async-metrics_python314", + "resource:integration-tests-python-XXXX-async-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "hello.dog", + "v": 1, + "e": XXXX, + "t": [ + "team:serverless", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "tests.integration.count", + "v": 21, + "e": XXXX, + "t": [ + "test:integration", + "role:hello", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "XXXX.execute-api.eu-west-1.amazonaws.com", + "resource": "$default", + "name": "aws.apigateway.websocket", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.apigateway.websocket", + "http.url": "https://XXXX.execute-api.eu-west-1.amazonaws.com$default", + "endpoint": "$default", + "resource_names": "$default", + "span.kind": "server", + "apiid": "XXXX", + "apiname": "XXXX", + "stage": "dev", + "request_id": "XXXX", + "connection_id": "XXXX=", + "event_type": "MESSAGE", + "message_direction": "IN", + "_inferred_span.synchronicity": "sync", + "_inferred_span.tag_source": "self", + "http.status_code": "200", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-async-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-async-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-async-metrics_python314", + "functionname": "integration-tests-python-XXXX-async-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "api-gateway", + "function_trigger.event_source_arn": "XXXX", + "span.kind": "server", + "http.url": "https://XXXX.execute-api.eu-west-1.amazonaws.com", + "http.status_code": "200" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB diff --git a/tests/integration/snapshots/logs/sync-metrics_python314.log b/tests/integration/snapshots/logs/sync-metrics_python314.log new file mode 100644 index 000000000..442d83b48 --- /dev/null +++ b/tests/integration/snapshots/logs/sync-metrics_python314.log @@ -0,0 +1,1864 @@ +INIT_START Runtime Version: python:3.14.vX Runtime Version ARN: arn:aws:lambda:eu-west-1:XXXX:eu-west-1 +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:true", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "XXXX.execute-api.us-east-2.amazonaws.com", + "resource": "GET /", + "name": "aws.apigateway", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.apigateway.rest", + "http.url": "https://XXXX.execute-api.us-east-2.amazonaws.com/", + "endpoint": "/", + "http.method": "GET", + "resource_names": "GET /", + "span.kind": "server", + "apiid": "XXXX", + "apiname": "XXXX", + "stage": "Prod", + "request_id": "XXXX", + "_inferred_span.synchronicity": "sync", + "_inferred_span.tag_source": "self", + "http.status_code": "200", + "http.route": "/", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "true", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "api-gateway", + "function_trigger.event_source_arn": "XXXX", + "span.kind": "server", + "http.url": "https://XXXX.execute-api.us-east-2.amazonaws.com/Prod/", + "http.method": "GET", + "http.route": "/", + "http.status_code": "200" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms (init: XXXX ms) Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +{ + "m": "datadog.serverless.dynamodb.stream.type", + "v": 1, + "e": XXXX, + "t": [ + "streamtype:NEW_AND_OLD_IMAGES", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "ExampleTableWithStream", + "resource": "ExampleTableWithStream", + "name": "aws.dynamodb", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.dynamodb", + "resource_names": "ExampleTableWithStream", + "span.kind": "server", + "tablename": "ExampleTableWithStream", + "event_source_arn": "arn:aws:dynamodb:us-east-1:XXXX:us-east-1/ExampleTableWithStream/stream/2015-06-27T00:48:05.899", + "event_id": "XXXX", + "event_name": "INSERT", + "event_version": "1.1", + "stream_view_type": "NEW_AND_OLD_IMAGES", + "size_bytes": "26", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web", + "span_links": [ + { + "trace_id": "XXXX", + "span_id": "XXXX", + "attributes": { + "ptr.kind": "aws.dynamodb.item", + "ptr.dir": "u", + "ptr.hash": "e2af34d333891f765c7f02d2da80895e", + "link.kind": "span-pointer" + } + }, + { + "trace_id": "XXXX", + "span_id": "XXXX", + "attributes": { + "ptr.kind": "aws.dynamodb.item", + "ptr.dir": "u", + "ptr.hash": "e2af34d333891f765c7f02d2da80895e", + "link.kind": "span-pointer" + } + }, + { + "trace_id": "XXXX", + "span_id": "XXXX", + "attributes": { + "ptr.kind": "aws.dynamodb.item", + "ptr.dir": "u", + "ptr.hash": "e2af34d333891f765c7f02d2da80895e", + "link.kind": "span-pointer" + } + } + ] + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "dynamodb", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "eventbridge.custom.event.sender", + "resource": "eventbridge.custom.event.sender", + "name": "aws.eventbridge", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.eventbridge", + "resource_names": "eventbridge.custom.event.sender", + "span.kind": "server", + "detail_type": "testdetail", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "eventbridge" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "XXXX.execute-api.eu-west-1.amazonaws.com", + "resource": "GET /httpapi/get", + "name": "aws.httpapi", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.httpapi", + "endpoint": "/httpapi/get", + "http.url": "https://XXXX.execute-api.eu-west-1.amazonaws.com/httpapi/get", + "http.method": "GET", + "http.protocol": "HTTP/1.1", + "http.source_ip": "XXXX", + "http.user_agent": "XXXX/7.64.1", + "resource_names": "GET /httpapi/get", + "request_id": "XXXX", + "apiid": "XXXX", + "apiname": "XXXX", + "stage": "$default", + "_inferred_span.synchronicity": "sync", + "_inferred_span.tag_source": "self", + "http.status_code": "200", + "http.route": "/httpapi/get", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "api-gateway", + "function_trigger.event_source_arn": "XXXX$default", + "span.kind": "server", + "http.url": "https://XXXX.execute-api.eu-west-1.amazonaws.com/httpapi/get", + "http.method": "GET", + "http.route": "/httpapi/get", + "http.status_code": "200" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "EXAMPLE", + "resource": "EXAMPLE", + "name": "aws.kinesis", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.kinesis", + "resource_names": "EXAMPLE", + "span.kind": "server", + "streamname": "EXAMPLE", + "shardid": "shardId-XXXX", + "event_source_arn": "arn:aws:kinesis:EXAMPLE", + "event_id": "XXXX", + "event_name": "aws:kinesis:record", + "event_version": "1.0", + "partition_key": "XXXX", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "kinesis", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "example-bucket", + "resource": "example-bucket", + "name": "aws.s3", + "error": 0, + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.s3", + "resource_names": "example-bucket", + "span.kind": "server", + "event_name": "ObjectCreated:Put", + "bucketname": "example-bucket", + "bucket_arn": "arn:aws:s3:::example-bucket", + "object_key": "test/key", + "object_size": "1024", + "object_etag": "XXXX", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web", + "span_links": [ + { + "trace_id": "XXXX", + "span_id": "XXXX", + "attributes": { + "ptr.kind": "aws.s3.object", + "ptr.dir": "u", + "ptr.hash": "1dc3e5d00dae48c1f07d95371a747788", + "link.kind": "span-pointer" + } + } + ] + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "s3", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "sns-lambda", + "resource": "sns-lambda", + "name": "aws.sns", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.sns", + "resource_names": "sns-lambda", + "span.kind": "server", + "topicname": "sns-lambda", + "topic_arn": "arn:aws:sns:us-east-2:XXXX:us-east-2-lambda", + "message_id": "XXXX", + "type": "Notification", + "subject": "TestInvoke", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "sns", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "my-queue", + "resource": "my-queue", + "name": "aws.sqs", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.sqs", + "resource_names": "my-queue", + "span.kind": "server", + "queuename": "my-queue", + "event_source_arn": "arn:aws:sqs:us-east-2:XXXX:us-east-2-queue", + "receipt_handle": "AQEBwJnKyrHigUMZj6rYigCgxlaS3SLy0a...", + "sender_id": "AIDAIENQZJOLO23YVJ4VO", + "_inferred_span.synchronicity": "async", + "_inferred_span.tag_source": "self", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "sqs", + "function_trigger.event_source_arn": "XXXX" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB +START +{ + "m": "aws.lambda.enhanced.invocations", + "v": 1, + "e": XXXX, + "t": [ + "region:eu-west-1", + "account_id:XXXX", + "functionname:integration-tests-python-XXXX-sync-metrics_python314", + "resource:integration-tests-python-XXXX-sync-metrics_python314", + "memorysize:1024", + "cold_start:false", + "runtime:python3.14", + "datadog_lambda:vXX", + "dd_lambda_layer:datadog-python314_X.X.X" + ] +} +HTTP GET https://datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","User-Agent:python-requests/X.X.X","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "XXXX.execute-api.eu-west-1.amazonaws.com", + "resource": "$default", + "name": "aws.apigateway.websocket", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "operation_name": "aws.apigateway.websocket", + "http.url": "https://XXXX.execute-api.eu-west-1.amazonaws.com$default", + "endpoint": "$default", + "resource_names": "$default", + "span.kind": "server", + "apiid": "XXXX", + "apiname": "XXXX", + "stage": "dev", + "request_id": "XXXX", + "connection_id": "XXXX=", + "event_type": "MESSAGE", + "message_direction": "IN", + "_inferred_span.synchronicity": "sync", + "_inferred_span.tag_source": "self", + "http.status_code": "200", + "peer.service": "integration-tests-python", + "_dd.peer.service.source": "peer.service", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "web" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "integration-tests-python", + "resource": "integration-tests-python-XXXX-sync-metrics_python314", + "name": "aws.lambda", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "cold_start": "false", + "function_arn": "arn:aws:lambda:eu-west-1:XXXX:eu-west-1-tests-python-XXXX-sync-metrics_python314", + "function_version": "$LATEST", + "request_id": "XXXX", + "resource_names": "integration-tests-python-XXXX-sync-metrics_python314", + "functionname": "integration-tests-python-XXXX-sync-metrics_python314", + "datadog_lambda": "X.X.X", + "dd_trace": "X.X.X", + "span.name": "aws.lambda", + "function_trigger.event_source": "api-gateway", + "function_trigger.event_source_arn": "XXXX", + "span.kind": "server", + "http.url": "https://XXXX.execute-api.eu-west-1.amazonaws.com", + "http.status_code": "200" + }, + "metrics": { + "_dd.top_level": 1 + }, + "type": "serverless" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://datadoghq.com/", + "out.host": "datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1, + "_dd.top_level": 1 + }, + "type": "http" + }, + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "GET /", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "_dd.p.tid": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "GET", + "http.url": "https://www.datadoghq.com/", + "out.host": "www.datadoghq.com", + "http.status_code": "200", + "http.useragent": "python-requests/X.X.X" + }, + "metrics": { + "_dd.measured": 1 + }, + "type": "http" + } + ] + ] +} +HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept-Encoding:gzip, deflate","Accept:*/*","Connection:keep-alive","Content-Encoding:deflate","Content-Length:XXXX","Content-Type:application/json","DD-API-KEY:XXXX","User-Agent:datadogpy/XX (python XX; os linux; arch XXXX)","traceparent:XXX","tracestate:XXX +{ + "traces": [ + [ + { + "trace_id": "XXXX", + "parent_id": "XXXX", + "span_id": "XXXX", + "service": "requests", + "resource": "POST /api/v1/distribution_points", + "name": "requests.request", + "error": 0, + "start": "XXXX", + "duration": "XXXX", + "meta": { + "runtime-id": "XXXX", + "_dd.origin": "lambda", + "component": "requests", + "span.kind": "client", + "http.method": "POST", + "http.url": "https://api.datadoghq.com/api/v1/distribution_points", + "out.host": "api.datadoghq.com", + "http.status_code": "202", + "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.p.dm": "-0", + "_dd.p.tid": "XXXX", + "language": "python" + }, + "metrics": { + "process_id": XXXX, + "_dd.measured": 1, + "_dd.top_level": 1, + "_sampling_priority_v1": 1 + }, + "type": "http" + } + ] + ] +} +END Duration: XXXX ms Memory Used: XXXX MB diff --git a/tests/test_api.py b/tests/test_api.py index 7fcc3c221..35a179b1c 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -33,9 +33,9 @@ def test_secrets_manager_fips_endpoint(self, mock_boto3_client): mock_boto3_client.return_value = mock_client os.environ["AWS_REGION"] = "us-gov-east-1" - os.environ[ - "DD_API_KEY_SECRET_ARN" - ] = "arn:aws:secretsmanager:us-gov-east-1:1234567890:secret:key-name-123ABC" + os.environ["DD_API_KEY_SECRET_ARN"] = ( + "arn:aws:secretsmanager:us-gov-east-1:1234567890:secret:key-name-123ABC" + ) api_key = api.get_api_key() @@ -53,9 +53,9 @@ def test_secrets_manager_different_region(self, mock_boto3_client): mock_boto3_client.return_value = mock_client os.environ["AWS_REGION"] = "us-east-1" - os.environ[ - "DD_API_KEY_SECRET_ARN" - ] = "arn:aws:secretsmanager:us-west-1:1234567890:secret:key-name-123ABC" + os.environ["DD_API_KEY_SECRET_ARN"] = ( + "arn:aws:secretsmanager:us-west-1:1234567890:secret:key-name-123ABC" + ) api_key = api.get_api_key() @@ -74,9 +74,9 @@ def test_secrets_manager_different_region_but_still_fips(self, mock_boto3_client mock_boto3_client.return_value = mock_client os.environ["AWS_REGION"] = "us-east-1" - os.environ[ - "DD_API_KEY_SECRET_ARN" - ] = "arn:aws:secretsmanager:us-west-1:1234567890:secret:key-name-123ABC" + os.environ["DD_API_KEY_SECRET_ARN"] = ( + "arn:aws:secretsmanager:us-west-1:1234567890:secret:key-name-123ABC" + ) api_key = api.get_api_key() @@ -132,9 +132,9 @@ def test_no_fips_for_standard_regions(self, mock_boto3_client): os.environ.clear() os.environ["AWS_REGION"] = "us-west-2" - os.environ[ - "DD_API_KEY_SECRET_ARN" - ] = "arn:aws:secretsmanager:us-west-2:1234567890:secret:key-name-123ABC" + os.environ["DD_API_KEY_SECRET_ARN"] = ( + "arn:aws:secretsmanager:us-west-2:1234567890:secret:key-name-123ABC" + ) api.get_api_key() diff --git a/tests/test_config.py b/tests/test_config.py index 92002439d..9c5da63a2 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,3 +1,6 @@ +import importlib +import sys + import pytest from datadog_lambda.config import config, _get_env, Config @@ -14,6 +17,29 @@ def set_env(key, value): return set_env +def test_config_import_does_not_import_ddtrace(monkeypatch): + import datadog_lambda + + with monkeypatch.context() as mp: + for name in list(sys.modules): + if name == "ddtrace" or name.startswith("ddtrace."): + mp.delitem(sys.modules, name, raising=False) + + class _BlockDdtrace(importlib.abc.MetaPathFinder): + def find_spec(self, fullname, path=None, target=None): + if fullname == "ddtrace" or fullname.startswith("ddtrace."): + raise ImportError("ddtrace must not be imported during this test") + return None + + blocker = _BlockDdtrace() + mp.setattr(sys, "meta_path", [blocker] + sys.meta_path, raising=False) + + mp.delattr(datadog_lambda, "config", raising=False) + mp.delitem(sys.modules, "datadog_lambda.config", raising=False) + importlib.invalidate_caches() + importlib.import_module("datadog_lambda.config") + + def _test_as_bool(env_key, conf_key, default): return ( (env_key, conf_key, None, default), @@ -72,9 +98,6 @@ def _test_as_list(env_key, conf_key, default): *_test_as_bool("DD_INTEGRATION_TEST", "integration_test", default=False), *_test_as_bool("DD_BOTOCORE_ADD_SPAN_POINTERS", "add_span_pointers", default=True), *_test_as_bool("DD_TRACE_OTEL_ENABLED", "otel_enabled", default=False), - *_test_as_bool( - "DD_INSTRUMENTATION_TELEMETRY_ENABLED", "telemetry_enabled", default=False - ), *_test_as_bool("DD_MERGE_XRAY_TRACES", "merge_xray_traces", default=False), *_test_as_bool("DD_PROFILING_ENABLED", "profiling_enabled", default=False), *_test_as_bool("DD_LLMOBS_ENABLED", "llmobs_enabled", default=False), @@ -86,6 +109,8 @@ def _test_as_list(env_key, conf_key, default): ), *_test_as_bool("DD_LOCAL_TEST", "local_test", default=False), *_test_as_bool("DD_DATA_STREAMS_ENABLED", "data_streams_enabled", default=False), + *_test_as_bool("DD_APPSEC_ENABLED", "appsec_enabled", default=False), + *_test_as_bool("DD_APPSEC_SCA_ENABLED", "sca_enabled", default=False), *_test_int( "DD_CAPTURE_LAMBDA_PAYLOAD_MAX_DEPTH", "capture_payload_max_depth", default=10 ), @@ -143,9 +168,6 @@ def test_config_from_environ(env_key, conf_key, env_val, conf_val, setenv): "DD_DECODE_AUTHORIZER_CONTEXT", "decode_authorizer_context", default=True ), *_test_as_bool("DD_DATA_STREAMS_ENABLED", "data_streams_enabled", default=False), - *_test_as_bool( - "DD_INSTRUMENTATION_TELEMETRY_ENABLED", "telemetry_enabled", default=False - ), ) diff --git a/tests/test_tag_object.py b/tests/test_tag_object.py index 574bb331a..bd04bf4c7 100644 --- a/tests/test_tag_object.py +++ b/tests/test_tag_object.py @@ -73,13 +73,14 @@ def test_tag_object_max_depth_0(self): "vals": [{"thingOne": 1}, {"thingTwo": 2}], } spanMock = MagicMock() + expected_value = str(payload) tag_object(spanMock, "function.request", payload) spanMock.set_tag.assert_has_calls( [ call( "function.request", - "{'hello': 'world', 'level1': {'level2_dict': {'level3': 3}, 'level2_list': [None, True, 'nice', {'l3': 'v3'}], 'level2_bool': True, 'level2_int': 2}, 'vals': [{'thingOne': 1}, {'thingTwo': 2}]}", + expected_value, ), ], True, @@ -105,6 +106,18 @@ def test_redacted_tag_object(self): True, ) + def test_redacted_tag_object_case_insensitive(self): + payload = { + "Authorization": "secret", + "headers": {"X-AUTHORIZATION": "another"}, + } + spanMock = MagicMock() + tag_object(spanMock, "function.request", payload) + spanMock.set_tag.assert_any_call("function.request.Authorization", "redacted") + spanMock.set_tag.assert_any_call( + "function.request.headers.X-AUTHORIZATION", "redacted" + ) + def test_json_tag_object(self): payload = { "token": "world", diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index 512a51f89..1a5edfc55 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -3,6 +3,8 @@ import os import unittest import importlib +import sys +import pytest from unittest.mock import MagicMock, patch, call, ANY from datadog_lambda.constants import TraceHeader @@ -834,6 +836,9 @@ def lambda_handler(event, context): @patch("datadog_lambda.config.Config.profiling_enabled", True) +@pytest.mark.skipif( + sys.version_info >= (3, 14), reason="profiling not yet supported in python 3.14" +) def test_profiling_enabled(monkeypatch): importlib.reload(wrapper) diff --git a/tests/test_xray.py b/tests/test_xray.py index 7f33f8915..8177e46e8 100644 --- a/tests/test_xray.py +++ b/tests/test_xray.py @@ -34,9 +34,9 @@ def test_get_xray_host_port_success(self): def test_send_segment_sampled_out(self): os.environ["AWS_XRAY_DAEMON_ADDRESS"] = "fake-agent.com:8080" - os.environ[ - "_X_AMZN_TRACE_ID" - ] = "Root=1-5e272390-8c398be037738dc042009320;Parent=94ae789b969f1cc5;Sampled=0;Lineage=c6c5b1b9:0" + os.environ["_X_AMZN_TRACE_ID"] = ( + "Root=1-5e272390-8c398be037738dc042009320;Parent=94ae789b969f1cc5;Sampled=0;Lineage=c6c5b1b9:0" + ) with patch( "datadog_lambda.xray.sock.send", MagicMock(return_value=None) @@ -47,9 +47,9 @@ def test_send_segment_sampled_out(self): def test_send_segment_sampled(self): os.environ["AWS_XRAY_DAEMON_ADDRESS"] = "fake-agent.com:8080" - os.environ[ - "_X_AMZN_TRACE_ID" - ] = "Root=1-5e272390-8c398be037738dc042009320;Parent=94ae789b969f1cc5;Sampled=1;Lineage=c6c5b1b9:0" + os.environ["_X_AMZN_TRACE_ID"] = ( + "Root=1-5e272390-8c398be037738dc042009320;Parent=94ae789b969f1cc5;Sampled=1;Lineage=c6c5b1b9:0" + ) with patch( "datadog_lambda.xray.sock.send", MagicMock(return_value=None) ) as mock_send: