Skip to content

SummarizedSpan fails to deserialise due to required fields which the DataDog API does not return, #5043

Description

@doctau

Describe the bug
SummarizedSpan declares many fields as required, but the DataDog API does not return those fields for some nodes. This causes ObjectSerializer to throw an error.

At minimum, this affects at least children on leaf nodes, error, hidden_child_spans_count, meta, span_kind, metrics, parent_id

Error: missing required property 'children'
    at Function.deserialize (.../datadog-api-client-v2/models/ObjectSerializer.ts:17659:17)
    at Function.deserialize (.../datadog-api-client-v2/models/ObjectSerializer.ts:17523:28)
    at Function.deserialize (.../datadog-api-client-v2/models/ObjectSerializer.ts:17651:52)
    at Function.deserialize (.../datadog-api-client-v2/models/ObjectSerializer.ts:17523:28)
    at Function.deserialize (.../datadog-api-client-v2/models/ObjectSerializer.ts:17651:52)
    at Function.deserialize (.../datadog-api-client-v2/models/ObjectSerializer.ts:17523:28)
    at Function.deserialize (.../datadog-api-client-v2/models/ObjectSerializer.ts:17651:52)
    at Function.deserialize (.../datadog-api-client-v2/models/ObjectSerializer.ts:17523:28)
    at Function.deserialize (.../datadog-api-client-v2/models/ObjectSerializer.ts:17651:52)

To Reproduce
Steps to reproduce the behavior:

  1. Call getPrunedTraceByID() to download a trace where some of the attributes are missing.

Expected behavior
getPrunedTraceByID() works with what the DataDog API returns.

Environment and Versions (please complete the following information):

@datadog/datadog-api-client 1.63.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions