(spanParentAsLink: boolean)
| 406 | } |
| 407 | |
| 408 | #getHeaders(spanParentAsLink: boolean) { |
| 409 | const headers: Record<string, string> = { |
| 410 | "Content-Type": "application/json", |
| 411 | Authorization: `Bearer ${this.accessToken}`, |
| 412 | "trigger-version": version, |
| 413 | }; |
| 414 | |
| 415 | // Only inject the context if we are inside a task |
| 416 | if (taskContext.isInsideTask) { |
| 417 | headers["x-trigger-worker"] = "true"; |
| 418 | propagation.inject(context.active(), headers); |
| 419 | |
| 420 | if (spanParentAsLink) { |
| 421 | headers["x-trigger-span-parent-as-link"] = "1"; |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | return headers; |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | function createSearchQueryForListRuns(query?: ListRunsQueryParams): URLSearchParams { |
no outgoing calls
no test coverage detected