From 3547d819e8166f29a5f107f1a28877624916cc53 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 22 Oct 2026 18:56:43 +0000 Subject: [PATCH] Regenerate client from commit e14b5f5 of spec repo --- .generator/schemas/v2/openapi.yaml | 309 +++++- .../error-tracking/GetIssue_1133452323.java | 37 + .../api/client/v2/api/ErrorTrackingApi.java | 26 +- .../GetIssueIncludeQueryParameterItem.java | 4 +- .../api/client/v2/model/IssueIncluded.java | 73 +- .../client/v2/model/IssueRelationships.java | 33 +- .../api/client/v2/model/IssueSample.java | 212 ++++ .../v2/model/IssueSampleAttributes.java | 928 ++++++++++++++++++ .../api/client/v2/model/IssueSampleBias.java | 65 ++ .../v2/model/IssueSampleCodeSnippet.java | 174 ++++ .../v2/model/IssueSampleDataSource.java | 60 ++ .../v2/model/IssueSampleErrorStack.java | 188 ++++ .../client/v2/model/IssueSampleFrameLink.java | 179 ++++ .../v2/model/IssueSampleGitFileLocation.java | 273 ++++++ .../client/v2/model/IssueSampleReference.java | 175 ++++ .../v2/model/IssueSampleStackFrame.java | 199 ++++ .../api/client/v2/model/IssueSampleType.java | 55 ++ .../v2/model/IssueSamplesRelationship.java | 162 +++ .../api/client/v2/api/error_tracking.feature | 12 + .../test-runner-data/manifest.json | 7 + ...ssue-with-samples-returns-ok-response.json | 81 ++ .../test-server-data/v2/error-tracking.json | 73 ++ 22 files changed, 3316 insertions(+), 9 deletions(-) create mode 100644 examples/v2/error-tracking/GetIssue_1133452323.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSample.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleBias.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleCodeSnippet.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleDataSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleErrorStack.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleFrameLink.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleGitFileLocation.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleReference.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleStackFrame.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSampleType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IssueSamplesRelationship.java create mode 100644 src/test/resources/generated-test/test-runner-data/v2/error-tracking/get-the-details-of-an-error-tracking-issue-with-samples-returns-ok-response.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c680cd9d1d4..a000617280a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -649,7 +649,9 @@ components: schema: type: string GetIssueIncludeQueryParameter: - description: Comma-separated list of relationship objects that should be included in the response. Possible values are `assignee`, `case`, and `team_owners`. + description: |- + Comma-separated list of relationship objects that should be included in the response. + Possible values are `assignee`, `case`, `team_owners`, and `samples`. explode: false in: query name: include @@ -658,6 +660,18 @@ components: items: $ref: "#/components/schemas/GetIssueIncludeQueryParameterItem" type: array + GetIssueSamplesBiasesFilterParameter: + description: |- + Comma-separated list of biases used to pick the samples returned with `include=samples`. + Requires `include=samples`. Defaults to all biases. + explode: false + in: query + name: filter[samples.biases] + required: false + schema: + items: + $ref: "#/components/schemas/IssueSampleBias" + type: array GoogleChatHandleIdPathParameter: description: Your organization handle ID. in: path @@ -55109,12 +55123,14 @@ components: - assignee - case - team_owners + - samples example: "case" type: string x-enum-varnames: - ASSIGNEE - CASE - TEAM_OWNERS + - SAMPLES GetMappingResponse: description: Response containing the entity attribute mapping configuration including all available attributes and their properties. example: @@ -65698,6 +65714,7 @@ components: - $ref: "#/components/schemas/IssueCase" - $ref: "#/components/schemas/IssueUser" - $ref: "#/components/schemas/IssueTeam" + - $ref: "#/components/schemas/IssueSample" IssueLanguage: description: Programming language associated with the issue. enum: @@ -65821,6 +65838,8 @@ components: $ref: "#/components/schemas/IssueAssigneeRelationship" case: $ref: "#/components/schemas/IssueCaseRelationship" + samples: + $ref: "#/components/schemas/IssueSamplesRelationship" team_owners: $ref: "#/components/schemas/IssueTeamOwnersRelationship" type: object @@ -65835,6 +65854,293 @@ components: $ref: "#/components/schemas/IssueIncluded" type: array type: object + IssueSample: + description: An error event of the issue, picked because it satisfies one or more sample biases. + properties: + attributes: + $ref: "#/components/schemas/IssueSampleAttributes" + id: + description: Sample identifier. + example: "AwAAAZPHnBVMDCSmFgAAABhBWlBIbkJWTUFBRDVnUkhKTmY0WmhRQUEAAAAkMDE5M2M3OWMtMTg1OC00ZTE1LWFhMmItOTQ1N2ZkOGVlMzQyAAAAAA" + type: string + type: + $ref: "#/components/schemas/IssueSampleType" + required: + - id + - type + - attributes + type: object + IssueSampleAttributes: + description: Object containing the information of a sample. + properties: + application_id: + description: RUM application identifier of the error. + example: "40d8ca4b-2ac0-481f-b16e-f110699ecff6" + type: string + biases: + description: Biases the sample satisfies. A single error can satisfy several biases. + example: ["latest", "git_metadata"] + items: + $ref: "#/components/schemas/IssueSampleBias" + type: array + build_id: + description: Build identifier of the mobile application. + example: "a1b2c3" + type: string + bundle_version: + description: Bundle version of the mobile application. + example: "42" + type: string + data_source: + $ref: "#/components/schemas/IssueSampleDataSource" + debug_id: + description: Debug identifier used to resolve the stack trace of the error to source code. + example: "9d8c7b6a-5f4e-3d2c-1b0a-9f8e7d6c5b4a" + type: string + debug_info_captured: + description: Whether an Exception Replay snapshot was captured for the error. + example: false + type: boolean + error_source_type: + description: Source type set by the SDK or tracer that reported the error, such as `browser` for RUM browser errors or `Crashtracking` for backend crash reports. Usually not set for APM and logs errors. + example: "browser" + type: string + error_stack: + $ref: "#/components/schemas/IssueSampleErrorStack" + event: + $ref: "#/components/schemas/IssueSampleEvent" + git_commit_sha: + description: Git commit SHA of the service version. + example: "b6199f80b6199f80b6199f80b6199f80b6199f80" + type: string + git_repository_id: + description: Git repository identifier of the service. + example: "github.com/company/email-api-py" + type: string + git_repository_url: + description: Git repository URL of the service. + example: "https://github.com/company/email-api-py" + type: string + has_session_replay: + description: Whether a RUM session replay is available for the error. + example: true + type: boolean + language: + description: Programming language of the service. + example: "python" + type: string + links: + description: Source code locations of the stack frames that resolve to a repository file. + items: + $ref: "#/components/schemas/IssueSampleFrameLink" + type: array + os_name: + description: Operating system of the device that reported the error. + example: "iOS" + type: string + service: + description: Service name. + example: "email-api-py" + type: string + session_id: + description: RUM session identifier of the error. + example: "72d11fa0-7f59-408a-95ff-9af7d4f8d7db" + type: string + session_replay_url: + description: URL of the RUM session replay of the error. + example: "https://app.datadoghq.com/rum/replay/sessions/72d11fa0-7f59-408a-95ff-9af7d4f8d7db" + type: string + snapshot_id: + description: Identifier of the Exception Replay snapshot of the error. + example: "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d" + type: string + span_id: + description: APM span identifier of the error. + example: "3906394766563720946" + type: string + timestamp: + description: Timestamp of the error. + example: "2024-01-01T10:00:00Z" + format: date-time + type: string + trace_id: + description: APM trace identifier of the error. + example: "6730183925457637287" + type: string + variant: + description: Build variant of the mobile application. + example: "release" + type: string + version: + description: Version of the service. + example: "1.2.3" + type: string + view_id: + description: RUM view identifier of the error. + example: "c5c02423-c03a-400a-993f-731bebf1732b" + type: string + required: + - timestamp + - error_stack + type: object + IssueSampleBias: + description: |- + Criterion used to pick a sample. `latest` picks the most recent error. `git_metadata` picks the most + recent error with source code metadata, whose stack trace is parsed. `trace` picks the most recent error + with an APM trace. `session_replay` picks the most recent error with a RUM session replay. + `exception_replay` picks the most recent error with an Exception Replay snapshot. + enum: + - latest + - git_metadata + - trace + - session_replay + - exception_replay + example: "latest" + type: string + x-enum-varnames: + - LATEST + - GIT_METADATA + - TRACE + - SESSION_REPLAY + - EXCEPTION_REPLAY + IssueSampleCodeSnippet: + description: Source code around a stack frame. Empty when the source code is unavailable. + properties: + lines: + description: Lines of source code. + example: ["def filter_forbidden_tags(tags):", " return len(tags)"] + items: + type: string + type: array + offset: + description: Line number of the first line of the snippet, starting at 1. + example: 37 + format: int64 + type: integer + type: object + IssueSampleDataSource: + description: Product that reported the error. `NONE` when the error has no known origin. + enum: + - APM + - LOGS + - RUM + - LLMOBS + - SYNTHETICS + - NONE + example: "APM" + type: string + x-enum-varnames: + - APM + - LOGS + - RUM + - LLMOBS + - SYNTHETICS + - NONE + IssueSampleErrorStack: + description: Parsed stack trace of the error. Only the sample picked by the `git_metadata` bias has frames. + properties: + frames: + description: Stack frames, from the top of the stack. + items: + $ref: "#/components/schemas/IssueSampleStackFrame" + type: array + language: + description: Language the stack trace was parsed as. + example: "go" + type: string + type: object + IssueSampleEvent: + additionalProperties: {} + description: Raw error event, as stored by its data source. Its fields differ between APM, logs, and RUM. + type: object + IssueSampleFrameLink: + description: Source code location of a stack frame. + properties: + code_location: + $ref: "#/components/schemas/IssueSampleGitFileLocation" + frame_id: + description: Index of the frame in the stack trace, starting at 0. + example: 1 + format: int64 + type: integer + required: + - frame_id + - code_location + type: object + IssueSampleGitFileLocation: + description: Location of a stack frame in a repository file. Empty when the source code is unavailable. + properties: + column: + description: Column of the location, starting at 1. + example: 13 + format: int64 + type: integer + filepath: + description: Path of the file in the repository. + example: "conduit/apps/core/utils.py" + type: string + first_line: + description: First line of the location, starting at 1. + example: 42 + format: int64 + type: integer + last_line: + description: Last line of the location, starting at 1. + example: 42 + format: int64 + type: integer + ref: + description: Git reference of the file, usually a commit SHA. + example: "b6199f80b6199f80b6199f80b6199f80b6199f80" + type: string + repo_id: + description: Repository identifier. + example: "github.com/company/email-api-py" + type: string + type: object + IssueSampleReference: + description: A curated error sample of the issue. + properties: + id: + description: Sample identifier. + example: "AwAAAZPHnBVMDCSmFgAAABhBWlBIbkJWTUFBRDVnUkhKTmY0WmhRQUEAAAAkMDE5M2M3OWMtMTg1OC00ZTE1LWFhMmItOTQ1N2ZkOGVlMzQyAAAAAA" + type: string + type: + $ref: "#/components/schemas/IssueSampleType" + required: + - id + - type + type: object + IssueSampleStackFrame: + description: A stack frame. + properties: + code_snippet: + $ref: "#/components/schemas/IssueSampleCodeSnippet" + git_file_location: + $ref: "#/components/schemas/IssueSampleGitFileLocation" + text: + description: Text of the frame, as it appears in the stack trace. + example: "main.handler(0xc000123456)\n\t/go/src/app/main.go:42 +0x1d" + type: string + type: object + IssueSampleType: + description: Type of the object. + enum: ["error_tracking_issue_sample"] + example: "error_tracking_issue_sample" + type: string + x-enum-varnames: + - ERROR_TRACKING_ISSUE_SAMPLE + IssueSamplesRelationship: + description: Relationship between the issue and its curated error samples. + properties: + data: + description: Array of curated error samples of the issue. + items: + $ref: "#/components/schemas/IssueSampleReference" + type: array + required: + - data + type: object IssueState: description: State of the issue enum: @@ -167217,6 +167523,7 @@ paths: parameters: - $ref: "#/components/parameters/IssueIDPathParameter" - $ref: "#/components/parameters/GetIssueIncludeQueryParameter" + - $ref: "#/components/parameters/GetIssueSamplesBiasesFilterParameter" responses: "200": content: diff --git a/examples/v2/error-tracking/GetIssue_1133452323.java b/examples/v2/error-tracking/GetIssue_1133452323.java new file mode 100644 index 00000000000..96f05c951a7 --- /dev/null +++ b/examples/v2/error-tracking/GetIssue_1133452323.java @@ -0,0 +1,37 @@ +// Get the details of an error tracking issue with samples returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ErrorTrackingApi; +import com.datadog.api.client.v2.api.ErrorTrackingApi.GetIssueOptionalParameters; +import com.datadog.api.client.v2.model.GetIssueIncludeQueryParameterItem; +import com.datadog.api.client.v2.model.IssueResponse; +import com.datadog.api.client.v2.model.IssueSampleBias; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + ErrorTrackingApi apiInstance = new ErrorTrackingApi(defaultClient); + + // there is a valid "issue" in the system + String ISSUE_ID = System.getenv("ISSUE_ID"); + + try { + IssueResponse result = + apiInstance.getIssue( + ISSUE_ID, + new GetIssueOptionalParameters() + .include(Collections.singletonList(GetIssueIncludeQueryParameterItem.SAMPLES)) + .filterSamplesBiases(Collections.singletonList(IssueSampleBias.LATEST))); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ErrorTrackingApi#getIssue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/ErrorTrackingApi.java b/src/main/java/com/datadog/api/client/v2/api/ErrorTrackingApi.java index 98140adde60..0b4efcd8009 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ErrorTrackingApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ErrorTrackingApi.java @@ -6,6 +6,7 @@ import com.datadog.api.client.Pair; import com.datadog.api.client.v2.model.GetIssueIncludeQueryParameterItem; import com.datadog.api.client.v2.model.IssueResponse; +import com.datadog.api.client.v2.model.IssueSampleBias; import com.datadog.api.client.v2.model.IssueUpdateAssigneeRequest; import com.datadog.api.client.v2.model.IssueUpdateStateRequest; import com.datadog.api.client.v2.model.IssuesSearchRequest; @@ -187,19 +188,34 @@ public CompletableFuture> deleteIssueAssigneeWithHttpInfoAsync /** Manage optional parameters to getIssue. */ public static class GetIssueOptionalParameters { private List include; + private List filterSamplesBiases; /** * Set include. * * @param include Comma-separated list of relationship objects that should be included in the - * response. Possible values are assignee, case, and - * team_owners. (optional) + * response. Possible values are assignee, case, team_owners + * , and samples. (optional) * @return GetIssueOptionalParameters */ public GetIssueOptionalParameters include(List include) { this.include = include; return this; } + + /** + * Set filterSamplesBiases. + * + * @param filterSamplesBiases Comma-separated list of biases used to pick the samples returned + * with include=samples. Requires include=samples. Defaults to all + * biases. (optional) + * @return GetIssueOptionalParameters + */ + public GetIssueOptionalParameters filterSamplesBiases( + List filterSamplesBiases) { + this.filterSamplesBiases = filterSamplesBiases; + return this; + } } /** @@ -293,6 +309,7 @@ public ApiResponse getIssueWithHttpInfo( throw new ApiException(400, "Missing the required parameter 'issueId' when calling getIssue"); } List include = parameters.include; + List filterSamplesBiases = parameters.filterSamplesBiases; // create path and map variables String localVarPath = "/api/v2/error-tracking/issues/{issue_id}" @@ -302,6 +319,8 @@ public ApiResponse getIssueWithHttpInfo( Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("csv", "filter[samples.biases]", filterSamplesBiases)); Invocation.Builder builder = apiClient.createBuilder( @@ -344,6 +363,7 @@ public CompletableFuture> getIssueWithHttpInfoAsync( return result; } List include = parameters.include; + List filterSamplesBiases = parameters.filterSamplesBiases; // create path and map variables String localVarPath = "/api/v2/error-tracking/issues/{issue_id}" @@ -353,6 +373,8 @@ public CompletableFuture> getIssueWithHttpInfoAsync( Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "include", include)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("csv", "filter[samples.biases]", filterSamplesBiases)); Invocation.Builder builder; try { diff --git a/src/main/java/com/datadog/api/client/v2/model/GetIssueIncludeQueryParameterItem.java b/src/main/java/com/datadog/api/client/v2/model/GetIssueIncludeQueryParameterItem.java index 45b5e4765b5..6d3ef27e72e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GetIssueIncludeQueryParameterItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/GetIssueIncludeQueryParameterItem.java @@ -24,7 +24,7 @@ public class GetIssueIncludeQueryParameterItem extends ModelEnum { private static final Set allowedValues = - new HashSet(Arrays.asList("assignee", "case", "team_owners")); + new HashSet(Arrays.asList("assignee", "case", "team_owners", "samples")); public static final GetIssueIncludeQueryParameterItem ASSIGNEE = new GetIssueIncludeQueryParameterItem("assignee"); @@ -32,6 +32,8 @@ public class GetIssueIncludeQueryParameterItem extends ModelEnum { new GetIssueIncludeQueryParameterItem("case"); public static final GetIssueIncludeQueryParameterItem TEAM_OWNERS = new GetIssueIncludeQueryParameterItem("team_owners"); + public static final GetIssueIncludeQueryParameterItem SAMPLES = + new GetIssueIncludeQueryParameterItem("samples"); GetIssueIncludeQueryParameterItem(String value) { super(value, allowedValues); diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueIncluded.java b/src/main/java/com/datadog/api/client/v2/model/IssueIncluded.java index d904676758c..23da801c377 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IssueIncluded.java +++ b/src/main/java/com/datadog/api/client/v2/model/IssueIncluded.java @@ -203,6 +203,48 @@ public IssueIncluded deserialize(JsonParser jp, DeserializationContext ctxt) log.log(Level.FINER, "Input data does not match schema 'IssueTeam'", e); } + // deserialize IssueSample + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IssueSample.class.equals(Integer.class) + || IssueSample.class.equals(Long.class) + || IssueSample.class.equals(Float.class) + || IssueSample.class.equals(Double.class) + || IssueSample.class.equals(Boolean.class) + || IssueSample.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IssueSample.class.equals(Integer.class) || IssueSample.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IssueSample.class.equals(Float.class) || IssueSample.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IssueSample.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IssueSample.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IssueSample.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IssueSample) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IssueSample'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IssueSample'", e); + } + IssueIncluded ret = new IssueIncluded(); if (match == 1) { ret.setActualInstance(deserialized); @@ -246,10 +288,16 @@ public IssueIncluded(IssueTeam o) { setActualInstance(o); } + public IssueIncluded(IssueSample o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + static { schemas.put("IssueCase", new GenericType() {}); schemas.put("IssueUser", new GenericType() {}); schemas.put("IssueTeam", new GenericType() {}); + schemas.put("IssueSample", new GenericType() {}); JSON.registerDescendants(IssueIncluded.class, Collections.unmodifiableMap(schemas)); } @@ -260,7 +308,7 @@ public Map getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: IssueCase, IssueUser, IssueTeam + * against the oneOf child schemas: IssueCase, IssueUser, IssueTeam, IssueSample * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a * composed schema (allOf, anyOf, oneOf). @@ -279,18 +327,24 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf(IssueSample.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be IssueCase, IssueUser, IssueTeam"); + throw new RuntimeException( + "Invalid instance type. Must be IssueCase, IssueUser, IssueTeam, IssueSample"); } /** - * Get the actual instance, which can be the following: IssueCase, IssueUser, IssueTeam + * Get the actual instance, which can be the following: IssueCase, IssueUser, IssueTeam, + * IssueSample * - * @return The actual instance (IssueCase, IssueUser, IssueTeam) + * @return The actual instance (IssueCase, IssueUser, IssueTeam, IssueSample) */ @Override public Object getActualInstance() { @@ -329,4 +383,15 @@ public IssueUser getIssueUser() throws ClassCastException { public IssueTeam getIssueTeam() throws ClassCastException { return (IssueTeam) super.getActualInstance(); } + + /** + * Get the actual instance of `IssueSample`. If the actual instance is not `IssueSample`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `IssueSample` + * @throws ClassCastException if the instance is not `IssueSample` + */ + public IssueSample getIssueSample() throws ClassCastException { + return (IssueSample) super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueRelationships.java b/src/main/java/com/datadog/api/client/v2/model/IssueRelationships.java index 0653fa56ef5..57c1cc38344 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IssueRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/IssueRelationships.java @@ -20,6 +20,7 @@ @JsonPropertyOrder({ IssueRelationships.JSON_PROPERTY_ASSIGNEE, IssueRelationships.JSON_PROPERTY_CASE, + IssueRelationships.JSON_PROPERTY_SAMPLES, IssueRelationships.JSON_PROPERTY_TEAM_OWNERS }) @jakarta.annotation.Generated( @@ -32,6 +33,9 @@ public class IssueRelationships { public static final String JSON_PROPERTY_CASE = "case"; private IssueCaseRelationship _case; + public static final String JSON_PROPERTY_SAMPLES = "samples"; + private IssueSamplesRelationship samples; + public static final String JSON_PROPERTY_TEAM_OWNERS = "team_owners"; private IssueTeamOwnersRelationship teamOwners; @@ -85,6 +89,31 @@ public void setCase(IssueCaseRelationship _case) { } } + public IssueRelationships samples(IssueSamplesRelationship samples) { + this.samples = samples; + this.unparsed |= samples.unparsed; + return this; + } + + /** + * Relationship between the issue and its curated error samples. + * + * @return samples + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAMPLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IssueSamplesRelationship getSamples() { + return samples; + } + + public void setSamples(IssueSamplesRelationship samples) { + this.samples = samples; + if (samples != null) { + this.unparsed |= samples.unparsed; + } + } + public IssueRelationships teamOwners(IssueTeamOwnersRelationship teamOwners) { this.teamOwners = teamOwners; this.unparsed |= teamOwners.unparsed; @@ -168,13 +197,14 @@ public boolean equals(Object o) { IssueRelationships issueRelationships = (IssueRelationships) o; return Objects.equals(this.assignee, issueRelationships.assignee) && Objects.equals(this._case, issueRelationships._case) + && Objects.equals(this.samples, issueRelationships.samples) && Objects.equals(this.teamOwners, issueRelationships.teamOwners) && Objects.equals(this.additionalProperties, issueRelationships.additionalProperties); } @Override public int hashCode() { - return Objects.hash(assignee, _case, teamOwners, additionalProperties); + return Objects.hash(assignee, _case, samples, teamOwners, additionalProperties); } @Override @@ -183,6 +213,7 @@ public String toString() { sb.append("class IssueRelationships {\n"); sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" _case: ").append(toIndentedString(_case)).append("\n"); + sb.append(" samples: ").append(toIndentedString(samples)).append("\n"); sb.append(" teamOwners: ").append(toIndentedString(teamOwners)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSample.java b/src/main/java/com/datadog/api/client/v2/model/IssueSample.java new file mode 100644 index 00000000000..b64582776c2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSample.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** An error event of the issue, picked because it satisfies one or more sample biases. */ +@JsonPropertyOrder({ + IssueSample.JSON_PROPERTY_ATTRIBUTES, + IssueSample.JSON_PROPERTY_ID, + IssueSample.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueSample { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IssueSampleAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IssueSampleType type; + + public IssueSample() {} + + @JsonCreator + public IssueSample( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IssueSampleAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IssueSampleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IssueSample attributes(IssueSampleAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Object containing the information of a sample. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IssueSampleAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IssueSampleAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public IssueSample id(String id) { + this.id = id; + return this; + } + + /** + * Sample identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public IssueSample type(IssueSampleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of the object. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IssueSampleType getType() { + return type; + } + + public void setType(IssueSampleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueSample + */ + @JsonAnySetter + public IssueSample putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueSample object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueSample issueSample = (IssueSample) o; + return Objects.equals(this.attributes, issueSample.attributes) + && Objects.equals(this.id, issueSample.id) + && Objects.equals(this.type, issueSample.type) + && Objects.equals(this.additionalProperties, issueSample.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueSample {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleAttributes.java new file mode 100644 index 00000000000..81cbaf9c28c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleAttributes.java @@ -0,0 +1,928 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Object containing the information of a sample. */ +@JsonPropertyOrder({ + IssueSampleAttributes.JSON_PROPERTY_APPLICATION_ID, + IssueSampleAttributes.JSON_PROPERTY_BIASES, + IssueSampleAttributes.JSON_PROPERTY_BUILD_ID, + IssueSampleAttributes.JSON_PROPERTY_BUNDLE_VERSION, + IssueSampleAttributes.JSON_PROPERTY_DATA_SOURCE, + IssueSampleAttributes.JSON_PROPERTY_DEBUG_ID, + IssueSampleAttributes.JSON_PROPERTY_DEBUG_INFO_CAPTURED, + IssueSampleAttributes.JSON_PROPERTY_ERROR_SOURCE_TYPE, + IssueSampleAttributes.JSON_PROPERTY_ERROR_STACK, + IssueSampleAttributes.JSON_PROPERTY_EVENT, + IssueSampleAttributes.JSON_PROPERTY_GIT_COMMIT_SHA, + IssueSampleAttributes.JSON_PROPERTY_GIT_REPOSITORY_ID, + IssueSampleAttributes.JSON_PROPERTY_GIT_REPOSITORY_URL, + IssueSampleAttributes.JSON_PROPERTY_HAS_SESSION_REPLAY, + IssueSampleAttributes.JSON_PROPERTY_LANGUAGE, + IssueSampleAttributes.JSON_PROPERTY_LINKS, + IssueSampleAttributes.JSON_PROPERTY_OS_NAME, + IssueSampleAttributes.JSON_PROPERTY_SERVICE, + IssueSampleAttributes.JSON_PROPERTY_SESSION_ID, + IssueSampleAttributes.JSON_PROPERTY_SESSION_REPLAY_URL, + IssueSampleAttributes.JSON_PROPERTY_SNAPSHOT_ID, + IssueSampleAttributes.JSON_PROPERTY_SPAN_ID, + IssueSampleAttributes.JSON_PROPERTY_TIMESTAMP, + IssueSampleAttributes.JSON_PROPERTY_TRACE_ID, + IssueSampleAttributes.JSON_PROPERTY_VARIANT, + IssueSampleAttributes.JSON_PROPERTY_VERSION, + IssueSampleAttributes.JSON_PROPERTY_VIEW_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueSampleAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; + private String applicationId; + + public static final String JSON_PROPERTY_BIASES = "biases"; + private List biases = null; + + public static final String JSON_PROPERTY_BUILD_ID = "build_id"; + private String buildId; + + public static final String JSON_PROPERTY_BUNDLE_VERSION = "bundle_version"; + private String bundleVersion; + + public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; + private IssueSampleDataSource dataSource; + + public static final String JSON_PROPERTY_DEBUG_ID = "debug_id"; + private String debugId; + + public static final String JSON_PROPERTY_DEBUG_INFO_CAPTURED = "debug_info_captured"; + private Boolean debugInfoCaptured; + + public static final String JSON_PROPERTY_ERROR_SOURCE_TYPE = "error_source_type"; + private String errorSourceType; + + public static final String JSON_PROPERTY_ERROR_STACK = "error_stack"; + private IssueSampleErrorStack errorStack; + + public static final String JSON_PROPERTY_EVENT = "event"; + private Map event = null; + + public static final String JSON_PROPERTY_GIT_COMMIT_SHA = "git_commit_sha"; + private String gitCommitSha; + + public static final String JSON_PROPERTY_GIT_REPOSITORY_ID = "git_repository_id"; + private String gitRepositoryId; + + public static final String JSON_PROPERTY_GIT_REPOSITORY_URL = "git_repository_url"; + private String gitRepositoryUrl; + + public static final String JSON_PROPERTY_HAS_SESSION_REPLAY = "has_session_replay"; + private Boolean hasSessionReplay; + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private String language; + + public static final String JSON_PROPERTY_LINKS = "links"; + private List links = null; + + public static final String JSON_PROPERTY_OS_NAME = "os_name"; + private String osName; + + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private String sessionId; + + public static final String JSON_PROPERTY_SESSION_REPLAY_URL = "session_replay_url"; + private String sessionReplayUrl; + + public static final String JSON_PROPERTY_SNAPSHOT_ID = "snapshot_id"; + private String snapshotId; + + public static final String JSON_PROPERTY_SPAN_ID = "span_id"; + private String spanId; + + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + private OffsetDateTime timestamp; + + public static final String JSON_PROPERTY_TRACE_ID = "trace_id"; + private String traceId; + + public static final String JSON_PROPERTY_VARIANT = "variant"; + private String variant; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public static final String JSON_PROPERTY_VIEW_ID = "view_id"; + private String viewId; + + public IssueSampleAttributes() {} + + @JsonCreator + public IssueSampleAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ERROR_STACK) + IssueSampleErrorStack errorStack, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMESTAMP) OffsetDateTime timestamp) { + this.errorStack = errorStack; + this.unparsed |= errorStack.unparsed; + this.timestamp = timestamp; + } + + public IssueSampleAttributes applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * RUM application identifier of the error. + * + * @return applicationId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public IssueSampleAttributes biases(List biases) { + this.biases = biases; + return this; + } + + public IssueSampleAttributes addBiasesItem(IssueSampleBias biasesItem) { + if (this.biases == null) { + this.biases = new ArrayList<>(); + } + this.biases.add(biasesItem); + this.unparsed |= !biasesItem.isValid(); + return this; + } + + /** + * Biases the sample satisfies. A single error can satisfy several biases. + * + * @return biases + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BIASES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getBiases() { + return biases; + } + + public void setBiases(List biases) { + this.biases = biases; + } + + public IssueSampleAttributes buildId(String buildId) { + this.buildId = buildId; + return this; + } + + /** + * Build identifier of the mobile application. + * + * @return buildId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUILD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBuildId() { + return buildId; + } + + public void setBuildId(String buildId) { + this.buildId = buildId; + } + + public IssueSampleAttributes bundleVersion(String bundleVersion) { + this.bundleVersion = bundleVersion; + return this; + } + + /** + * Bundle version of the mobile application. + * + * @return bundleVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUNDLE_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBundleVersion() { + return bundleVersion; + } + + public void setBundleVersion(String bundleVersion) { + this.bundleVersion = bundleVersion; + } + + public IssueSampleAttributes dataSource(IssueSampleDataSource dataSource) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + return this; + } + + /** + * Product that reported the error. NONE when the error has no known origin. + * + * @return dataSource + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IssueSampleDataSource getDataSource() { + return dataSource; + } + + public void setDataSource(IssueSampleDataSource dataSource) { + if (!dataSource.isValid()) { + this.unparsed = true; + } + this.dataSource = dataSource; + } + + public IssueSampleAttributes debugId(String debugId) { + this.debugId = debugId; + return this; + } + + /** + * Debug identifier used to resolve the stack trace of the error to source code. + * + * @return debugId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEBUG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDebugId() { + return debugId; + } + + public void setDebugId(String debugId) { + this.debugId = debugId; + } + + public IssueSampleAttributes debugInfoCaptured(Boolean debugInfoCaptured) { + this.debugInfoCaptured = debugInfoCaptured; + return this; + } + + /** + * Whether an Exception Replay snapshot was captured for the error. + * + * @return debugInfoCaptured + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEBUG_INFO_CAPTURED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDebugInfoCaptured() { + return debugInfoCaptured; + } + + public void setDebugInfoCaptured(Boolean debugInfoCaptured) { + this.debugInfoCaptured = debugInfoCaptured; + } + + public IssueSampleAttributes errorSourceType(String errorSourceType) { + this.errorSourceType = errorSourceType; + return this; + } + + /** + * Source type set by the SDK or tracer that reported the error, such as browser for + * RUM browser errors or Crashtracking for backend crash reports. Usually not set for + * APM and logs errors. + * + * @return errorSourceType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_SOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorSourceType() { + return errorSourceType; + } + + public void setErrorSourceType(String errorSourceType) { + this.errorSourceType = errorSourceType; + } + + public IssueSampleAttributes errorStack(IssueSampleErrorStack errorStack) { + this.errorStack = errorStack; + this.unparsed |= errorStack.unparsed; + return this; + } + + /** + * Parsed stack trace of the error. Only the sample picked by the git_metadata bias + * has frames. + * + * @return errorStack + */ + @JsonProperty(JSON_PROPERTY_ERROR_STACK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IssueSampleErrorStack getErrorStack() { + return errorStack; + } + + public void setErrorStack(IssueSampleErrorStack errorStack) { + this.errorStack = errorStack; + if (errorStack != null) { + this.unparsed |= errorStack.unparsed; + } + } + + public IssueSampleAttributes event(Map event) { + this.event = event; + return this; + } + + public IssueSampleAttributes putEventItem(String key, Object eventItem) { + if (this.event == null) { + this.event = new HashMap<>(); + } + this.event.put(key, eventItem); + return this; + } + + /** + * Raw error event, as stored by its data source. Its fields differ between APM, logs, and RUM. + * + * @return event + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvent() { + return event; + } + + public void setEvent(Map event) { + this.event = event; + } + + public IssueSampleAttributes gitCommitSha(String gitCommitSha) { + this.gitCommitSha = gitCommitSha; + return this; + } + + /** + * Git commit SHA of the service version. + * + * @return gitCommitSha + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GIT_COMMIT_SHA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGitCommitSha() { + return gitCommitSha; + } + + public void setGitCommitSha(String gitCommitSha) { + this.gitCommitSha = gitCommitSha; + } + + public IssueSampleAttributes gitRepositoryId(String gitRepositoryId) { + this.gitRepositoryId = gitRepositoryId; + return this; + } + + /** + * Git repository identifier of the service. + * + * @return gitRepositoryId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GIT_REPOSITORY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGitRepositoryId() { + return gitRepositoryId; + } + + public void setGitRepositoryId(String gitRepositoryId) { + this.gitRepositoryId = gitRepositoryId; + } + + public IssueSampleAttributes gitRepositoryUrl(String gitRepositoryUrl) { + this.gitRepositoryUrl = gitRepositoryUrl; + return this; + } + + /** + * Git repository URL of the service. + * + * @return gitRepositoryUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GIT_REPOSITORY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGitRepositoryUrl() { + return gitRepositoryUrl; + } + + public void setGitRepositoryUrl(String gitRepositoryUrl) { + this.gitRepositoryUrl = gitRepositoryUrl; + } + + public IssueSampleAttributes hasSessionReplay(Boolean hasSessionReplay) { + this.hasSessionReplay = hasSessionReplay; + return this; + } + + /** + * Whether a RUM session replay is available for the error. + * + * @return hasSessionReplay + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HAS_SESSION_REPLAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasSessionReplay() { + return hasSessionReplay; + } + + public void setHasSessionReplay(Boolean hasSessionReplay) { + this.hasSessionReplay = hasSessionReplay; + } + + public IssueSampleAttributes language(String language) { + this.language = language; + return this; + } + + /** + * Programming language of the service. + * + * @return language + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLanguage() { + return language; + } + + public void setLanguage(String language) { + this.language = language; + } + + public IssueSampleAttributes links(List links) { + this.links = links; + if (links != null) { + for (IssueSampleFrameLink item : links) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public IssueSampleAttributes addLinksItem(IssueSampleFrameLink linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + this.unparsed |= linksItem.unparsed; + return this; + } + + /** + * Source code locations of the stack frames that resolve to a repository file. + * + * @return links + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + if (links != null) { + for (IssueSampleFrameLink item : links) { + this.unparsed |= item.unparsed; + } + } + } + + public IssueSampleAttributes osName(String osName) { + this.osName = osName; + return this; + } + + /** + * Operating system of the device that reported the error. + * + * @return osName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OS_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOsName() { + return osName; + } + + public void setOsName(String osName) { + this.osName = osName; + } + + public IssueSampleAttributes service(String service) { + this.service = service; + return this; + } + + /** + * Service name. + * + * @return service + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } + + public void setService(String service) { + this.service = service; + } + + public IssueSampleAttributes sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * RUM session identifier of the error. + * + * @return sessionId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public IssueSampleAttributes sessionReplayUrl(String sessionReplayUrl) { + this.sessionReplayUrl = sessionReplayUrl; + return this; + } + + /** + * URL of the RUM session replay of the error. + * + * @return sessionReplayUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSION_REPLAY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSessionReplayUrl() { + return sessionReplayUrl; + } + + public void setSessionReplayUrl(String sessionReplayUrl) { + this.sessionReplayUrl = sessionReplayUrl; + } + + public IssueSampleAttributes snapshotId(String snapshotId) { + this.snapshotId = snapshotId; + return this; + } + + /** + * Identifier of the Exception Replay snapshot of the error. + * + * @return snapshotId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNAPSHOT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSnapshotId() { + return snapshotId; + } + + public void setSnapshotId(String snapshotId) { + this.snapshotId = snapshotId; + } + + public IssueSampleAttributes spanId(String spanId) { + this.spanId = spanId; + return this; + } + + /** + * APM span identifier of the error. + * + * @return spanId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPAN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSpanId() { + return spanId; + } + + public void setSpanId(String spanId) { + this.spanId = spanId; + } + + public IssueSampleAttributes timestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Timestamp of the error. + * + * @return timestamp + */ + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getTimestamp() { + return timestamp; + } + + public void setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + public IssueSampleAttributes traceId(String traceId) { + this.traceId = traceId; + return this; + } + + /** + * APM trace identifier of the error. + * + * @return traceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTraceId() { + return traceId; + } + + public void setTraceId(String traceId) { + this.traceId = traceId; + } + + public IssueSampleAttributes variant(String variant) { + this.variant = variant; + return this; + } + + /** + * Build variant of the mobile application. + * + * @return variant + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIANT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVariant() { + return variant; + } + + public void setVariant(String variant) { + this.variant = variant; + } + + public IssueSampleAttributes version(String version) { + this.version = version; + return this; + } + + /** + * Version of the service. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public IssueSampleAttributes viewId(String viewId) { + this.viewId = viewId; + return this; + } + + /** + * RUM view identifier of the error. + * + * @return viewId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VIEW_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getViewId() { + return viewId; + } + + public void setViewId(String viewId) { + this.viewId = viewId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueSampleAttributes + */ + @JsonAnySetter + public IssueSampleAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueSampleAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueSampleAttributes issueSampleAttributes = (IssueSampleAttributes) o; + return Objects.equals(this.applicationId, issueSampleAttributes.applicationId) + && Objects.equals(this.biases, issueSampleAttributes.biases) + && Objects.equals(this.buildId, issueSampleAttributes.buildId) + && Objects.equals(this.bundleVersion, issueSampleAttributes.bundleVersion) + && Objects.equals(this.dataSource, issueSampleAttributes.dataSource) + && Objects.equals(this.debugId, issueSampleAttributes.debugId) + && Objects.equals(this.debugInfoCaptured, issueSampleAttributes.debugInfoCaptured) + && Objects.equals(this.errorSourceType, issueSampleAttributes.errorSourceType) + && Objects.equals(this.errorStack, issueSampleAttributes.errorStack) + && Objects.equals(this.event, issueSampleAttributes.event) + && Objects.equals(this.gitCommitSha, issueSampleAttributes.gitCommitSha) + && Objects.equals(this.gitRepositoryId, issueSampleAttributes.gitRepositoryId) + && Objects.equals(this.gitRepositoryUrl, issueSampleAttributes.gitRepositoryUrl) + && Objects.equals(this.hasSessionReplay, issueSampleAttributes.hasSessionReplay) + && Objects.equals(this.language, issueSampleAttributes.language) + && Objects.equals(this.links, issueSampleAttributes.links) + && Objects.equals(this.osName, issueSampleAttributes.osName) + && Objects.equals(this.service, issueSampleAttributes.service) + && Objects.equals(this.sessionId, issueSampleAttributes.sessionId) + && Objects.equals(this.sessionReplayUrl, issueSampleAttributes.sessionReplayUrl) + && Objects.equals(this.snapshotId, issueSampleAttributes.snapshotId) + && Objects.equals(this.spanId, issueSampleAttributes.spanId) + && Objects.equals(this.timestamp, issueSampleAttributes.timestamp) + && Objects.equals(this.traceId, issueSampleAttributes.traceId) + && Objects.equals(this.variant, issueSampleAttributes.variant) + && Objects.equals(this.version, issueSampleAttributes.version) + && Objects.equals(this.viewId, issueSampleAttributes.viewId) + && Objects.equals(this.additionalProperties, issueSampleAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + applicationId, + biases, + buildId, + bundleVersion, + dataSource, + debugId, + debugInfoCaptured, + errorSourceType, + errorStack, + event, + gitCommitSha, + gitRepositoryId, + gitRepositoryUrl, + hasSessionReplay, + language, + links, + osName, + service, + sessionId, + sessionReplayUrl, + snapshotId, + spanId, + timestamp, + traceId, + variant, + version, + viewId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueSampleAttributes {\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" biases: ").append(toIndentedString(biases)).append("\n"); + sb.append(" buildId: ").append(toIndentedString(buildId)).append("\n"); + sb.append(" bundleVersion: ").append(toIndentedString(bundleVersion)).append("\n"); + sb.append(" dataSource: ").append(toIndentedString(dataSource)).append("\n"); + sb.append(" debugId: ").append(toIndentedString(debugId)).append("\n"); + sb.append(" debugInfoCaptured: ").append(toIndentedString(debugInfoCaptured)).append("\n"); + sb.append(" errorSourceType: ").append(toIndentedString(errorSourceType)).append("\n"); + sb.append(" errorStack: ").append(toIndentedString(errorStack)).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" gitCommitSha: ").append(toIndentedString(gitCommitSha)).append("\n"); + sb.append(" gitRepositoryId: ").append(toIndentedString(gitRepositoryId)).append("\n"); + sb.append(" gitRepositoryUrl: ").append(toIndentedString(gitRepositoryUrl)).append("\n"); + sb.append(" hasSessionReplay: ").append(toIndentedString(hasSessionReplay)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" osName: ").append(toIndentedString(osName)).append("\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" sessionReplayUrl: ").append(toIndentedString(sessionReplayUrl)).append("\n"); + sb.append(" snapshotId: ").append(toIndentedString(snapshotId)).append("\n"); + sb.append(" spanId: ").append(toIndentedString(spanId)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).append("\n"); + sb.append(" variant: ").append(toIndentedString(variant)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" viewId: ").append(toIndentedString(viewId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleBias.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleBias.java new file mode 100644 index 00000000000..68e83c6582f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleBias.java @@ -0,0 +1,65 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Criterion used to pick a sample. latest picks the most recent error. + * git_metadata picks the most recent error with source code metadata, whose stack trace is + * parsed. trace picks the most recent error with an APM trace. session_replay + * picks the most recent error with a RUM session replay. exception_replay + * picks the most recent error with an Exception Replay snapshot. + */ +@JsonSerialize(using = IssueSampleBias.IssueSampleBiasSerializer.class) +public class IssueSampleBias extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("latest", "git_metadata", "trace", "session_replay", "exception_replay")); + + public static final IssueSampleBias LATEST = new IssueSampleBias("latest"); + public static final IssueSampleBias GIT_METADATA = new IssueSampleBias("git_metadata"); + public static final IssueSampleBias TRACE = new IssueSampleBias("trace"); + public static final IssueSampleBias SESSION_REPLAY = new IssueSampleBias("session_replay"); + public static final IssueSampleBias EXCEPTION_REPLAY = new IssueSampleBias("exception_replay"); + + IssueSampleBias(String value) { + super(value, allowedValues); + } + + public static class IssueSampleBiasSerializer extends StdSerializer { + public IssueSampleBiasSerializer(Class t) { + super(t); + } + + public IssueSampleBiasSerializer() { + this(null); + } + + @Override + public void serialize(IssueSampleBias value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IssueSampleBias fromValue(String value) { + return new IssueSampleBias(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleCodeSnippet.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleCodeSnippet.java new file mode 100644 index 00000000000..94e25905be0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleCodeSnippet.java @@ -0,0 +1,174 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Source code around a stack frame. Empty when the source code is unavailable. */ +@JsonPropertyOrder({ + IssueSampleCodeSnippet.JSON_PROPERTY_LINES, + IssueSampleCodeSnippet.JSON_PROPERTY_OFFSET +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueSampleCodeSnippet { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LINES = "lines"; + private List lines = null; + + public static final String JSON_PROPERTY_OFFSET = "offset"; + private Long offset; + + public IssueSampleCodeSnippet lines(List lines) { + this.lines = lines; + return this; + } + + public IssueSampleCodeSnippet addLinesItem(String linesItem) { + if (this.lines == null) { + this.lines = new ArrayList<>(); + } + this.lines.add(linesItem); + return this; + } + + /** + * Lines of source code. + * + * @return lines + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLines() { + return lines; + } + + public void setLines(List lines) { + this.lines = lines; + } + + public IssueSampleCodeSnippet offset(Long offset) { + this.offset = offset; + return this; + } + + /** + * Line number of the first line of the snippet, starting at 1. + * + * @return offset + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOffset() { + return offset; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueSampleCodeSnippet + */ + @JsonAnySetter + public IssueSampleCodeSnippet putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueSampleCodeSnippet object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueSampleCodeSnippet issueSampleCodeSnippet = (IssueSampleCodeSnippet) o; + return Objects.equals(this.lines, issueSampleCodeSnippet.lines) + && Objects.equals(this.offset, issueSampleCodeSnippet.offset) + && Objects.equals(this.additionalProperties, issueSampleCodeSnippet.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(lines, offset, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueSampleCodeSnippet {\n"); + sb.append(" lines: ").append(toIndentedString(lines)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleDataSource.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleDataSource.java new file mode 100644 index 00000000000..5ccdcad7376 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleDataSource.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Product that reported the error. NONE when the error has no known origin. */ +@JsonSerialize(using = IssueSampleDataSource.IssueSampleDataSourceSerializer.class) +public class IssueSampleDataSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("APM", "LOGS", "RUM", "LLMOBS", "SYNTHETICS", "NONE")); + + public static final IssueSampleDataSource APM = new IssueSampleDataSource("APM"); + public static final IssueSampleDataSource LOGS = new IssueSampleDataSource("LOGS"); + public static final IssueSampleDataSource RUM = new IssueSampleDataSource("RUM"); + public static final IssueSampleDataSource LLMOBS = new IssueSampleDataSource("LLMOBS"); + public static final IssueSampleDataSource SYNTHETICS = new IssueSampleDataSource("SYNTHETICS"); + public static final IssueSampleDataSource NONE = new IssueSampleDataSource("NONE"); + + IssueSampleDataSource(String value) { + super(value, allowedValues); + } + + public static class IssueSampleDataSourceSerializer extends StdSerializer { + public IssueSampleDataSourceSerializer(Class t) { + super(t); + } + + public IssueSampleDataSourceSerializer() { + this(null); + } + + @Override + public void serialize( + IssueSampleDataSource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IssueSampleDataSource fromValue(String value) { + return new IssueSampleDataSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleErrorStack.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleErrorStack.java new file mode 100644 index 00000000000..a1314536b4b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleErrorStack.java @@ -0,0 +1,188 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Parsed stack trace of the error. Only the sample picked by the git_metadata bias has + * frames. + */ +@JsonPropertyOrder({ + IssueSampleErrorStack.JSON_PROPERTY_FRAMES, + IssueSampleErrorStack.JSON_PROPERTY_LANGUAGE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueSampleErrorStack { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FRAMES = "frames"; + private List frames = null; + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private String language; + + public IssueSampleErrorStack frames(List frames) { + this.frames = frames; + if (frames != null) { + for (IssueSampleStackFrame item : frames) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public IssueSampleErrorStack addFramesItem(IssueSampleStackFrame framesItem) { + if (this.frames == null) { + this.frames = new ArrayList<>(); + } + this.frames.add(framesItem); + this.unparsed |= framesItem.unparsed; + return this; + } + + /** + * Stack frames, from the top of the stack. + * + * @return frames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FRAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFrames() { + return frames; + } + + public void setFrames(List frames) { + this.frames = frames; + if (frames != null) { + for (IssueSampleStackFrame item : frames) { + this.unparsed |= item.unparsed; + } + } + } + + public IssueSampleErrorStack language(String language) { + this.language = language; + return this; + } + + /** + * Language the stack trace was parsed as. + * + * @return language + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLanguage() { + return language; + } + + public void setLanguage(String language) { + this.language = language; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueSampleErrorStack + */ + @JsonAnySetter + public IssueSampleErrorStack putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueSampleErrorStack object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueSampleErrorStack issueSampleErrorStack = (IssueSampleErrorStack) o; + return Objects.equals(this.frames, issueSampleErrorStack.frames) + && Objects.equals(this.language, issueSampleErrorStack.language) + && Objects.equals(this.additionalProperties, issueSampleErrorStack.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(frames, language, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueSampleErrorStack {\n"); + sb.append(" frames: ").append(toIndentedString(frames)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleFrameLink.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleFrameLink.java new file mode 100644 index 00000000000..35c2d861465 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleFrameLink.java @@ -0,0 +1,179 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Source code location of a stack frame. */ +@JsonPropertyOrder({ + IssueSampleFrameLink.JSON_PROPERTY_CODE_LOCATION, + IssueSampleFrameLink.JSON_PROPERTY_FRAME_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueSampleFrameLink { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CODE_LOCATION = "code_location"; + private IssueSampleGitFileLocation codeLocation; + + public static final String JSON_PROPERTY_FRAME_ID = "frame_id"; + private Long frameId; + + public IssueSampleFrameLink() {} + + @JsonCreator + public IssueSampleFrameLink( + @JsonProperty(required = true, value = JSON_PROPERTY_CODE_LOCATION) + IssueSampleGitFileLocation codeLocation, + @JsonProperty(required = true, value = JSON_PROPERTY_FRAME_ID) Long frameId) { + this.codeLocation = codeLocation; + this.unparsed |= codeLocation.unparsed; + this.frameId = frameId; + } + + public IssueSampleFrameLink codeLocation(IssueSampleGitFileLocation codeLocation) { + this.codeLocation = codeLocation; + this.unparsed |= codeLocation.unparsed; + return this; + } + + /** + * Location of a stack frame in a repository file. Empty when the source code is unavailable. + * + * @return codeLocation + */ + @JsonProperty(JSON_PROPERTY_CODE_LOCATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IssueSampleGitFileLocation getCodeLocation() { + return codeLocation; + } + + public void setCodeLocation(IssueSampleGitFileLocation codeLocation) { + this.codeLocation = codeLocation; + if (codeLocation != null) { + this.unparsed |= codeLocation.unparsed; + } + } + + public IssueSampleFrameLink frameId(Long frameId) { + this.frameId = frameId; + return this; + } + + /** + * Index of the frame in the stack trace, starting at 0. + * + * @return frameId + */ + @JsonProperty(JSON_PROPERTY_FRAME_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFrameId() { + return frameId; + } + + public void setFrameId(Long frameId) { + this.frameId = frameId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueSampleFrameLink + */ + @JsonAnySetter + public IssueSampleFrameLink putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueSampleFrameLink object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueSampleFrameLink issueSampleFrameLink = (IssueSampleFrameLink) o; + return Objects.equals(this.codeLocation, issueSampleFrameLink.codeLocation) + && Objects.equals(this.frameId, issueSampleFrameLink.frameId) + && Objects.equals(this.additionalProperties, issueSampleFrameLink.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(codeLocation, frameId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueSampleFrameLink {\n"); + sb.append(" codeLocation: ").append(toIndentedString(codeLocation)).append("\n"); + sb.append(" frameId: ").append(toIndentedString(frameId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleGitFileLocation.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleGitFileLocation.java new file mode 100644 index 00000000000..116b864eb38 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleGitFileLocation.java @@ -0,0 +1,273 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Location of a stack frame in a repository file. Empty when the source code is unavailable. */ +@JsonPropertyOrder({ + IssueSampleGitFileLocation.JSON_PROPERTY_COLUMN, + IssueSampleGitFileLocation.JSON_PROPERTY_FILEPATH, + IssueSampleGitFileLocation.JSON_PROPERTY_FIRST_LINE, + IssueSampleGitFileLocation.JSON_PROPERTY_LAST_LINE, + IssueSampleGitFileLocation.JSON_PROPERTY_REF, + IssueSampleGitFileLocation.JSON_PROPERTY_REPO_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueSampleGitFileLocation { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COLUMN = "column"; + private Long column; + + public static final String JSON_PROPERTY_FILEPATH = "filepath"; + private String filepath; + + public static final String JSON_PROPERTY_FIRST_LINE = "first_line"; + private Long firstLine; + + public static final String JSON_PROPERTY_LAST_LINE = "last_line"; + private Long lastLine; + + public static final String JSON_PROPERTY_REF = "ref"; + private String ref; + + public static final String JSON_PROPERTY_REPO_ID = "repo_id"; + private String repoId; + + public IssueSampleGitFileLocation column(Long column) { + this.column = column; + return this; + } + + /** + * Column of the location, starting at 1. + * + * @return column + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getColumn() { + return column; + } + + public void setColumn(Long column) { + this.column = column; + } + + public IssueSampleGitFileLocation filepath(String filepath) { + this.filepath = filepath; + return this; + } + + /** + * Path of the file in the repository. + * + * @return filepath + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILEPATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilepath() { + return filepath; + } + + public void setFilepath(String filepath) { + this.filepath = filepath; + } + + public IssueSampleGitFileLocation firstLine(Long firstLine) { + this.firstLine = firstLine; + return this; + } + + /** + * First line of the location, starting at 1. + * + * @return firstLine + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_LINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFirstLine() { + return firstLine; + } + + public void setFirstLine(Long firstLine) { + this.firstLine = firstLine; + } + + public IssueSampleGitFileLocation lastLine(Long lastLine) { + this.lastLine = lastLine; + return this; + } + + /** + * Last line of the location, starting at 1. + * + * @return lastLine + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_LINE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastLine() { + return lastLine; + } + + public void setLastLine(Long lastLine) { + this.lastLine = lastLine; + } + + public IssueSampleGitFileLocation ref(String ref) { + this.ref = ref; + return this; + } + + /** + * Git reference of the file, usually a commit SHA. + * + * @return ref + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRef() { + return ref; + } + + public void setRef(String ref) { + this.ref = ref; + } + + public IssueSampleGitFileLocation repoId(String repoId) { + this.repoId = repoId; + return this; + } + + /** + * Repository identifier. + * + * @return repoId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPO_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRepoId() { + return repoId; + } + + public void setRepoId(String repoId) { + this.repoId = repoId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueSampleGitFileLocation + */ + @JsonAnySetter + public IssueSampleGitFileLocation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueSampleGitFileLocation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueSampleGitFileLocation issueSampleGitFileLocation = (IssueSampleGitFileLocation) o; + return Objects.equals(this.column, issueSampleGitFileLocation.column) + && Objects.equals(this.filepath, issueSampleGitFileLocation.filepath) + && Objects.equals(this.firstLine, issueSampleGitFileLocation.firstLine) + && Objects.equals(this.lastLine, issueSampleGitFileLocation.lastLine) + && Objects.equals(this.ref, issueSampleGitFileLocation.ref) + && Objects.equals(this.repoId, issueSampleGitFileLocation.repoId) + && Objects.equals( + this.additionalProperties, issueSampleGitFileLocation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(column, filepath, firstLine, lastLine, ref, repoId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueSampleGitFileLocation {\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" filepath: ").append(toIndentedString(filepath)).append("\n"); + sb.append(" firstLine: ").append(toIndentedString(firstLine)).append("\n"); + sb.append(" lastLine: ").append(toIndentedString(lastLine)).append("\n"); + sb.append(" ref: ").append(toIndentedString(ref)).append("\n"); + sb.append(" repoId: ").append(toIndentedString(repoId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleReference.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleReference.java new file mode 100644 index 00000000000..f495a176c4f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleReference.java @@ -0,0 +1,175 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A curated error sample of the issue. */ +@JsonPropertyOrder({IssueSampleReference.JSON_PROPERTY_ID, IssueSampleReference.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueSampleReference { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IssueSampleType type; + + public IssueSampleReference() {} + + @JsonCreator + public IssueSampleReference( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IssueSampleType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IssueSampleReference id(String id) { + this.id = id; + return this; + } + + /** + * Sample identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public IssueSampleReference type(IssueSampleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of the object. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IssueSampleType getType() { + return type; + } + + public void setType(IssueSampleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueSampleReference + */ + @JsonAnySetter + public IssueSampleReference putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueSampleReference object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueSampleReference issueSampleReference = (IssueSampleReference) o; + return Objects.equals(this.id, issueSampleReference.id) + && Objects.equals(this.type, issueSampleReference.type) + && Objects.equals(this.additionalProperties, issueSampleReference.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueSampleReference {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleStackFrame.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleStackFrame.java new file mode 100644 index 00000000000..d5473b389ef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleStackFrame.java @@ -0,0 +1,199 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A stack frame. */ +@JsonPropertyOrder({ + IssueSampleStackFrame.JSON_PROPERTY_CODE_SNIPPET, + IssueSampleStackFrame.JSON_PROPERTY_GIT_FILE_LOCATION, + IssueSampleStackFrame.JSON_PROPERTY_TEXT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueSampleStackFrame { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CODE_SNIPPET = "code_snippet"; + private IssueSampleCodeSnippet codeSnippet; + + public static final String JSON_PROPERTY_GIT_FILE_LOCATION = "git_file_location"; + private IssueSampleGitFileLocation gitFileLocation; + + public static final String JSON_PROPERTY_TEXT = "text"; + private String text; + + public IssueSampleStackFrame codeSnippet(IssueSampleCodeSnippet codeSnippet) { + this.codeSnippet = codeSnippet; + this.unparsed |= codeSnippet.unparsed; + return this; + } + + /** + * Source code around a stack frame. Empty when the source code is unavailable. + * + * @return codeSnippet + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE_SNIPPET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IssueSampleCodeSnippet getCodeSnippet() { + return codeSnippet; + } + + public void setCodeSnippet(IssueSampleCodeSnippet codeSnippet) { + this.codeSnippet = codeSnippet; + if (codeSnippet != null) { + this.unparsed |= codeSnippet.unparsed; + } + } + + public IssueSampleStackFrame gitFileLocation(IssueSampleGitFileLocation gitFileLocation) { + this.gitFileLocation = gitFileLocation; + this.unparsed |= gitFileLocation.unparsed; + return this; + } + + /** + * Location of a stack frame in a repository file. Empty when the source code is unavailable. + * + * @return gitFileLocation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GIT_FILE_LOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IssueSampleGitFileLocation getGitFileLocation() { + return gitFileLocation; + } + + public void setGitFileLocation(IssueSampleGitFileLocation gitFileLocation) { + this.gitFileLocation = gitFileLocation; + if (gitFileLocation != null) { + this.unparsed |= gitFileLocation.unparsed; + } + } + + public IssueSampleStackFrame text(String text) { + this.text = text; + return this; + } + + /** + * Text of the frame, as it appears in the stack trace. + * + * @return text + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueSampleStackFrame + */ + @JsonAnySetter + public IssueSampleStackFrame putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueSampleStackFrame object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueSampleStackFrame issueSampleStackFrame = (IssueSampleStackFrame) o; + return Objects.equals(this.codeSnippet, issueSampleStackFrame.codeSnippet) + && Objects.equals(this.gitFileLocation, issueSampleStackFrame.gitFileLocation) + && Objects.equals(this.text, issueSampleStackFrame.text) + && Objects.equals(this.additionalProperties, issueSampleStackFrame.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(codeSnippet, gitFileLocation, text, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueSampleStackFrame {\n"); + sb.append(" codeSnippet: ").append(toIndentedString(codeSnippet)).append("\n"); + sb.append(" gitFileLocation: ").append(toIndentedString(gitFileLocation)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSampleType.java b/src/main/java/com/datadog/api/client/v2/model/IssueSampleType.java new file mode 100644 index 00000000000..9ce7873b805 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSampleType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Type of the object. */ +@JsonSerialize(using = IssueSampleType.IssueSampleTypeSerializer.class) +public class IssueSampleType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("error_tracking_issue_sample")); + + public static final IssueSampleType ERROR_TRACKING_ISSUE_SAMPLE = + new IssueSampleType("error_tracking_issue_sample"); + + IssueSampleType(String value) { + super(value, allowedValues); + } + + public static class IssueSampleTypeSerializer extends StdSerializer { + public IssueSampleTypeSerializer(Class t) { + super(t); + } + + public IssueSampleTypeSerializer() { + this(null); + } + + @Override + public void serialize(IssueSampleType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IssueSampleType fromValue(String value) { + return new IssueSampleType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueSamplesRelationship.java b/src/main/java/com/datadog/api/client/v2/model/IssueSamplesRelationship.java new file mode 100644 index 00000000000..26b12f89d67 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueSamplesRelationship.java @@ -0,0 +1,162 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Relationship between the issue and its curated error samples. */ +@JsonPropertyOrder({IssueSamplesRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueSamplesRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public IssueSamplesRelationship() {} + + @JsonCreator + public IssueSamplesRelationship( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + for (IssueSampleReference item : data) { + this.unparsed |= item.unparsed; + } + } + + public IssueSamplesRelationship data(List data) { + this.data = data; + for (IssueSampleReference item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public IssueSamplesRelationship addDataItem(IssueSampleReference dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Array of curated error samples of the issue. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (IssueSampleReference item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueSamplesRelationship + */ + @JsonAnySetter + public IssueSamplesRelationship putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueSamplesRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueSamplesRelationship issueSamplesRelationship = (IssueSamplesRelationship) o; + return Objects.equals(this.data, issueSamplesRelationship.data) + && Objects.equals(this.additionalProperties, issueSamplesRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueSamplesRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/error_tracking.feature b/src/test/resources/com/datadog/api/client/v2/api/error_tracking.feature index 1c8756fde52..98633b09868 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/error_tracking.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/error_tracking.feature @@ -32,6 +32,18 @@ Feature: Error Tracking Then the response status is 200 OK And the response "data.id" is equal to "{{ issue.id }}" + @team:ddoghq/error-tracking + Scenario: Get the details of an error tracking issue with samples returns "OK" response + Given new "GetIssue" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter from "issue.id" + And request contains "include" parameter with value ["samples"] + And request contains "filter[samples.biases]" parameter with value ["latest"] + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{ issue.id }}" + And the response "data.relationships" has field "samples" + @generated @skip @team:ddoghq/error-tracking Scenario: Remove the assignee of an issue returns "Bad Request" response Given new "DeleteIssueAssignee" request diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index c4c5760e839..b7fb7acb1cb 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -5369,6 +5369,13 @@ "scenario": "Get the details of an error tracking issue returns \"OK\" response", "version": "v2" }, + { + "feature": "Error Tracking", + "feature_file": "../../com/datadog/api/client/v2/api/error_tracking.feature", + "file": "v2/error-tracking/get-the-details-of-an-error-tracking-issue-with-samples-returns-ok-response.json", + "scenario": "Get the details of an error tracking issue with samples returns \"OK\" response", + "version": "v2" + }, { "feature": "Error Tracking", "feature_file": "../../com/datadog/api/client/v2/api/error_tracking.feature", diff --git a/src/test/resources/generated-test/test-runner-data/v2/error-tracking/get-the-details-of-an-error-tracking-issue-with-samples-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/error-tracking/get-the-details-of-an-error-tracking-issue-with-samples-returns-ok-response.json new file mode 100644 index 00000000000..df4a9018b23 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/error-tracking/get-the-details-of-an-error-tracking-issue-with-samples-returns-ok-response.json @@ -0,0 +1,81 @@ +{ + "api": "ErrorTracking", + "expected_status": 200, + "feature": "Error Tracking", + "id": "v2/Error Tracking/Get the details of an error tracking issue with samples returns \"OK\" response", + "operation_id": "GetIssue", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "issue_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "issue.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": false, + "in": "query", + "name": "include", + "required": false, + "schema": { + "format": null, + "items": { + "format": null, + "ref": "GetIssueIncludeQueryParameterItem", + "type": "string" + }, + "ref": null, + "type": "array" + }, + "source": { + "type": "literal", + "value": [ + "samples" + ] + }, + "style": null + }, + { + "explode": false, + "in": "query", + "name": "filter[samples.biases]", + "required": false, + "schema": { + "format": null, + "items": { + "format": null, + "ref": "IssueSampleBias", + "type": "string" + }, + "ref": null, + "type": "array" + }, + "source": { + "type": "literal", + "value": [ + "latest" + ] + }, + "style": null + } + ], + "path": "/api/v2/error-tracking/issues/{issue_id}" + }, + "scenario": "Get the details of an error tracking issue with samples returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-server-data/v2/error-tracking.json b/src/test/resources/generated-test/test-server-data/v2/error-tracking.json index 454afa0475c..7980a47ece4 100644 --- a/src/test/resources/generated-test/test-server-data/v2/error-tracking.json +++ b/src/test/resources/generated-test/test-server-data/v2/error-tracking.json @@ -160,6 +160,79 @@ "scenario": "Get the details of an error tracking issue returns \"OK\" response", "version": "v2" }, + { + "feature": "Error Tracking", + "frozen_at": "2026-10-22T13:29:57.649Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "from": 1791379797000, + "query": "service:synthetics-browser", + "to": 1792675797000, + "track": "rum" + }, + "type": "search_request" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/error-tracking/issues/search", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":4439,\"impacted_users\":4307,\"total_count\":8644},\"relationships\":{\"issue\":{\"data\":{\"id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\",\"type\":\"issue\"}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/error-tracking/issues/d3ab59c6-84ee-11f0-87bb-da7ad0900002", + "query": [ + [ + "filter[samples.biases]", + "latest" + ], + [ + "include", + "samples" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\",\"type\":\"issue\",\"attributes\":{\"error_message\":\"Expected unhandled error\",\"error_type\":\"Error\",\"file_path\":\"\",\"first_seen\":1756482172021,\"first_seen_version\":\"1.2.4\",\"function_name\":\"\",\"is_crash\":false,\"languages\":[\"JAVASCRIPT\"],\"last_seen\":1792675673414,\"last_seen_version\":\"1.2.4\",\"platform\":\"BROWSER\",\"service\":\"synthetics-browser\",\"state\":\"RESOLVED\"},\"relationships\":{\"case\":{\"data\":{\"id\":\"7afc10c8-4096-4af1-9ccf-ec0df3a2f63b\",\"type\":\"case\"}},\"samples\":{\"data\":[{\"id\":\"AwAAAaFjy_VGe8BwpwAAABhBYUZqeV9ldEFBRENrVFVtSDhUeXh5LWgAAAAkZjFhMTYzY2ItZmE4Ni00NTJkLWFhYTktY2NiNTdiNDFlMWMzAAAAAA\",\"type\":\"error_tracking_issue_sample\"}]}}},\"included\":[{\"id\":\"AwAAAaFjy_VGe8BwpwAAABhBYUZqeV9ldEFBRENrVFVtSDhUeXh5LWgAAAAkZjFhMTYzY2ItZmE4Ni00NTJkLWFhYTktY2NiNTdiNDFlMWMzAAAAAA\",\"type\":\"error_tracking_issue_sample\",\"attributes\":{\"application_id\":\"ce9843b0-7a45-453c-a831-55dd15f85141\",\"biases\":[\"latest\"],\"data_source\":\"RUM\",\"error_source_type\":\"browser\",\"error_stack\":{},\"event\":{\"application\":{\"id\":\"ce9843b0-7a45-453c-a831-55dd15f85141\"},\"browser\":{\"name\":\"Chrome\"},\"client_time\":1792675673113,\"custom\":{\"action\":{\"id\":[\"ad28f5eb-18c2-4b6b-af6e-7105fa397416\",\"d635ecc8-754f-4a3e-8a68-9e63e9718a23\"]},\"application\":{\"id\":\"ce9843b0-7a45-453c-a831-55dd15f85141\",\"name\":\"Synthetic Tests Default Application\",\"short_name\":\"synthetic_tests_default_applicat\"},\"browser\":{\"name\":\"Chrome\",\"version\":\"153.0.8010.52\",\"version_major\":\"153\"},\"connectivity\":{\"effective_type\":\"4g\",\"status\":\"connected\"},\"context\":{\"test_playground\":true},\"dd-request-id\":\"be2e1f89-b150-43c9-90b6-9d359a86c46f\",\"device\":{\"name\":\"Other\",\"type\":\"Desktop\"},\"display\":{\"viewport\":{\"height\":1100.0,\"width\":1440.0}},\"error\":{\"fingerprint\":\"v12.5C419EBEBB729FD7865074A8EECBA01A\",\"handling\":\"unhandled\",\"id\":\"a047c907-eae5-432e-a51d-897f6adb5413\",\"message\":\"Expected unhandled error\",\"source\":\"source\",\"source_type\":\"browser\",\"stack\":\"Error: Expected unhandled error\\n at HTMLButtonElement. @ https://datadoghq.dev/browser-sdk-test-playground/index.js:107:11\",\"type\":\"Error\"},\"execution_context\":{\"id\":\"5c0b86d1-f50b-4651-bbc9-770d12a1b544\"},\"geo\":{\"as\":{\"domain\":\"amazon.com\",\"name\":\"Amazon.com, Inc.\",\"type\":\"hosting\"},\"city\":\"Paris\",\"continent\":\"Europe\",\"continent_code\":\"EU\",\"country\":\"France\",\"country_iso_code\":\"FR\",\"country_subdivision\":\"\\u00cele-de-France\",\"country_subdivision_iso_code\":\"FR-IDF\",\"latitude\":48.85341,\"location\":[2.3488,48.85341],\"longitude\":2.3488},\"issue\":{\"age\":36193502350.0,\"first_seen\":1756482172021.0,\"first_seen_version\":\"1.2.4\",\"id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\"},\"os\":{\"name\":\"Linux\"},\"profiling\":{\"has_profile\":false},\"service\":\"synthetics-browser\",\"session\":{\"has_replay\":true,\"id\":\"2a1174ab-a9b7-4b82-babc-f9040c7a79a6\",\"ip\":\"0.0.0.0\",\"is_replay_available\":true,\"matching_retention_filter\":{\"id\":\"default_synthetics\",\"name\":\"Synthetics Sessions\"},\"retention_reason\":\"rum_retention_filter\",\"type\":\"synthetics\",\"useragent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.8010.52 Safari/537.36 DatadogSynthetics\"},\"synthetics\":{\"creator\":\"Camille Jouan\",\"injected\":false,\"result_id\":\"4682046062890721601\",\"run_type\":\"scheduled\",\"tag\":{\"env\":[\"prod\"],\"team\":[\"error-tracking\"]},\"tags\":{\"env\":[\"prod\"],\"team\":[\"error-tracking\"]},\"test_id\":\"zck-vrb-2um\"},\"tab\":{\"id\":\"5c0b86d1-f50b-4651-bbc9-770d12a1b544\"},\"type\":\"error\",\"usr\":{\"anonymous_id\":\"28520368-547f-47d4-852c-eb68b216109a\",\"email\":\"email-1ul6hq1909u@example.com\",\"id\":\"1ul6hq1909u\",\"name\":\"name-1ul6hq1909u\"},\"view\":{\"id\":\"4c7fc22e-6946-4f7f-acfe-e6734dc423a5\",\"in_foreground\":true,\"name\":\"/browser-sdk-test-playground\",\"referrer\":\"\",\"url\":\"https://datadoghq.dev/browser-sdk-test-playground/?site=datadoghq.com&application_id=ce9843b0-7a45-453c-a831-55dd15f85141&client_token=pub00000000000000000000000000000000&service=synthetics-browser&env=prod&version=1.2.4\",\"url_host\":\"datadoghq.dev\",\"url_path\":\"/browser-sdk-test-playground\",\"url_path_group\":\"/browser-sdk-test-playground\",\"url_query\":{\"application_id\":\"ce9843b0-7a45-453c-a831-55dd15f85141\",\"client_token\":\"pub00000000000000000000000000000000\",\"env\":\"prod\",\"service\":\"synthetics-browser\",\"site\":\"datadoghq.com\",\"version\":\"1.2.4\"},\"url_scheme\":\"https\"}},\"device\":{\"type\":\"Desktop\"},\"discovery_timestamp\":1792675674029,\"env\":\"prod\",\"error\":{\"handling\":\"unhandled\",\"message\":\"Expected unhandled error\",\"stack\":\"Error: Expected unhandled error\\n at HTMLButtonElement. @ https://datadoghq.dev/browser-sdk-test-playground/index.js:107:11\",\"type\":\"Error\"},\"hashes\":{\"session\":{\"id\":2.7534693895717233e+18},\"usr\":{\"id\":-9.041965753311999e+18},\"view\":{\"id\":-5.780493576176677e+18}},\"host\":null,\"id\":\"AaFjy_etAADCkTUmH8Tyxy-h\",\"index_name\":\"errors\",\"ingest_size_in_bytes\":1812.0,\"intake_time\":1792675674029,\"issue\":{\"age\":36193502350.0,\"first_seen\":1756482172021.0,\"id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\",\"state\":\"RESOLVED\",\"type\":\"error_tracking\"},\"random_draw\":0.46394539784338096,\"sample_score\":0.49395908831389723,\"service\":\"synthetics-browser\",\"session\":{\"id\":\"2a1174ab-a9b7-4b82-babc-f9040c7a79a6\"},\"source\":\"browser\",\"source_fragment_id\":\"f1a163cb-fa86-452d-aaa9-ccb57b41e1c3\",\"tag\":{\"env\":\"prod\",\"first_version\":\"1.2.4\",\"sdk_version\":\"6.33.0\",\"service\":\"synthetics-browser\",\"source\":\"browser\",\"version\":\"1.2.4\"},\"tags\":[\"env:prod\",\"service:synthetics-browser\",\"sdk_version:6.33.0\",\"datadog.submission_auth:client_token\",\"version:1.2.4\",\"first_version:1.2.4\",\"source:browser\"],\"tiebreaker\":2076209319,\"timestamp\":\"2026-10-22T13:27:53.414Z\",\"usr\":{\"id\":\"1ul6hq1909u\",\"name\":\"name-1ul6hq1909u\"},\"version\":\"1.2.4\",\"view\":{\"url_path\":\"/browser-sdk-test-playground\"}},\"has_session_replay\":true,\"os_name\":\"Linux\",\"service\":\"synthetics-browser\",\"session_id\":\"2a1174ab-a9b7-4b82-babc-f9040c7a79a6\",\"timestamp\":\"2026-10-22T13:27:53.414Z\",\"version\":\"1.2.4\",\"view_id\":\"4c7fc22e-6946-4f7f-acfe-e6734dc423a5\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Get the details of an error tracking issue with samples returns \"OK\" response", + "version": "v2" + }, { "feature": "Error Tracking", "frozen_at": "2025-10-17T14:43:40.022Z",