Skip to content

Commit fb7bf9d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c560bf8 of spec repo
1 parent 32a2d89 commit fb7bf9d

25 files changed

Lines changed: 1413 additions & 4 deletions

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 310 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,9 @@ components:
649649
schema:
650650
type: string
651651
GetIssueIncludeQueryParameter:
652-
description: Comma-separated list of relationship objects that should be included in the response. Possible values are `assignee`, `case`, and `team_owners`.
652+
description: |-
653+
Comma-separated list of relationship objects that should be included in the response.
654+
Possible values are `assignee`, `case`, `team_owners`, and `samples`.
653655
explode: false
654656
in: query
655657
name: include
@@ -658,6 +660,18 @@ components:
658660
items:
659661
$ref: "#/components/schemas/GetIssueIncludeQueryParameterItem"
660662
type: array
663+
GetIssueSamplesBiasesFilterParameter:
664+
description: |-
665+
Comma-separated list of biases used to pick the samples returned with `include=samples`.
666+
Requires `include=samples`. Defaults to all biases.
667+
explode: false
668+
in: query
669+
name: filter[samples.biases]
670+
required: false
671+
schema:
672+
items:
673+
$ref: "#/components/schemas/IssueSampleBias"
674+
type: array
661675
GoogleChatHandleIdPathParameter:
662676
description: Your organization handle ID.
663677
in: path
@@ -55200,12 +55214,14 @@ components:
5520055214
- assignee
5520155215
- case
5520255216
- team_owners
55217+
- samples
5520355218
example: "case"
5520455219
type: string
5520555220
x-enum-varnames:
5520655221
- ASSIGNEE
5520755222
- CASE
5520855223
- TEAM_OWNERS
55224+
- SAMPLES
5520955225
GetMappingResponse:
5521055226
description: Response containing the entity attribute mapping configuration including all available attributes and their properties.
5521155227
example:
@@ -65789,6 +65805,7 @@ components:
6578965805
- $ref: "#/components/schemas/IssueCase"
6579065806
- $ref: "#/components/schemas/IssueUser"
6579165807
- $ref: "#/components/schemas/IssueTeam"
65808+
- $ref: "#/components/schemas/IssueSample"
6579265809
IssueLanguage:
6579365810
description: Programming language associated with the issue.
6579465811
enum:
@@ -65912,6 +65929,8 @@ components:
6591265929
$ref: "#/components/schemas/IssueAssigneeRelationship"
6591365930
case:
6591465931
$ref: "#/components/schemas/IssueCaseRelationship"
65932+
samples:
65933+
$ref: "#/components/schemas/IssueSamplesRelationship"
6591565934
team_owners:
6591665935
$ref: "#/components/schemas/IssueTeamOwnersRelationship"
6591765936
type: object
@@ -65926,6 +65945,295 @@ components:
6592665945
$ref: "#/components/schemas/IssueIncluded"
6592765946
type: array
6592865947
type: object
65948+
IssueSample:
65949+
description: An error event of the issue, picked because it satisfies one or more sample biases.
65950+
properties:
65951+
attributes:
65952+
$ref: "#/components/schemas/IssueSampleAttributes"
65953+
id:
65954+
description: Sample identifier.
65955+
example: "AwAAAZPHnBVMDCSmFgAAABhBWlBIbkJWTUFBRDVnUkhKTmY0WmhRQUEAAAAkMDE5M2M3OWMtMTg1OC00ZTE1LWFhMmItOTQ1N2ZkOGVlMzQyAAAAAA"
65956+
type: string
65957+
type:
65958+
$ref: "#/components/schemas/IssueSampleType"
65959+
required:
65960+
- id
65961+
- type
65962+
- attributes
65963+
type: object
65964+
IssueSampleAttributes:
65965+
description: Object containing the information of a sample.
65966+
properties:
65967+
application_id:
65968+
description: RUM application identifier of the error.
65969+
example: "40d8ca4b-2ac0-481f-b16e-f110699ecff6"
65970+
type: string
65971+
biases:
65972+
description: Biases the sample satisfies. A single error can satisfy several biases.
65973+
example: ["latest", "git_metadata"]
65974+
items:
65975+
$ref: "#/components/schemas/IssueSampleBias"
65976+
type: array
65977+
build_id:
65978+
description: Build identifier of the mobile application.
65979+
example: "a1b2c3"
65980+
type: string
65981+
bundle_version:
65982+
description: Bundle version of the mobile application.
65983+
example: "42"
65984+
type: string
65985+
data_source:
65986+
$ref: "#/components/schemas/IssueSampleDataSource"
65987+
debug_id:
65988+
description: Debug identifier used to resolve the stack trace of the error to source code.
65989+
example: "9d8c7b6a-5f4e-3d2c-1b0a-9f8e7d6c5b4a"
65990+
type: string
65991+
debug_info_captured:
65992+
description: Whether an Exception Replay snapshot was captured for the error.
65993+
example: false
65994+
type: boolean
65995+
error_source_type:
65996+
description: |-
65997+
Source type set by the SDK or tracer that reported the error, such as `browser` for RUM browser errors
65998+
or `Crashtracking` for backend crash reports. Usually not set for APM and logs errors.
65999+
example: "browser"
66000+
type: string
66001+
error_stack:
66002+
$ref: "#/components/schemas/IssueSampleErrorStack"
66003+
event:
66004+
$ref: "#/components/schemas/IssueSampleEvent"
66005+
git_commit_sha:
66006+
description: Git commit SHA of the service version.
66007+
example: "b6199f80b6199f80b6199f80b6199f80b6199f80"
66008+
type: string
66009+
git_repository_id:
66010+
description: Git repository identifier of the service.
66011+
example: "github.com/company/email-api-py"
66012+
type: string
66013+
git_repository_url:
66014+
description: Git repository URL of the service.
66015+
example: "https://github.com/company/email-api-py"
66016+
type: string
66017+
has_session_replay:
66018+
description: Whether a RUM session replay is available for the error.
66019+
example: true
66020+
type: boolean
66021+
language:
66022+
description: Programming language of the service.
66023+
example: "python"
66024+
type: string
66025+
links:
66026+
description: Source code locations of the stack frames that resolve to a repository file.
66027+
items:
66028+
$ref: "#/components/schemas/IssueSampleFrameLink"
66029+
type: array
66030+
os_name:
66031+
description: Operating system of the device that reported the error.
66032+
example: "iOS"
66033+
type: string
66034+
service:
66035+
description: Service name.
66036+
example: "email-api-py"
66037+
type: string
66038+
session_id:
66039+
description: RUM session identifier of the error.
66040+
example: "72d11fa0-7f59-408a-95ff-9af7d4f8d7db"
66041+
type: string
66042+
session_replay_url:
66043+
description: URL of the RUM session replay of the error.
66044+
example: "https://app.datadoghq.com/rum/replay/sessions/72d11fa0-7f59-408a-95ff-9af7d4f8d7db"
66045+
type: string
66046+
snapshot_id:
66047+
description: Identifier of the Exception Replay snapshot of the error.
66048+
example: "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
66049+
type: string
66050+
span_id:
66051+
description: APM span identifier of the error.
66052+
example: "3906394766563720946"
66053+
type: string
66054+
timestamp:
66055+
description: Timestamp of the error.
66056+
example: "2024-01-01T10:00:00Z"
66057+
format: date-time
66058+
type: string
66059+
trace_id:
66060+
description: APM trace identifier of the error.
66061+
example: "6730183925457637287"
66062+
type: string
66063+
variant:
66064+
description: Build variant of the mobile application.
66065+
example: "release"
66066+
type: string
66067+
version:
66068+
description: Version of the service.
66069+
example: "1.2.3"
66070+
type: string
66071+
view_id:
66072+
description: RUM view identifier of the error.
66073+
example: "c5c02423-c03a-400a-993f-731bebf1732b"
66074+
type: string
66075+
required:
66076+
- timestamp
66077+
- error_stack
66078+
type: object
66079+
IssueSampleBias:
66080+
description: |-
66081+
Criterion used to pick a sample. `latest` picks the most recent error. `git_metadata` picks the most
66082+
recent error with source code metadata, whose stack trace is parsed. `trace` picks the most recent error
66083+
with an APM trace. `session_replay` picks the most recent error with a RUM session replay.
66084+
`exception_replay` picks the most recent error with an Exception Replay snapshot.
66085+
enum:
66086+
- latest
66087+
- git_metadata
66088+
- trace
66089+
- session_replay
66090+
- exception_replay
66091+
example: "latest"
66092+
type: string
66093+
x-enum-varnames:
66094+
- LATEST
66095+
- GIT_METADATA
66096+
- TRACE
66097+
- SESSION_REPLAY
66098+
- EXCEPTION_REPLAY
66099+
IssueSampleCodeSnippet:
66100+
description: Source code around a stack frame. Empty when the source code is unavailable.
66101+
properties:
66102+
lines:
66103+
description: Lines of source code.
66104+
example: ["def filter_forbidden_tags(tags):", " return len(tags)"]
66105+
items:
66106+
type: string
66107+
type: array
66108+
offset:
66109+
description: Line number of the first line of the snippet, starting at 1.
66110+
example: 37
66111+
format: int64
66112+
type: integer
66113+
type: object
66114+
IssueSampleDataSource:
66115+
description: Product that reported the error. The value is `NONE` when the error has no known origin.
66116+
enum:
66117+
- APM
66118+
- LOGS
66119+
- RUM
66120+
- LLMOBS
66121+
- SYNTHETICS
66122+
- NONE
66123+
example: "APM"
66124+
type: string
66125+
x-enum-varnames:
66126+
- APM
66127+
- LOGS
66128+
- RUM
66129+
- LLMOBS
66130+
- SYNTHETICS
66131+
- NONE
66132+
IssueSampleErrorStack:
66133+
description: Parsed stack trace of the error. Only the sample picked by the `git_metadata` bias has frames.
66134+
properties:
66135+
frames:
66136+
description: Stack frames, from the top of the stack.
66137+
items:
66138+
$ref: "#/components/schemas/IssueSampleStackFrame"
66139+
type: array
66140+
language:
66141+
description: Programming language used to parse the stack trace.
66142+
example: "go"
66143+
type: string
66144+
type: object
66145+
IssueSampleEvent:
66146+
additionalProperties: {}
66147+
description: Raw error event, as stored by its data source. Its fields differ between APM, logs, and RUM.
66148+
type: object
66149+
IssueSampleFrameLink:
66150+
description: Source code location of a stack frame.
66151+
properties:
66152+
code_location:
66153+
$ref: "#/components/schemas/IssueSampleGitFileLocation"
66154+
frame_id:
66155+
description: Index of the frame in the stack trace, starting at 0.
66156+
example: 1
66157+
format: int64
66158+
type: integer
66159+
required:
66160+
- frame_id
66161+
- code_location
66162+
type: object
66163+
IssueSampleGitFileLocation:
66164+
description: Location of a stack frame in a repository file. Empty when the source code is unavailable.
66165+
properties:
66166+
column:
66167+
description: Column of the location, starting at 1.
66168+
example: 13
66169+
format: int64
66170+
type: integer
66171+
filepath:
66172+
description: Path of the file in the repository.
66173+
example: "conduit/apps/core/utils.py"
66174+
type: string
66175+
first_line:
66176+
description: First line of the location, starting at 1.
66177+
example: 42
66178+
format: int64
66179+
type: integer
66180+
last_line:
66181+
description: Last line of the location, starting at 1.
66182+
example: 42
66183+
format: int64
66184+
type: integer
66185+
ref:
66186+
description: Git reference of the file, usually a commit SHA.
66187+
example: "b6199f80b6199f80b6199f80b6199f80b6199f80"
66188+
type: string
66189+
repo_id:
66190+
description: Repository identifier.
66191+
example: "github.com/company/email-api-py"
66192+
type: string
66193+
type: object
66194+
IssueSampleReference:
66195+
description: A curated error sample of the issue.
66196+
properties:
66197+
id:
66198+
description: Sample identifier.
66199+
example: "AwAAAZPHnBVMDCSmFgAAABhBWlBIbkJWTUFBRDVnUkhKTmY0WmhRQUEAAAAkMDE5M2M3OWMtMTg1OC00ZTE1LWFhMmItOTQ1N2ZkOGVlMzQyAAAAAA"
66200+
type: string
66201+
type:
66202+
$ref: "#/components/schemas/IssueSampleType"
66203+
required:
66204+
- id
66205+
- type
66206+
type: object
66207+
IssueSampleStackFrame:
66208+
description: A stack frame.
66209+
properties:
66210+
code_snippet:
66211+
$ref: "#/components/schemas/IssueSampleCodeSnippet"
66212+
git_file_location:
66213+
$ref: "#/components/schemas/IssueSampleGitFileLocation"
66214+
text:
66215+
description: Text of the frame, as it appears in the stack trace.
66216+
example: "main.handler(0xc000123456)\n\t/go/src/app/main.go:42 +0x1d"
66217+
type: string
66218+
type: object
66219+
IssueSampleType:
66220+
description: Type of the object.
66221+
enum: ["error_tracking_issue_sample"]
66222+
example: "error_tracking_issue_sample"
66223+
type: string
66224+
x-enum-varnames:
66225+
- ERROR_TRACKING_ISSUE_SAMPLE
66226+
IssueSamplesRelationship:
66227+
description: Relationship between the issue and its curated error samples.
66228+
properties:
66229+
data:
66230+
description: Array of curated error samples of the issue.
66231+
items:
66232+
$ref: "#/components/schemas/IssueSampleReference"
66233+
type: array
66234+
required:
66235+
- data
66236+
type: object
6592966237
IssueState:
6593066238
description: State of the issue
6593166239
enum:
@@ -167425,6 +167733,7 @@ paths:
167425167733
parameters:
167426167734
- $ref: "#/components/parameters/IssueIDPathParameter"
167427167735
- $ref: "#/components/parameters/GetIssueIncludeQueryParameter"
167736+
- $ref: "#/components/parameters/GetIssueSamplesBiasesFilterParameter"
167428167737
responses:
167429167738
"200":
167430167739
content:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""
2+
Get the details of an error tracking issue with samples returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.error_tracking_api import ErrorTrackingApi
8+
from datadog_api_client.v2.model.get_issue_include_query_parameter_item import GetIssueIncludeQueryParameterItem
9+
from datadog_api_client.v2.model.issue_sample_bias import IssueSampleBias
10+
11+
# there is a valid "issue" in the system
12+
ISSUE_ID = environ["ISSUE_ID"]
13+
14+
configuration = Configuration()
15+
configuration.access_token = environ["DD_BEARER_TOKEN"]
16+
with ApiClient(configuration) as api_client:
17+
api_instance = ErrorTrackingApi(api_client)
18+
response = api_instance.get_issue(
19+
issue_id=ISSUE_ID,
20+
include=[
21+
GetIssueIncludeQueryParameterItem.SAMPLES,
22+
],
23+
filter_samples_biases=[
24+
IssueSampleBias.LATEST,
25+
],
26+
)
27+
28+
print(response)

0 commit comments

Comments
 (0)