diff --git a/.github/workflows/build_layer.yml b/.github/workflows/build_layer.yml new file mode 100644 index 00000000..789868ed --- /dev/null +++ b/.github/workflows/build_layer.yml @@ -0,0 +1,35 @@ +name: Build Layers for system-Tests + +on: + push: + branches: + - "main" + +jobs: + build: + runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} + + strategy: + matrix: + arch: [arm64, amd64] + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Patch pyproject.toml + run: | + echo "Patching pyproject.toml to use main branch of dd-trace-py" + sed -i 's|^ddtrace =.*$|ddtrace = { git = "https://github.com/DataDog/dd-trace-py.git" }|' pyproject.toml + + - name: Build layer for Python ${{ matrix.python_version }} on ${{ matrix.arch }} + run: | + echo "Building layer for Python ${{ matrix.python_version }} on ${{ matrix.arch }}" + ARCH=${{ matrix.arch }} PYTHON_VERSION=${{ matrix.python_version }} ./scripts/build_layers.sh + + - name: Upload layer artifact + uses: actions/upload-artifact@v4 + with: + path: .layers/datadog_lambda_py-${{ matrix.arch }}-${{ matrix.python_version }}.zip + name: datadog-lambda-python-${{ matrix.python_version }}-${{ matrix.arch }} diff --git a/Dockerfile b/Dockerfile index 0e79d884..c5824528 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,6 @@ RUN pip install --no-cache-dir . -t ./python/lib/$runtime/site-packages RUN rm -rf ./python/lib/$runtime/site-packages/botocore* RUN rm -rf ./python/lib/$runtime/site-packages/setuptools RUN rm -rf ./python/lib/$runtime/site-packages/jsonschema/tests -RUN find . -name 'libddwaf.so' -delete 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 RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/libdd_wrapper*.so diff --git a/datadog_lambda/__init__.py b/datadog_lambda/__init__.py index 378fd15c..f319d2ed 100644 --- a/datadog_lambda/__init__.py +++ b/datadog_lambda/__init__.py @@ -17,3 +17,10 @@ initialize_logging(__name__) + + +from datadog_lambda.patch import patch_all # noqa: E402 + +# Patch third-party libraries for tracing, must be done before importing any +# handler code. +patch_all() diff --git a/datadog_lambda/asm.py b/datadog_lambda/asm.py new file mode 100644 index 00000000..9636760c --- /dev/null +++ b/datadog_lambda/asm.py @@ -0,0 +1,184 @@ +from copy import deepcopy +import logging +from typing import Any, Dict, List, Optional, Union + +from ddtrace.contrib.internal.trace_utils import _get_request_header_client_ip +from ddtrace.internal import core +from ddtrace.trace import Span + +from datadog_lambda.trigger import ( + EventSubtypes, + EventTypes, + _EventSource, + _http_event_types, +) + +logger = logging.getLogger(__name__) + + +def _to_single_value_headers(headers: Dict[str, List[str]]) -> Dict[str, str]: + """ + Convert multi-value headers to single-value headers. + If a header has multiple values, join them with commas. + """ + single_value_headers = {} + for key, values in headers.items(): + single_value_headers[key] = ", ".join(values) + return single_value_headers + + +def _merge_single_and_multi_value_headers( + single_value_headers: Dict[str, str], + multi_value_headers: Dict[str, List[str]], +): + """ + Merge single-value headers with multi-value headers. + If a header exists in both, we merge them removing duplicates + """ + merged_headers = deepcopy(multi_value_headers) + for key, value in single_value_headers.items(): + if key not in merged_headers: + merged_headers[key] = [value] + elif value not in merged_headers[key]: + merged_headers[key].append(value) + return _to_single_value_headers(merged_headers) + + +def asm_set_context(event_source: _EventSource): + """Add asm specific items to the ExecutionContext. + + This allows the AppSecSpanProcessor to know information about the event + at the moment the span is created and skip it when not relevant. + """ + if event_source.event_type not in _http_event_types: + core.set_item("appsec_skip_next_lambda_event", True) + + +def asm_start_request( + span: Span, + event: Dict[str, Any], + event_source: _EventSource, + trigger_tags: Dict[str, str], +): + if event_source.event_type not in _http_event_types: + return + + request_headers: Dict[str, str] = {} + peer_ip: Optional[str] = None + request_path_parameters: Optional[Dict[str, Any]] = None + route: Optional[str] = None + + if event_source.event_type == EventTypes.ALB: + headers = event.get("headers") + multi_value_request_headers = event.get("multiValueHeaders") + if multi_value_request_headers: + request_headers = _to_single_value_headers(multi_value_request_headers) + else: + request_headers = headers or {} + + raw_uri = event.get("path") + parsed_query = event.get("multiValueQueryStringParameters") or event.get( + "queryStringParameters" + ) + + elif event_source.event_type == EventTypes.LAMBDA_FUNCTION_URL: + request_headers = event.get("headers", {}) + peer_ip = event.get("requestContext", {}).get("http", {}).get("sourceIp") + raw_uri = event.get("rawPath") + parsed_query = event.get("queryStringParameters") + + elif event_source.event_type == EventTypes.API_GATEWAY: + request_context = event.get("requestContext", {}) + request_path_parameters = event.get("pathParameters") + route = trigger_tags.get("http.route") + + if event_source.subtype == EventSubtypes.API_GATEWAY: + request_headers = event.get("headers", {}) + peer_ip = request_context.get("identity", {}).get("sourceIp") + raw_uri = event.get("path") + parsed_query = event.get("multiValueQueryStringParameters") + + elif event_source.subtype == EventSubtypes.HTTP_API: + request_headers = event.get("headers", {}) + peer_ip = request_context.get("http", {}).get("sourceIp") + raw_uri = event.get("rawPath") + parsed_query = event.get("queryStringParameters") + + elif event_source.subtype == EventSubtypes.WEBSOCKET: + request_headers = _to_single_value_headers( + event.get("multiValueHeaders", {}) + ) + peer_ip = request_context.get("identity", {}).get("sourceIp") + raw_uri = event.get("path") + parsed_query = event.get("multiValueQueryStringParameters") + + else: + return + + else: + return + + body = event.get("body") + is_base64_encoded = event.get("isBase64Encoded", False) + + request_ip = _get_request_header_client_ip(request_headers, peer_ip, True) + if request_ip is not None: + span.set_tag_str("http.client_ip", request_ip) + span.set_tag_str("network.client.ip", request_ip) + + core.dispatch( + # The matching listener is registered in ddtrace.appsec._handlers + "aws_lambda.start_request", + ( + span, + request_headers, + request_ip, + body, + is_base64_encoded, + raw_uri, + route, + trigger_tags.get("http.method"), + parsed_query, + request_path_parameters, + ), + ) + + +def asm_start_response( + span: Span, + status_code: str, + event_source: _EventSource, + response: Union[Dict[str, Any], str, None], +): + if event_source.event_type not in _http_event_types: + return + + if isinstance(response, dict) and ( + "headers" in response or "multiValueHeaders" in response + ): + headers = response.get("headers", {}) + multi_value_request_headers = response.get("multiValueHeaders") + if isinstance(multi_value_request_headers, dict) and isinstance(headers, dict): + response_headers = _merge_single_and_multi_value_headers( + headers, multi_value_request_headers + ) + elif isinstance(headers, dict): + response_headers = headers + else: + response_headers = { + "content-type": "application/json", + } + else: + response_headers = { + "content-type": "application/json", + } + + core.dispatch( + # The matching listener is registered in ddtrace.appsec._handlers + "aws_lambda.start_response", + ( + span, + status_code, + response_headers, + ), + ) diff --git a/datadog_lambda/config.py b/datadog_lambda/config.py index 7a08d8a7..aaa1af5e 100644 --- a/datadog_lambda/config.py +++ b/datadog_lambda/config.py @@ -95,6 +95,7 @@ def _resolve_env(self, key, default=None, cast=None, depends_on_tracing=False): data_streams_enabled = _get_env( "DD_DATA_STREAMS_ENABLED", "false", as_bool, depends_on_tracing=True ) + appsec_enabled = _get_env("DD_APPSEC_ENABLED", "false", as_bool) is_gov_region = _get_env("AWS_REGION", "", lambda x: x.startswith("us-gov-")) diff --git a/datadog_lambda/dsm.py b/datadog_lambda/dsm.py deleted file mode 100644 index 427f5e47..00000000 --- a/datadog_lambda/dsm.py +++ /dev/null @@ -1,38 +0,0 @@ -from datadog_lambda import logger -from datadog_lambda.trigger import EventTypes - - -def set_dsm_context(event, event_source): - - if event_source.equals(EventTypes.SQS): - _dsm_set_sqs_context(event) - - -def _dsm_set_sqs_context(event): - from datadog_lambda.wrapper import format_err_with_traceback - from ddtrace.internal.datastreams import data_streams_processor - from ddtrace.internal.datastreams.processor import DsmPathwayCodec - from ddtrace.internal.datastreams.botocore import ( - get_datastreams_context, - calculate_sqs_payload_size, - ) - - records = event.get("Records") - if records is None: - return - processor = data_streams_processor() - - for record in records: - try: - queue_arn = record.get("eventSourceARN", "") - - contextjson = get_datastreams_context(record) - payload_size = calculate_sqs_payload_size(record) - - ctx = DsmPathwayCodec.decode(contextjson, processor) - ctx.set_checkpoint( - ["direction:in", f"topic:{queue_arn}", "type:sqs"], - payload_size=payload_size, - ) - except Exception as e: - logger.error(format_err_with_traceback(e)) diff --git a/datadog_lambda/tracing.py b/datadog_lambda/tracing.py index 3d5f671e..f4057480 100644 --- a/datadog_lambda/tracing.py +++ b/datadog_lambda/tracing.py @@ -67,6 +67,24 @@ LOWER_64_BITS = "LOWER_64_BITS" +def _dsm_set_checkpoint(context_json, event_type, arn): + if not config.data_streams_enabled: + return + + if not arn: + return + + try: + from ddtrace.data_streams import set_consume_checkpoint + + carrier_get = lambda k: context_json and context_json.get(k) # noqa: E731 + set_consume_checkpoint(event_type, arn, carrier_get, manual_checkpoint=False) + except Exception as e: + logger.debug( + f"DSM:Failed to set consume checkpoint for {event_type} {arn}: {e}" + ) + + def _convert_xray_trace_id(xray_trace_id): """ Convert X-Ray trace id (hex)'s last 63 bits to a Datadog trace id (int). @@ -202,7 +220,9 @@ def create_sns_event(message): } -def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context): +def extract_context_from_sqs_or_sns_event_or_context( + event, lambda_context, event_source +): """ Extract Datadog trace context from an SQS event. @@ -214,7 +234,10 @@ def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context): Lambda Context. Falls back to lambda context if no trace data is found in the SQS message attributes. + Set a DSM checkpoint if DSM is enabled and the method for context propagation is supported. """ + source_arn = "" + event_type = "sqs" if event_source.equals(EventTypes.SQS) else "sns" # EventBridge => SQS try: @@ -226,6 +249,7 @@ def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context): try: first_record = event.get("Records")[0] + source_arn = first_record.get("eventSourceARN", "") # logic to deal with SNS => SQS event if "body" in first_record: @@ -241,6 +265,9 @@ def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context): msg_attributes = first_record.get("messageAttributes") if msg_attributes is None: sns_record = first_record.get("Sns") or {} + # SNS->SQS event would extract SNS arn without this check + if event_source.equals(EventTypes.SNS): + source_arn = sns_record.get("TopicArn", "") msg_attributes = sns_record.get("MessageAttributes") or {} dd_payload = msg_attributes.get("_datadog") if dd_payload: @@ -272,8 +299,9 @@ def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context): logger.debug( "Failed to extract Step Functions context from SQS/SNS event." ) - - return propagator.extract(dd_data) + context = propagator.extract(dd_data) + _dsm_set_checkpoint(dd_data, event_type, source_arn) + return context else: # Handle case where trace context is injected into attributes.AWSTraceHeader # example: Root=1-654321ab-000000001234567890abcdef;Parent=0123456789abcdef;Sampled=1 @@ -296,9 +324,13 @@ def extract_context_from_sqs_or_sns_event_or_context(event, lambda_context): span_id=int(x_ray_context["parent_id"], 16), sampling_priority=float(x_ray_context["sampled"]), ) + # Still want to set a DSM checkpoint even if DSM context not propagated + _dsm_set_checkpoint(None, event_type, source_arn) return extract_context_from_lambda_context(lambda_context) except Exception as e: logger.debug("The trace extractor returned with error %s", e) + # Still want to set a DSM checkpoint even if DSM context not propagated + _dsm_set_checkpoint(None, event_type, source_arn) return extract_context_from_lambda_context(lambda_context) @@ -357,9 +389,12 @@ def extract_context_from_eventbridge_event(event, lambda_context): def extract_context_from_kinesis_event(event, lambda_context): """ Extract datadog trace context from a Kinesis Stream's base64 encoded data string + Set a DSM checkpoint if DSM is enabled and the method for context propagation is supported. """ + source_arn = "" try: record = get_first_record(event) + source_arn = record.get("eventSourceARN", "") kinesis = record.get("kinesis") if not kinesis: return extract_context_from_lambda_context(lambda_context) @@ -373,10 +408,13 @@ def extract_context_from_kinesis_event(event, lambda_context): data_obj = json.loads(data_str) dd_ctx = data_obj.get("_datadog") if dd_ctx: - return propagator.extract(dd_ctx) + context = propagator.extract(dd_ctx) + _dsm_set_checkpoint(dd_ctx, "kinesis", source_arn) + return context except Exception as e: logger.debug("The trace extractor returned with error %s", e) - + # Still want to set a DSM checkpoint even if DSM context not propagated + _dsm_set_checkpoint(None, "kinesis", source_arn) return extract_context_from_lambda_context(lambda_context) @@ -594,7 +632,7 @@ def extract_dd_trace_context( ) elif event_source.equals(EventTypes.SNS) or event_source.equals(EventTypes.SQS): context = extract_context_from_sqs_or_sns_event_or_context( - event, lambda_context + event, lambda_context, event_source ) elif event_source.equals(EventTypes.EVENTBRIDGE): context = extract_context_from_eventbridge_event(event, lambda_context) @@ -859,7 +897,7 @@ def create_inferred_span_from_lambda_function_url_event(event, context): InferredSpanInfo.set_tags(tags, tag_source="self", synchronicity="sync") if span: span.set_tags(tags) - span.start_ns = int(request_time_epoch) * 1e6 + span.start_ns = int(request_time_epoch * 1e6) return span diff --git a/datadog_lambda/version.py b/datadog_lambda/version.py index 2bb1df7f..e1dbe71f 100644 --- a/datadog_lambda/version.py +++ b/datadog_lambda/version.py @@ -1 +1 @@ -__version__ = "6.111.0" +__version__ = "7.112.0" diff --git a/datadog_lambda/wrapper.py b/datadog_lambda/wrapper.py index 87063411..06f8884c 100644 --- a/datadog_lambda/wrapper.py +++ b/datadog_lambda/wrapper.py @@ -9,7 +9,7 @@ from importlib import import_module from time import time_ns -from datadog_lambda.dsm import set_dsm_context +from datadog_lambda.asm import asm_set_context, asm_start_response, asm_start_request from datadog_lambda.extension import should_use_extension, flush_extension from datadog_lambda.cold_start import ( set_cold_start, @@ -25,7 +25,6 @@ Headers, ) from datadog_lambda.module_name import modify_module_name -from datadog_lambda.patch import patch_all from datadog_lambda.span_pointers import calculate_span_pointers from datadog_lambda.tag_object import tag_object from datadog_lambda.tracing import ( @@ -142,8 +141,6 @@ def __init__(self, func): os.environ[DD_REQUESTS_SERVICE_NAME] = os.environ.get( DD_SERVICE, "aws.lambda" ) - # Patch third-party libraries for tracing - patch_all() # Enable LLM Observability if config.llmobs_enabled: @@ -165,10 +162,9 @@ def __call__(self, event, context, **kwargs): self.response = self.func(event, context, **kwargs) return self.response except Exception: - if not should_use_extension: - from datadog_lambda.metric import submit_errors_metric + from datadog_lambda.metric import submit_errors_metric - submit_errors_metric(context) + submit_errors_metric(context) if self.span: self.span.set_traceback() @@ -240,8 +236,10 @@ def _before(self, event, context): self.inferred_span = create_inferred_span( event, context, event_source, config.decode_authorizer_context ) - if config.data_streams_enabled: - set_dsm_context(event, event_source) + + if config.appsec_enabled: + asm_set_context(event_source) + self.span = create_function_execution_span( context=context, function_name=config.function_name, @@ -253,6 +251,8 @@ def _before(self, event, context): parent_span=self.inferred_span, span_pointers=calculate_span_pointers(event_source, event), ) + if config.appsec_enabled: + asm_start_request(self.span, event, event_source, self.trigger_tags) else: set_correlation_ids() if config.profiling_enabled and is_new_sandbox(): @@ -285,6 +285,15 @@ def _after(self, event, context): if status_code: self.span.set_tag("http.status_code", status_code) + + if config.appsec_enabled: + asm_start_response( + self.span, + status_code, + self.event_source, + response=self.response, + ) + self.span.finish() if self.inferred_span: diff --git a/pyproject.toml b/pyproject.toml index 1d5feb7f..1a43b9e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "datadog_lambda" -version = "6.111.0" +version = "7.112.0" description = "The Datadog AWS Lambda Library" authors = ["Datadog, Inc. "] license = "Apache-2.0" @@ -28,7 +28,7 @@ classifiers = [ python = ">=3.8.0,<4" datadog = ">=0.51.0,<1.0.0" wrapt = "^1.11.2" -ddtrace = ">=2.20.0,<4" +ddtrace = ">=3.10.2,<4" ujson = ">=5.9.0" botocore = { version = "^1.34.0", optional = true } requests = { version ="^2.22.0", optional = true } diff --git a/scripts/check_layer_size.sh b/scripts/check_layer_size.sh index 90d5861b..626f9d31 100755 --- a/scripts/check_layer_size.sh +++ b/scripts/check_layer_size.sh @@ -8,8 +8,8 @@ # Compares layer size to threshold, and fails if below that threshold set -e -MAX_LAYER_COMPRESSED_SIZE_KB=$(expr 5 \* 1024) -MAX_LAYER_UNCOMPRESSED_SIZE_KB=$(expr 13 \* 1024) +MAX_LAYER_COMPRESSED_SIZE_KB=$(expr 6 \* 1024) +MAX_LAYER_UNCOMPRESSED_SIZE_KB=$(expr 15 \* 1024) LAYER_FILES_PREFIX="datadog_lambda_py" diff --git a/tests/event_samples/application-load-balancer-mutivalue-headers.json b/tests/event_samples/application-load-balancer-mutivalue-headers.json new file mode 100644 index 00000000..6d446d15 --- /dev/null +++ b/tests/event_samples/application-load-balancer-mutivalue-headers.json @@ -0,0 +1,31 @@ +{ + "requestContext": { + "elb": { + "targetGroupArn": "arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-xyz/123abc" + } + }, + "httpMethod": "GET", + "path": "/lambda", + "queryStringParameters": { + "query": "1234ABCD" + }, + "multiValueHeaders": { + "accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"], + "accept-encoding": ["gzip"], + "accept-language": ["en-US,en;q=0.9"], + "connection": ["keep-alive"], + "host": ["lambda-alb-123578498.us-east-2.elb.amazonaws.com"], + "upgrade-insecure-requests": ["1"], + "user-agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"], + "x-amzn-trace-id": ["Root=1-5c536348-3d683b8b04734faae651f476"], + "x-forwarded-for": ["72.12.164.125"], + "x-forwarded-port": ["80"], + "x-forwarded-proto": ["http"], + "x-imforwards": ["20"], + "x-datadog-trace-id": ["12345"], + "x-datadog-parent-id": ["67890"], + "x-datadog-sampling-priority": ["2"] + }, + "body": "", + "isBase64Encoded": false +} diff --git a/tests/integration/requirements.txt b/tests/integration/requirements.txt index 5678a66c..343ea025 100644 --- a/tests/integration/requirements.txt +++ b/tests/integration/requirements.txt @@ -1,4 +1,4 @@ certifi==2024.12.14 charset-normalizer==3.4.1 idna==3.10 -requests==2.32.3 +requests==2.32.4 diff --git a/tests/integration/snapshots/logs/async-metrics_python310.log b/tests/integration/snapshots/logs/async-metrics_python310.log index 0bd7237c..bda234df 100644 --- a/tests/integration/snapshots/logs/async-metrics_python310.log +++ b/tests/integration/snapshots/logs/async-metrics_python310.log @@ -119,7 +119,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -133,7 +133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -145,7 +146,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -160,7 +161,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -326,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -340,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -352,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -367,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -485,7 +489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -499,7 +503,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -511,7 +516,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -526,7 +531,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -660,7 +666,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -674,7 +680,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -686,7 +693,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -701,7 +708,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -826,7 +834,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -840,7 +848,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -852,7 +861,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -867,7 +876,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1001,7 +1011,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1015,7 +1025,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1027,7 +1038,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1042,7 +1053,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1165,7 +1177,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1179,7 +1191,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1191,7 +1204,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1206,7 +1219,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1328,7 +1342,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1342,7 +1356,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1354,7 +1369,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1369,7 +1384,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1499,7 +1515,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1513,7 +1529,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1525,7 +1542,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1540,7 +1557,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 diff --git a/tests/integration/snapshots/logs/async-metrics_python311.log b/tests/integration/snapshots/logs/async-metrics_python311.log index 8550a062..fd318de3 100644 --- a/tests/integration/snapshots/logs/async-metrics_python311.log +++ b/tests/integration/snapshots/logs/async-metrics_python311.log @@ -119,7 +119,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -133,7 +133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -145,7 +146,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -160,7 +161,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -326,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -340,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -352,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -367,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -485,7 +489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -499,7 +503,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -511,7 +516,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -526,7 +531,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -660,7 +666,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -674,7 +680,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -686,7 +693,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -701,7 +708,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -826,7 +834,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -840,7 +848,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -852,7 +861,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -867,7 +876,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1001,7 +1011,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1015,7 +1025,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1027,7 +1038,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1042,7 +1053,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1165,7 +1177,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1179,7 +1191,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1191,7 +1204,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1206,7 +1219,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1328,7 +1342,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1342,7 +1356,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1354,7 +1369,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1369,7 +1384,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1499,7 +1515,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1513,7 +1529,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1525,7 +1542,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1540,7 +1557,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 diff --git a/tests/integration/snapshots/logs/async-metrics_python312.log b/tests/integration/snapshots/logs/async-metrics_python312.log index 57c318ab..b51b6a2d 100644 --- a/tests/integration/snapshots/logs/async-metrics_python312.log +++ b/tests/integration/snapshots/logs/async-metrics_python312.log @@ -119,7 +119,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -133,7 +133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -145,7 +146,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -160,7 +161,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -326,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -340,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -352,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -367,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -485,7 +489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -499,7 +503,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -511,7 +516,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -526,7 +531,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -660,7 +666,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -674,7 +680,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -686,7 +693,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -701,7 +708,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -826,7 +834,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -840,7 +848,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -852,7 +861,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -867,7 +876,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1001,7 +1011,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1015,7 +1025,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1027,7 +1038,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1042,7 +1053,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1165,7 +1177,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1179,7 +1191,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1191,7 +1204,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1206,7 +1219,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1328,7 +1342,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1342,7 +1356,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1354,7 +1369,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1369,7 +1384,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1499,7 +1515,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1513,7 +1529,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1525,7 +1542,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1540,7 +1557,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 diff --git a/tests/integration/snapshots/logs/async-metrics_python313.log b/tests/integration/snapshots/logs/async-metrics_python313.log index 9204499b..89b73e92 100644 --- a/tests/integration/snapshots/logs/async-metrics_python313.log +++ b/tests/integration/snapshots/logs/async-metrics_python313.log @@ -119,7 +119,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -133,7 +133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -145,7 +146,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -160,7 +161,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -326,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -340,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -352,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -367,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -485,7 +489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -499,7 +503,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -511,7 +516,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -526,7 +531,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -660,7 +666,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -674,7 +680,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -686,7 +693,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -701,7 +708,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -826,7 +834,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -840,7 +848,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -852,7 +861,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -867,7 +876,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1001,7 +1011,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1015,7 +1025,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1027,7 +1038,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1042,7 +1053,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1165,7 +1177,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1179,7 +1191,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1191,7 +1204,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1206,7 +1219,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1328,7 +1342,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1342,7 +1356,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1354,7 +1369,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1369,7 +1384,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1499,7 +1515,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1513,7 +1529,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1525,7 +1542,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1540,7 +1557,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 diff --git a/tests/integration/snapshots/logs/async-metrics_python38.log b/tests/integration/snapshots/logs/async-metrics_python38.log index e6df054c..ff5e5a60 100644 --- a/tests/integration/snapshots/logs/async-metrics_python38.log +++ b/tests/integration/snapshots/logs/async-metrics_python38.log @@ -119,7 +119,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -133,7 +133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -145,7 +146,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -160,7 +161,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -326,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -340,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -352,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -367,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -485,7 +489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -499,7 +503,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -511,7 +516,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -526,7 +531,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -660,7 +666,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -674,7 +680,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -686,7 +693,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -701,7 +708,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -826,7 +834,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -840,7 +848,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -852,7 +861,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -867,7 +876,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1001,7 +1011,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1015,7 +1025,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1027,7 +1038,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1042,7 +1053,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1165,7 +1177,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1179,7 +1191,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1191,7 +1204,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1206,7 +1219,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1328,7 +1342,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1342,7 +1356,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1354,7 +1369,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1369,7 +1384,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1499,7 +1515,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1513,7 +1529,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1525,7 +1542,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1540,7 +1557,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 diff --git a/tests/integration/snapshots/logs/async-metrics_python39.log b/tests/integration/snapshots/logs/async-metrics_python39.log index 9bcb7a85..5e3d46b6 100644 --- a/tests/integration/snapshots/logs/async-metrics_python39.log +++ b/tests/integration/snapshots/logs/async-metrics_python39.log @@ -119,7 +119,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -133,7 +133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -145,7 +146,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -160,7 +161,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -326,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -340,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -352,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -367,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -485,7 +489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -499,7 +503,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -511,7 +516,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -526,7 +531,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -660,7 +666,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -674,7 +680,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -686,7 +693,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -701,7 +708,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -826,7 +834,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -840,7 +848,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -852,7 +861,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -867,7 +876,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1001,7 +1011,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1015,7 +1025,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1027,7 +1038,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1042,7 +1053,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1165,7 +1177,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1179,7 +1191,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1191,7 +1204,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1206,7 +1219,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1328,7 +1342,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1342,7 +1356,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1354,7 +1369,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1369,7 +1384,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1499,7 +1515,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1513,7 +1529,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1525,7 +1542,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1540,7 +1557,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 diff --git a/tests/integration/snapshots/logs/sync-metrics_python310.log b/tests/integration/snapshots/logs/sync-metrics_python310.log index 40562a6d..21569831 100644 --- a/tests/integration/snapshots/logs/sync-metrics_python310.log +++ b/tests/integration/snapshots/logs/sync-metrics_python310.log @@ -99,7 +99,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -113,7 +113,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -125,7 +126,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -140,7 +141,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -158,7 +160,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -174,6 +176,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -325,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -339,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -351,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -366,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -384,7 +389,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -400,6 +405,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -503,7 +509,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -517,7 +523,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -529,7 +536,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -544,7 +551,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -562,7 +570,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -578,6 +586,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -697,7 +706,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -711,7 +720,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -723,7 +733,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -738,7 +748,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -756,7 +767,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -772,6 +783,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -882,7 +894,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -896,7 +908,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -908,7 +921,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -923,7 +936,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -941,7 +955,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -957,6 +971,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1076,7 +1091,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1090,7 +1105,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1102,7 +1118,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1117,7 +1133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1135,7 +1152,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1151,6 +1168,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1259,7 +1277,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1273,7 +1291,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1285,7 +1304,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1300,7 +1319,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1318,7 +1338,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1334,6 +1354,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1441,7 +1462,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1455,7 +1476,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1467,7 +1489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1482,7 +1504,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1500,7 +1523,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1516,6 +1539,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1631,7 +1655,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1645,7 +1669,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1657,7 +1682,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1672,7 +1697,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1690,7 +1716,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1706,6 +1732,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" diff --git a/tests/integration/snapshots/logs/sync-metrics_python311.log b/tests/integration/snapshots/logs/sync-metrics_python311.log index 52ec4c85..5fcd504d 100644 --- a/tests/integration/snapshots/logs/sync-metrics_python311.log +++ b/tests/integration/snapshots/logs/sync-metrics_python311.log @@ -99,7 +99,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -113,7 +113,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -125,7 +126,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -140,7 +141,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -158,7 +160,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -174,6 +176,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -325,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -339,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -351,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -366,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -384,7 +389,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -400,6 +405,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -503,7 +509,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -517,7 +523,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -529,7 +536,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -544,7 +551,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -562,7 +570,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -578,6 +586,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -697,7 +706,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -711,7 +720,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -723,7 +733,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -738,7 +748,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -756,7 +767,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -772,6 +783,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -882,7 +894,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -896,7 +908,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -908,7 +921,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -923,7 +936,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -941,7 +955,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -957,6 +971,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1076,7 +1091,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1090,7 +1105,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1102,7 +1118,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1117,7 +1133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1135,7 +1152,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1151,6 +1168,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1259,7 +1277,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1273,7 +1291,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1285,7 +1304,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1300,7 +1319,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1318,7 +1338,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1334,6 +1354,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1441,7 +1462,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1455,7 +1476,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1467,7 +1489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1482,7 +1504,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1500,7 +1523,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1516,6 +1539,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1631,7 +1655,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1645,7 +1669,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1657,7 +1682,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1672,7 +1697,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1690,7 +1716,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1706,6 +1732,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" diff --git a/tests/integration/snapshots/logs/sync-metrics_python312.log b/tests/integration/snapshots/logs/sync-metrics_python312.log index 3ec0f01f..9a05404c 100644 --- a/tests/integration/snapshots/logs/sync-metrics_python312.log +++ b/tests/integration/snapshots/logs/sync-metrics_python312.log @@ -99,7 +99,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -113,7 +113,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -125,7 +126,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -140,7 +141,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -158,7 +160,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -174,6 +176,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -325,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -339,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -351,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -366,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -384,7 +389,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -400,6 +405,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -503,7 +509,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -517,7 +523,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -529,7 +536,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -544,7 +551,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -562,7 +570,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -578,6 +586,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -697,7 +706,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -711,7 +720,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -723,7 +733,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -738,7 +748,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -756,7 +767,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -772,6 +783,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -882,7 +894,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -896,7 +908,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -908,7 +921,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -923,7 +936,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -941,7 +955,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -957,6 +971,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1076,7 +1091,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1090,7 +1105,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1102,7 +1118,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1117,7 +1133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1135,7 +1152,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1151,6 +1168,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1259,7 +1277,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1273,7 +1291,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1285,7 +1304,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1300,7 +1319,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1318,7 +1338,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1334,6 +1354,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1441,7 +1462,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1455,7 +1476,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1467,7 +1489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1482,7 +1504,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1500,7 +1523,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1516,6 +1539,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1631,7 +1655,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1645,7 +1669,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1657,7 +1682,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1672,7 +1697,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1690,7 +1716,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1706,6 +1732,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" diff --git a/tests/integration/snapshots/logs/sync-metrics_python313.log b/tests/integration/snapshots/logs/sync-metrics_python313.log index d2c20dc0..5d17bed5 100644 --- a/tests/integration/snapshots/logs/sync-metrics_python313.log +++ b/tests/integration/snapshots/logs/sync-metrics_python313.log @@ -99,7 +99,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -113,7 +113,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -125,7 +126,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -140,7 +141,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -158,7 +160,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -174,6 +176,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -325,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -339,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -351,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -366,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -384,7 +389,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -400,6 +405,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -503,7 +509,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -517,7 +523,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -529,7 +536,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -544,7 +551,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -562,7 +570,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -578,6 +586,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -697,7 +706,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -711,7 +720,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -723,7 +733,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -738,7 +748,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -756,7 +767,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -772,6 +783,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -882,7 +894,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -896,7 +908,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -908,7 +921,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -923,7 +936,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -941,7 +955,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -957,6 +971,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1076,7 +1091,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1090,7 +1105,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1102,7 +1118,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1117,7 +1133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1135,7 +1152,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1151,6 +1168,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1259,7 +1277,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1273,7 +1291,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1285,7 +1304,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1300,7 +1319,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1318,7 +1338,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1334,6 +1354,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1441,7 +1462,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1455,7 +1476,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1467,7 +1489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1482,7 +1504,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1500,7 +1523,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1516,6 +1539,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1631,7 +1655,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1645,7 +1669,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1657,7 +1682,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1672,7 +1697,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1690,7 +1716,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1706,6 +1732,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" diff --git a/tests/integration/snapshots/logs/sync-metrics_python38.log b/tests/integration/snapshots/logs/sync-metrics_python38.log index 57a354a6..37ed391e 100644 --- a/tests/integration/snapshots/logs/sync-metrics_python38.log +++ b/tests/integration/snapshots/logs/sync-metrics_python38.log @@ -99,7 +99,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -113,7 +113,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -125,7 +126,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -140,7 +141,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -158,7 +160,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -174,6 +176,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -325,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -339,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -351,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -366,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -384,7 +389,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -400,6 +405,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -503,7 +509,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -517,7 +523,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -529,7 +536,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -544,7 +551,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -562,7 +570,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -578,6 +586,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -697,7 +706,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -711,7 +720,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -723,7 +733,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -738,7 +748,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -756,7 +767,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -772,6 +783,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -882,7 +894,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -896,7 +908,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -908,7 +921,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -923,7 +936,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -941,7 +955,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -957,6 +971,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1076,7 +1091,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1090,7 +1105,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1102,7 +1118,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1117,7 +1133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1135,7 +1152,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1151,6 +1168,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1259,7 +1277,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1273,7 +1291,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1285,7 +1304,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1300,7 +1319,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1318,7 +1338,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1334,6 +1354,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1441,7 +1462,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1455,7 +1476,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1467,7 +1489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1482,7 +1504,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1500,7 +1523,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1516,6 +1539,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1631,7 +1655,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1645,7 +1669,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1657,7 +1682,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1672,7 +1697,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1690,7 +1716,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1706,6 +1732,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" diff --git a/tests/integration/snapshots/logs/sync-metrics_python39.log b/tests/integration/snapshots/logs/sync-metrics_python39.log index 8b7bb31b..f147744b 100644 --- a/tests/integration/snapshots/logs/sync-metrics_python39.log +++ b/tests/integration/snapshots/logs/sync-metrics_python39.log @@ -99,7 +99,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -113,7 +113,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -125,7 +126,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -140,7 +141,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -158,7 +160,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -174,6 +176,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -325,7 +328,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -339,7 +342,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -351,7 +355,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -366,7 +370,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -384,7 +389,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -400,6 +405,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -503,7 +509,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -517,7 +523,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -529,7 +536,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -544,7 +551,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -562,7 +570,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -578,6 +586,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -697,7 +706,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -711,7 +720,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -723,7 +733,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -738,7 +748,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -756,7 +767,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -772,6 +783,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -882,7 +894,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -896,7 +908,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -908,7 +921,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -923,7 +936,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -941,7 +955,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -957,6 +971,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1076,7 +1091,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1090,7 +1105,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1102,7 +1118,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1117,7 +1133,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1135,7 +1152,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1151,6 +1168,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1259,7 +1277,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1273,7 +1291,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1285,7 +1304,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1300,7 +1319,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1318,7 +1338,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1334,6 +1354,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1441,7 +1462,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1455,7 +1476,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1467,7 +1489,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1482,7 +1504,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1500,7 +1523,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1516,6 +1539,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" @@ -1631,7 +1655,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1645,7 +1669,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://datadoghq.com/", "out.host": "datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1, @@ -1657,7 +1682,7 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "GET /", "name": "requests.request", "error": 0, @@ -1672,7 +1697,8 @@ HTTP GET https://www.datadoghq.com/ Headers: ["Accept-Encoding:gzip, deflate","A "http.url": "https://www.datadoghq.com/", "out.host": "www.datadoghq.com", "http.status_code": "200", - "http.useragent": "python-requests/X.X.X" + "http.useragent": "python-requests/X.X.X", + "_dd.base_service": "integration-tests-python" }, "metrics": { "_dd.measured": 1 @@ -1690,7 +1716,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "trace_id": "XXXX", "parent_id": "XXXX", "span_id": "XXXX", - "service": "integration-tests-python", + "service": "requests", "resource": "POST /api/v1/distribution_points", "name": "requests.request", "error": 0, @@ -1706,6 +1732,7 @@ HTTP POST https://api.datadoghq.com/api/v1/distribution_points Headers: ["Accept "out.host": "api.datadoghq.com", "http.status_code": "202", "http.useragent": "datadogpy/XX (python XX; os linux; arch XXXX)", + "_dd.base_service": "integration-tests-python", "_dd.p.dm": "-0", "_dd.p.tid": "XXXX", "language": "python" diff --git a/tests/test_asm.py b/tests/test_asm.py new file mode 100644 index 00000000..e57c289f --- /dev/null +++ b/tests/test_asm.py @@ -0,0 +1,329 @@ +import json +import pytest +from unittest.mock import MagicMock, patch + +from datadog_lambda.asm import asm_start_request, asm_start_response +from datadog_lambda.trigger import parse_event_source, extract_trigger_tags +from tests.utils import get_mock_context + +event_samples = "tests/event_samples/" + + +# Test cases for ASM start request +ASM_START_REQUEST_TEST_CASES = [ + ( + "application_load_balancer", + "application-load-balancer.json", + "72.12.164.125", + "/lambda", + "GET", + "", + False, + {"query": "1234ABCD"}, + None, + None, + ), + ( + "application_load_balancer_multivalue_headers", + "application-load-balancer-mutivalue-headers.json", + "72.12.164.125", + "/lambda", + "GET", + "", + False, + {"query": "1234ABCD"}, + None, + None, + ), + ( + "lambda_function_url", + "lambda-url.json", + "71.195.30.42", + "/", + "GET", + None, + False, + None, + None, + None, + ), + ( + "api_gateway", + "api-gateway.json", + "127.0.0.1", + "/path/to/resource", + "POST", + "eyJ0ZXN0IjoiYm9keSJ9", + True, + {"foo": ["bar"]}, + {"proxy": "/path/to/resource"}, + "/{proxy+}", + ), + ( + "api_gateway_v2_parametrized", + "api-gateway-v2-parametrized.json", + "76.115.124.192", + "/user/42", + "GET", + None, + False, + None, + {"id": "42"}, + "/user/{id}", + ), + ( + "api_gateway_websocket", + "api-gateway-websocket-default.json", + "38.122.226.210", + None, + None, + '"What\'s good in the hood?"', + False, + None, + None, + None, + ), +] + + +# Test cases for ASM start response +ASM_START_RESPONSE_TEST_CASES = [ + ( + "application_load_balancer", + "application-load-balancer.json", + { + "statusCode": 200, + "headers": {"Content-Type": "text/html"}, + }, + "200", + {"Content-Type": "text/html"}, + True, + ), + ( + "application_load_balancer_multivalue_headers", + "application-load-balancer-mutivalue-headers.json", + { + "statusCode": 404, + "multiValueHeaders": { + "Content-Type": ["text/plain"], + "X-Error": ["Not Found"], + }, + }, + "404", + { + "Content-Type": "text/plain", + "X-Error": "Not Found", + }, + True, + ), + ( + "lambda_function_url", + "lambda-url.json", + { + "statusCode": 201, + "headers": { + "Location": "/user/123", + "Content-Type": "application/json", + }, + }, + "201", + { + "Location": "/user/123", + "Content-Type": "application/json", + }, + True, + ), + ( + "api_gateway", + "api-gateway.json", + { + "statusCode": 200, + "headers": { + "Content-Type": "application/json", + "X-Custom-Header": "test-value", + }, + "body": '{"message": "success"}', + }, + "200", + { + "Content-Type": "application/json", + "X-Custom-Header": "test-value", + }, + True, + ), + ( + "api_gateway_v2_parametrized", + "api-gateway-v2-parametrized.json", + { + "statusCode": 200, + "headers": {"Content-Type": "application/json"}, + }, + "200", + {"Content-Type": "application/json"}, + True, + ), + ( + "api_gateway_websocket", + "api-gateway-websocket-default.json", + { + "statusCode": 200, + "headers": {"Content-Type": "text/plain"}, + }, + "200", + {"Content-Type": "text/plain"}, + True, + ), + ( + "non_http_event_s3", + "s3.json", + {"statusCode": 200}, + "200", + {}, + False, # Should not dispatch for non-HTTP events + ), + ( + "api_gateway_v2_string_response", + "api-gateway-v2-parametrized.json", + "Hello, World!", + "200", + {"content-type": "application/json"}, + True, + ), + ( + "api_gateway_v2_dict_response", + "api-gateway-v2-parametrized.json", + {"message": "Hello, World!"}, + "200", + {"content-type": "application/json"}, + True, + ), +] + + +@pytest.mark.parametrize( + "name,file,expected_ip,expected_uri,expected_method,expected_body,expected_base64,expected_query,expected_path_params,expected_route", + ASM_START_REQUEST_TEST_CASES, +) +@patch("datadog_lambda.asm.core") +def test_asm_start_request_parametrized( + mock_core, + name, + file, + expected_ip, + expected_uri, + expected_method, + expected_body, + expected_base64, + expected_query, + expected_path_params, + expected_route, +): + """Test ASM start request for various HTTP event types using parametrization""" + mock_span = MagicMock() + ctx = get_mock_context() + + # Reset mock for each test + mock_core.reset_mock() + mock_span.reset_mock() + + test_file = event_samples + file + with open(test_file, "r") as f: + event = json.load(f) + + event_source = parse_event_source(event) + trigger_tags = extract_trigger_tags(event, ctx) + + asm_start_request(mock_span, event, event_source, trigger_tags) + + # Verify core.dispatch was called + mock_core.dispatch.assert_called_once() + call_args = mock_core.dispatch.call_args + dispatch_args = call_args[0][1] + ( + span, + request_headers, + request_ip, + body, + is_base64_encoded, + raw_uri, + http_route, + http_method, + parsed_query, + request_path_parameters, + ) = dispatch_args + + # Common assertions + assert span == mock_span + assert isinstance(request_headers, dict) + + # Specific assertions based on test case + assert request_ip == expected_ip + assert raw_uri == expected_uri + assert http_method == expected_method + assert body == expected_body + assert is_base64_encoded == expected_base64 + + if expected_query is not None: + assert parsed_query == expected_query + else: + assert parsed_query is None + + if expected_path_params is not None: + assert request_path_parameters == expected_path_params + else: + assert request_path_parameters is None + + # Check route is correctly extracted and passed + assert http_route == expected_route + + # Check IP tags were set if IP is present + if expected_ip: + mock_span.set_tag_str.assert_any_call("http.client_ip", expected_ip) + mock_span.set_tag_str.assert_any_call("network.client.ip", expected_ip) + + +@pytest.mark.parametrize( + "name,event_file,response,status_code,expected_headers,should_dispatch", + ASM_START_RESPONSE_TEST_CASES, +) +@patch("datadog_lambda.asm.core") +def test_asm_start_response_parametrized( + mock_core, + name, + event_file, + response, + status_code, + expected_headers, + should_dispatch, +): + """Test ASM start response for various HTTP event types using parametrization""" + mock_span = MagicMock() + + # Reset mock for each test + mock_core.reset_mock() + mock_span.reset_mock() + + test_file = event_samples + event_file + with open(test_file, "r") as f: + event = json.load(f) + + event_source = parse_event_source(event) + + asm_start_response(mock_span, status_code, event_source, response) + + if should_dispatch: + # Verify core.dispatch was called + mock_core.dispatch.assert_called_once() + call_args = mock_core.dispatch.call_args + assert call_args[0][0] == "aws_lambda.start_response" + + # Extract the dispatched arguments + dispatch_args = call_args[0][1] + span, response_status_code, response_headers = dispatch_args + + assert span == mock_span + assert response_status_code == status_code + assert response_headers == expected_headers + else: + # Verify core.dispatch was not called for non-HTTP events + mock_core.dispatch.assert_not_called() diff --git a/tests/test_dsm.py b/tests/test_dsm.py deleted file mode 100644 index 544212d8..00000000 --- a/tests/test_dsm.py +++ /dev/null @@ -1,112 +0,0 @@ -import unittest -from unittest.mock import patch, MagicMock - -from datadog_lambda.dsm import set_dsm_context, _dsm_set_sqs_context -from datadog_lambda.trigger import EventTypes, _EventSource - - -class TestDsmSQSContext(unittest.TestCase): - def setUp(self): - patcher = patch("datadog_lambda.dsm._dsm_set_sqs_context") - self.mock_dsm_set_sqs_context = patcher.start() - self.addCleanup(patcher.stop) - - patcher = patch("ddtrace.internal.datastreams.data_streams_processor") - self.mock_data_streams_processor = patcher.start() - self.addCleanup(patcher.stop) - - patcher = patch("ddtrace.internal.datastreams.botocore.get_datastreams_context") - self.mock_get_datastreams_context = patcher.start() - self.mock_get_datastreams_context.return_value = {} - self.addCleanup(patcher.stop) - - patcher = patch( - "ddtrace.internal.datastreams.botocore.calculate_sqs_payload_size" - ) - self.mock_calculate_sqs_payload_size = patcher.start() - self.mock_calculate_sqs_payload_size.return_value = 100 - self.addCleanup(patcher.stop) - - patcher = patch("ddtrace.internal.datastreams.processor.DsmPathwayCodec.decode") - self.mock_dsm_pathway_codec_decode = patcher.start() - self.addCleanup(patcher.stop) - - def test_non_sqs_event_source_does_nothing(self): - """Test that non-SQS event sources don't trigger DSM context setting""" - event = {} - # Use Unknown Event Source - event_source = _EventSource(EventTypes.UNKNOWN) - set_dsm_context(event, event_source) - - # DSM context should not be set for non-SQS events - self.mock_dsm_set_sqs_context.assert_not_called() - - def test_sqs_event_with_no_records_does_nothing(self): - """Test that events where Records is None don't trigger DSM processing""" - events_with_no_records = [ - {}, - {"Records": None}, - {"someOtherField": "value"}, - ] - - for event in events_with_no_records: - _dsm_set_sqs_context(event) - self.mock_data_streams_processor.assert_not_called() - - def test_sqs_event_triggers_dsm_sqs_context(self): - """Test that SQS event sources trigger the SQS-specific DSM context function""" - sqs_event = { - "Records": [ - { - "eventSource": "aws:sqs", - "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:my-queue", - "body": "Hello from SQS!", - } - ] - } - - event_source = _EventSource(EventTypes.SQS) - set_dsm_context(sqs_event, event_source) - - self.mock_dsm_set_sqs_context.assert_called_once_with(sqs_event) - - def test_sqs_multiple_records_process_each_record(self): - """Test that each record in an SQS event gets processed individually""" - multi_record_event = { - "Records": [ - { - "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:queue1", - "body": "Message 1", - }, - { - "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:queue2", - "body": "Message 2", - }, - { - "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:queue3", - "body": "Message 3", - }, - ] - } - - mock_context = MagicMock() - self.mock_dsm_pathway_codec_decode.return_value = mock_context - - _dsm_set_sqs_context(multi_record_event) - - self.assertEqual(mock_context.set_checkpoint.call_count, 3) - - calls = mock_context.set_checkpoint.call_args_list - expected_arns = [ - "arn:aws:sqs:us-east-1:123456789012:queue1", - "arn:aws:sqs:us-east-1:123456789012:queue2", - "arn:aws:sqs:us-east-1:123456789012:queue3", - ] - - for i, call in enumerate(calls): - args, kwargs = call - tags = args[0] - self.assertIn("direction:in", tags) - self.assertIn(f"topic:{expected_arns[i]}", tags) - self.assertIn("type:sqs", tags) - self.assertEqual(kwargs["payload_size"], 100) diff --git a/tests/test_tracing.py b/tests/test_tracing.py index a629343e..fcedd516 100644 --- a/tests/test_tracing.py +++ b/tests/test_tracing.py @@ -1,3 +1,4 @@ +import base64 import copy import functools import json @@ -6,7 +7,7 @@ import os import unittest -from unittest.mock import Mock, patch, call +from unittest.mock import Mock, patch, call, ANY import ddtrace @@ -41,8 +42,12 @@ service_mapping as global_service_mapping, propagator, emit_telemetry_on_exception_outside_of_handler, + _dsm_set_checkpoint, + extract_context_from_kinesis_event, + extract_context_from_sqs_or_sns_event_or_context, ) +from datadog_lambda.trigger import parse_event_source from tests.utils import get_mock_context @@ -2438,3 +2443,928 @@ def test_exception_outside_handler_tracing_disabled( mock_submit_errors_metric.assert_called_once_with(None) mock_trace.assert_not_called() + + +class TestExtractDDContextWithDSMLogic(unittest.TestCase): + def setUp(self): + checkpoint_patcher = patch("ddtrace.data_streams.set_consume_checkpoint") + self.mock_checkpoint = checkpoint_patcher.start() + self.addCleanup(checkpoint_patcher.stop) + self.lambda_context = get_mock_context() + config_patcher = patch( + "datadog_lambda.config.Config.data_streams_enabled", True + ) + config_patcher.start() + self.addCleanup(config_patcher.stop) + + # SQS TESTS + + def test_sqs_context_propagated_string_value(self): + dd_data = {"dd-pathway-ctx-base64": "12345"} + dd_json_data = json.dumps(dd_data) + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "messageAttributes": { + "_datadog": {"dataType": "String", "stringValue": dd_json_data} + }, + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), "12345") + + def test_sqs_context_propagated_binary_value(self): + dd_data = {"dd-pathway-ctx-base64": "12345"} + dd_json_data = json.dumps(dd_data) + encoded_data = base64.b64encode(dd_json_data.encode()).decode() + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "messageAttributes": { + "_datadog": {"dataType": "Binary", "binaryValue": encoded_data} + }, + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), "12345") + + def test_sqs_no_datadog_message_attribute(self): + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "messageAttributes": {}, # No _datadog key + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_sqs_empty_datadog_message_attribute(self): + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "messageAttributes": { + "_datadog": { + "dataType": "String", + "stringValue": "null", + } # json.loads("null") => None + }, + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_sqs_no_DSM_context_in_message_attribute(self): + dd_data = {"NOT-DSM-KEY": "12345"} + dd_json_data = json.dumps(dd_data) + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "messageAttributes": { + "_datadog": {"dataType": "String", "stringValue": dd_json_data} + }, + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + @patch("datadog_lambda.tracing.logger") + def test_sqs_invalid_datadog_message_attribute(self, mock_logger): + test_cases = [ + { + "name": "invalid_base64", + "event": { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "messageAttributes": { + "_datadog": { + "dataType": "Binary", + "binaryValue": "invalid-base64", + } + }, + "eventSource": "aws:sqs", + } + ] + }, + "expected_log": ("The trace extractor returned with error %s", ANY), + }, + { + "name": "unsupported_datatype", + "event": { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "messageAttributes": { + "_datadog": { + "dataType": "Number", + "numberValue": 123, + } # Unsupported type + }, + "eventSource": "aws:sqs", + } + ] + }, + "expected_log": ( + "Datadog Lambda Python only supports extracting trace" + "context from String or Binary SQS/SNS message attributes", + ), + }, + ] + + for test_case in test_cases: + with self.subTest(test_case=test_case["name"]): + mock_logger.reset_mock() + self.mock_checkpoint.reset_mock() + + extract_context_from_sqs_or_sns_event_or_context( + test_case["event"], + self.lambda_context, + parse_event_source(test_case["event"]), + ) + + # Exception triggers logger + mock_logger.debug.assert_any_call(*test_case["expected_log"]) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + self.assertEqual( + args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue" + ) + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_sqs_source_arn_not_found(self): + event = { + "Records": [ + { + "eventSourceARN": "", + "messageAttributes": {}, + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.mock_checkpoint.assert_not_called() + + @patch("datadog_lambda.config.Config.data_streams_enabled", False) + def test_sqs_data_streams_disabled(self): + context_json = {"dd-pathway-ctx-base64": "12345"} + event_type = "sqs" + arn = "arn:aws:sqs:us-east-1:123456789012:test-queue" + + _dsm_set_checkpoint(context_json, event_type, arn) + + self.mock_checkpoint.assert_not_called() + + # SNS TESTS + + def test_sns_context_propagated_string_value(self): + dd_data = {"dd-pathway-ctx-base64": "12345"} + dd_json_data = json.dumps(dd_data) + + event = { + "Records": [ + { + "eventSourceARN": "", + "Sns": { + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": {"Type": "String", "Value": dd_json_data} + }, + }, + "eventSource": "aws:sns", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sns") + self.assertEqual(args[1], "arn:aws:sns:us-east-1:123456789012:test-topic") + carrier_get = args[2] + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), "12345") + + def test_sns_context_propagated_binary_value(self): + dd_data = {"dd-pathway-ctx-base64": "12345"} + dd_json_data = json.dumps(dd_data) + encoded_data = base64.b64encode(dd_json_data.encode()).decode() + + event = { + "Records": [ + { + "eventSourceARN": "", + "Sns": { + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": {"Type": "Binary", "Value": encoded_data} + }, + }, + "eventSource": "aws:sns", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sns") + self.assertEqual(args[1], "arn:aws:sns:us-east-1:123456789012:test-topic") + carrier_get = args[2] + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), "12345") + + def test_sns_no_datadog_message_attribute(self): + event = { + "Records": [ + { + "Sns": { + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": {}, # No _datadog key + }, + "eventSource": "aws:sns", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sns") + self.assertEqual(args[1], "arn:aws:sns:us-east-1:123456789012:test-topic") + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_sns_empty_datadog_message_attribute(self): + event = { + "Records": [ + { + "Sns": { + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": { + "Type": "String", + "Value": "null", + } # json.loads("null") => None + }, + }, + "eventSource": "aws:sns", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sns") + self.assertEqual(args[1], "arn:aws:sns:us-east-1:123456789012:test-topic") + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_sns_no_DSM_context_in_message_attribute(self): + dd_data = {"NOT-DSM-KEY": "12345"} + dd_json_data = json.dumps(dd_data) + + event = { + "Records": [ + { + "eventSourceARN": "", + "Sns": { + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": {"Type": "String", "Value": dd_json_data} + }, + }, + "eventSource": "aws:sns", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sns") + self.assertEqual(args[1], "arn:aws:sns:us-east-1:123456789012:test-topic") + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + @patch("datadog_lambda.tracing.logger") + def test_sns_invalid_datadog_message_attribute(self, mock_logger): + test_cases = [ + { + "name": "invalid_base64", + "event": { + "Records": [ + { + "Sns": { + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": { + "Type": "Binary", + "Value": "invalid-base64", + } + }, + }, + "eventSource": "aws:sns", + } + ] + }, + "expected_log": ("The trace extractor returned with error %s", ANY), + }, + { + "name": "unsupported_datatype", + "event": { + "Records": [ + { + "Sns": { + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": { + "Type": "Number", + "numberValue": 123, + } # Unsupported type + }, + }, + "eventSource": "aws:sns", + } + ] + }, + "expected_log": ( + "Datadog Lambda Python only supports extracting trace" + "context from String or Binary SQS/SNS message attributes", + ), + }, + ] + + for test_case in test_cases: + with self.subTest(test_case=test_case["name"]): + mock_logger.reset_mock() + self.mock_checkpoint.reset_mock() + + extract_context_from_sqs_or_sns_event_or_context( + test_case["event"], + self.lambda_context, + parse_event_source(test_case["event"]), + ) + + # Exception triggers logger + mock_logger.debug.assert_any_call(*test_case["expected_log"]) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sns") + self.assertEqual( + args[1], "arn:aws:sns:us-east-1:123456789012:test-topic" + ) + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_sns_source_arn_not_found(self): + event = { + "Records": [ + { + "Sns": { + "TopicArn": "", + "MessageAttributes": {}, + }, + "eventSource": "aws:sns", + "eventSourceARN": "", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.mock_checkpoint.assert_not_called() + + @patch("datadog_lambda.config.Config.data_streams_enabled", False) + def test_sns_data_streams_disabled(self): + context_json = {"dd-pathway-ctx-base64": "12345"} + event_type = "sns" + arn = "arn:aws:sns:us-east-1:123456789012:test-topic" + + _dsm_set_checkpoint(context_json, event_type, arn) + + self.mock_checkpoint.assert_not_called() + + # SNS -> SQS TESTS + + def test_sns_to_sqs_context_propagated_string_value(self): + dd_data = {"dd-pathway-ctx-base64": "12345"} + dd_json_data = json.dumps(dd_data) + + sns_notification = { + "Type": "Notification", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": {"Type": "String", "Value": dd_json_data} + }, + "Message": "test message", + } + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "body": json.dumps(sns_notification), + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + # Should use SQS ARN, not SNS ARN + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), "12345") + + def test_sns_to_sqs_context_propagated_binary_value(self): + dd_data = {"dd-pathway-ctx-base64": "12345"} + dd_json_data = json.dumps(dd_data) + encoded_data = base64.b64encode(dd_json_data.encode()).decode() + + sns_notification = { + "Type": "Notification", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": {"Type": "Binary", "Value": encoded_data} + }, + "Message": "test message", + } + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "body": json.dumps(sns_notification), + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + # Should use SQS ARN, not SNS ARN + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), "12345") + + def test_sns_to_sqs_no_datadog_message_attribute(self): + sns_notification = { + "Type": "Notification", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": {}, # No _datadog key + "Message": "test message", + } + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "body": json.dumps(sns_notification), + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + # Should use SQS ARN, not SNS ARN + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_sns_to_sqs_empty_datadog_message_attribute(self): + sns_notification = { + "Type": "Notification", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": { + "Type": "String", + "Value": "null", + } # json.loads("null") => None + }, + "Message": "test message", + } + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "body": json.dumps(sns_notification), + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + # Should use SQS ARN, not SNS ARN + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_sns_to_sqs_no_DSM_context_in_message_attribute(self): + dd_data = {"NOT-DSM-KEY": "12345"} + dd_json_data = json.dumps(dd_data) + encoded_data = base64.b64encode(dd_json_data.encode()).decode() + + sns_notification = { + "Type": "Notification", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": {"Type": "Binary", "Value": encoded_data} + }, + "Message": "test message", + } + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "body": json.dumps(sns_notification), + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + # Should use SQS ARN, not SNS ARN + self.assertEqual(args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue") + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + @patch("datadog_lambda.tracing.logger") + def test_sns_to_sqs_invalid_datadog_message_attribute(self, mock_logger): + test_cases = [ + { + "name": "invalid_base64", + "sns_notification": { + "Type": "Notification", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": {"Type": "Binary", "Value": "not-base64"} + }, + "Message": "test message", + }, + "expected_log": ("The trace extractor returned with error %s", ANY), + }, + { + "name": "unsupported_datatype", + "sns_notification": { + "Type": "Notification", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": { + "_datadog": { + "Type": "Number", + "numberValue": 123, + } # Unsupported type + }, + "Message": "test message", + }, + "expected_log": ( + "Datadog Lambda Python only supports extracting trace" + "context from String or Binary SQS/SNS message attributes", + ), + }, + ] + + for test_case in test_cases: + with self.subTest(test_case=test_case["name"]): + mock_logger.reset_mock() + self.mock_checkpoint.reset_mock() + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:test-queue", + "body": json.dumps(test_case["sns_notification"]), + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + # Exception triggers logger + mock_logger.debug.assert_any_call(*test_case["expected_log"]) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "sqs") + # Should use SQS ARN, not SNS ARN + self.assertEqual( + args[1], "arn:aws:sqs:us-east-1:123456789012:test-queue" + ) + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_sns_to_sqs_source_arn_not_found(self): + sns_notification = { + "Type": "Notification", + "TopicArn": "arn:aws:sns:us-east-1:123456789012:test-topic", + "MessageAttributes": {}, + "Message": "test message", + } + + event = { + "Records": [ + { + "eventSourceARN": "", # Empty SQS ARN + "body": json.dumps(sns_notification), + "eventSource": "aws:sqs", + } + ] + } + + extract_context_from_sqs_or_sns_event_or_context( + event, self.lambda_context, parse_event_source(event) + ) + + self.mock_checkpoint.assert_not_called() + + @patch("datadog_lambda.config.Config.data_streams_enabled", False) + def test_sns_to_sqs_data_streams_disabled(self): + context_json = {"dd-pathway-ctx-base64": "12345"} + event_type = "sqs" + arn = "arn:aws:sqs:us-east-1:123456789012:test-queue" + + _dsm_set_checkpoint(context_json, event_type, arn) + + self.mock_checkpoint.assert_not_called() + + # KINESIS TESTS + + def test_kinesis_context_propagated_binary_value(self): + dd_data = {"dd-pathway-ctx-base64": "12345"} + kinesis_data = {"_datadog": dd_data, "message": "test"} + kinesis_data_str = json.dumps(kinesis_data) + encoded_data = base64.b64encode(kinesis_data_str.encode()).decode() + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream", + "kinesis": {"data": encoded_data}, + } + ] + } + + extract_context_from_kinesis_event(event, self.lambda_context) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "kinesis") + self.assertEqual( + args[1], "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream" + ) + carrier_get = args[2] + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), "12345") + + def test_kinesis_no_datadog_message_attribute(self): + kinesis_data = {"message": "test"} # No _datadog key + kinesis_data_str = json.dumps(kinesis_data) + encoded_data = base64.b64encode(kinesis_data_str.encode()).decode() + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream", + "kinesis": {"data": encoded_data}, + } + ] + } + + extract_context_from_kinesis_event(event, self.lambda_context) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "kinesis") + self.assertEqual( + args[1], "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream" + ) + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_kinesis_empty_message_attribute(self): + kinesis_data = {"_datadog": None, "message": "test"} # _datadog is None + kinesis_data_str = json.dumps(kinesis_data) + encoded_data = base64.b64encode(kinesis_data_str.encode()).decode() + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream", + "kinesis": {"data": encoded_data}, + } + ] + } + + extract_context_from_kinesis_event(event, self.lambda_context) + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "kinesis") + self.assertEqual( + args[1], "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream" + ) + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_kinesis_no_DSM_context_in_message_attribute(self): + dd_data = {"NOT-DSM-KEY": "12345"} + kinesis_data = {"_datadog": dd_data, "message": "test"} + kinesis_data_str = json.dumps(kinesis_data) + encoded_data = base64.b64encode(kinesis_data_str.encode()).decode() + + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream", + "kinesis": {"data": encoded_data}, + } + ] + } + + extract_context_from_kinesis_event(event, self.lambda_context) + + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "kinesis") + self.assertEqual( + args[1], "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream" + ) + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + @patch("datadog_lambda.tracing.logger") + def test_kinesis_invalid_datadog_message_attribute(self, mock_logger): + event = { + "Records": [ + { + "eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream", + "kinesis": {"data": "invalid-base64"}, + } + ] + } + + extract_context_from_kinesis_event(event, self.lambda_context) + # Exception triggers logger + mock_logger.debug.assert_any_call( + "The trace extractor returned with error %s", + ANY, + ) + self.assertEqual(self.mock_checkpoint.call_count, 1) + args, _ = self.mock_checkpoint.call_args + self.assertEqual(args[0], "kinesis") + self.assertEqual( + args[1], "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream" + ) + carrier_get = args[2] + # None indicates no DSM context propagation + self.assertEqual(carrier_get("dd-pathway-ctx-base64"), None) + + def test_kinesis_source_arn_not_found(self): + kinesis_data = {"message": "test"} + kinesis_data_str = json.dumps(kinesis_data) + encoded_data = base64.b64encode(kinesis_data_str.encode()).decode() + + event = { + "Records": [ + { + "eventSourceARN": "", + "kinesis": {"data": encoded_data}, + } + ] + } + + extract_context_from_kinesis_event(event, self.lambda_context) + + self.mock_checkpoint.assert_not_called() + + @patch("datadog_lambda.config.Config.data_streams_enabled", False) + def test_kinesis_data_streams_disabled(self): + context_json = {"dd-pathway-ctx-base64": "12345"} + event_type = "kinesis" + arn = "arn:aws:kinesis:us-east-1:123456789012:stream/test-stream" + + _dsm_set_checkpoint(context_json, event_type, arn) diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index f0240905..fc081e90 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -45,10 +45,6 @@ def setUp(self): self.mock_inject_correlation_ids = patcher.start() self.addCleanup(patcher.stop) - patcher = patch("datadog_lambda.wrapper.patch_all") - self.mock_patch_all = patcher.start() - self.addCleanup(patcher.stop) - patcher = patch("datadog_lambda.tags.get_cold_start_tag") self.mock_get_cold_start_tag = patcher.start() self.mock_get_cold_start_tag.return_value = "cold_start:true" @@ -77,10 +73,6 @@ def setUp(self): self.mock_dd_lambda_layer_tag = patcher.start() self.addCleanup(patcher.stop) - patcher = patch("datadog_lambda.wrapper.set_dsm_context") - self.mock_set_dsm_context = patcher.start() - self.addCleanup(patcher.stop) - @patch("datadog_lambda.config.Config.trace_enabled", False) def test_datadog_lambda_wrapper(self): @wrapper.datadog_lambda_wrapper @@ -117,7 +109,6 @@ def lambda_handler(event, context): ) self.mock_set_correlation_ids.assert_called() self.mock_inject_correlation_ids.assert_called() - self.mock_patch_all.assert_called() def test_datadog_lambda_wrapper_flush_to_log(self): os.environ["DD_FLUSH_TO_LOG"] = "True" @@ -487,7 +478,6 @@ def lambda_handler(event, context): lambda_handler_double_wrapped(lambda_event, get_mock_context()) - self.mock_patch_all.assert_called_once() self.mock_submit_invocations_metric.assert_called_once() def test_dd_requests_service_name_default(self): @@ -562,62 +552,6 @@ def return_type_test(event, context): self.assertEqual(result, test_result) self.assertFalse(MockPrintExc.called) - def test_set_dsm_context_called_when_DSM_and_tracing_enabled(self): - os.environ["DD_DATA_STREAMS_ENABLED"] = "true" - os.environ["DD_TRACE_ENABLED"] = "true" - - @wrapper.datadog_lambda_wrapper - def lambda_handler(event, context): - return "ok" - - result = lambda_handler({}, get_mock_context()) - self.assertEqual(result, "ok") - self.mock_set_dsm_context.assert_called_once() - - del os.environ["DD_DATA_STREAMS_ENABLED"] - - def test_set_dsm_context_not_called_when_only_DSM_enabled(self): - os.environ["DD_DATA_STREAMS_ENABLED"] = "true" - os.environ["DD_TRACE_ENABLED"] = "false" - - @wrapper.datadog_lambda_wrapper - def lambda_handler(event, context): - return "ok" - - result = lambda_handler({}, get_mock_context()) - self.assertEqual(result, "ok") - self.mock_set_dsm_context.assert_not_called() - - del os.environ["DD_DATA_STREAMS_ENABLED"] - - def test_set_dsm_context_not_called_when_only_tracing_enabled(self): - os.environ["DD_DATA_STREAMS_ENABLED"] = "false" - os.environ["DD_TRACE_ENABLED"] = "true" - - @wrapper.datadog_lambda_wrapper - def lambda_handler(event, context): - return "ok" - - result = lambda_handler({}, get_mock_context()) - self.assertEqual(result, "ok") - self.mock_set_dsm_context.assert_not_called() - - del os.environ["DD_DATA_STREAMS_ENABLED"] - - def test_set_dsm_context_not_called_when_tracing_and_DSM_disabled(self): - os.environ["DD_DATA_STREAMS_ENABLED"] = "false" - os.environ["DD_TRACE_ENABLED"] = "false" - - @wrapper.datadog_lambda_wrapper - def lambda_handler(event, context): - return "ok" - - result = lambda_handler({}, get_mock_context()) - self.assertEqual(result, "ok") - self.mock_set_dsm_context.assert_not_called() - - del os.environ["DD_DATA_STREAMS_ENABLED"] - class TestLambdaWrapperWithTraceContext(unittest.TestCase): xray_root = "1-5e272390-8c398be037738dc042009320"