Skip to content

Commit

Permalink
Get typechecking working and building otlp-importer
Browse files Browse the repository at this point in the history
  • Loading branch information
ericallam committed Feb 12, 2024
1 parent 880a238 commit 6aa1798
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 509 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
node-version: 18
cache: "pnpm"

- name: Install Protoc
uses: arduino/setup-protoc@v3

- name: 📥 Download deps
run: pnpm install --frozen-lockfile

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- "**.md"
- ".github/CODEOWNERS"
- ".github/ISSUE_TEMPLATE/**"


jobs:
release:
Expand Down Expand Up @@ -39,6 +38,9 @@ jobs:
node-version: 18
cache: "pnpm"

- name: Install Protoc
uses: arduino/setup-protoc@v3

- name: 📥 Download deps
run: pnpm install --frozen-lockfile

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
node-version: 18
cache: "pnpm"

- name: Install Protoc
uses: arduino/setup-protoc@v3

- name: 📥 Download deps
run: pnpm install --frozen-lockfile

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
node-version: 18
cache: "pnpm"

- name: Install Protoc
uses: arduino/setup-protoc@v3

- name: ⎔ Setup Deno
uses: denoland/setup-deno@v1
with:
Expand Down
14 changes: 11 additions & 3 deletions apps/webapp/app/v3/otlpExporter.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ class OTLPExporter {
(attribute) => attribute.key === SemanticInternalAttributes.TRIGGER
);

return isBoolValue(triggerAttribute?.value) ? triggerAttribute.value.value.boolValue : false;
if (!triggerAttribute) return false;

return isBoolValue(triggerAttribute.value) ? triggerAttribute.value.value.boolValue : false;
});
}

Expand All @@ -73,7 +75,9 @@ class OTLPExporter {
(attribute) => attribute.key === SemanticInternalAttributes.TRIGGER
);

return isBoolValue(attribute?.value) ? attribute.value.value.boolValue : false;
if (!attribute) return false;

return isBoolValue(attribute.value) ? attribute.value.value.boolValue : false;
});
}
}
Expand Down Expand Up @@ -416,6 +420,8 @@ function extractStringAttribute(
): string | undefined {
const attribute = attributes.find((attribute) => attribute.key === name);

if (!attribute) return fallback;

return isStringValue(attribute?.value) ? attribute.value.value.stringValue : fallback;
}

Expand All @@ -426,7 +432,9 @@ function isPartialSpan(span: Span): boolean {
(attribute) => attribute.key === SemanticInternalAttributes.SPAN_PARTIAL
);

return isBoolValue(attribute?.value) ? attribute.value.value.boolValue : false;
if (!attribute) return false;

return isBoolValue(attribute.value) ? attribute.value.value.boolValue : false;
}

function isBoolValue(
Expand Down
2 changes: 1 addition & 1 deletion config-packages/tsup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "./src/index.ts",
"types": "./src/index.ts",
"dependencies": {
"esbuild": "^0.19.2",
"esbuild": "^0.19.11",
"tsup": "^8.0.1"
},
"devDependencies": {
Expand Down
255 changes: 0 additions & 255 deletions packages/otlp-importer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,255 +0,0 @@
# internal-platform

## 2.3.11

## 2.3.10

## 2.3.9

### Patch Changes

- 740b7b23: feat: Add $not to eventFilters

## 2.3.8

## 2.3.7

## 2.3.6

## 2.3.5

## 2.3.4

## 2.3.3

## 2.3.2

## 2.3.1

### Patch Changes

- f3efcc0c: Moved Logger to core-backend, no longer importing node:buffer in core/react

## 2.3.0

### Minor Changes

- 17f6f29d: Support for Deno, Bun and Cloudflare workers, as well as conditionally exporting ESM versions of the package instead of just commonjs.

Cloudflare worker support requires the node compat flag turned on (https://developers.cloudflare.com/workers/runtime-apis/nodejs/)

## 2.2.11

## 2.2.10

## 2.2.9

### Patch Changes

- 6ebd435e: Feature: Run execution concurrency limits

## 2.2.8

### Patch Changes

- 067e19fe: - Simplify `Webhook Triggers` and use the new HTTP Endpoints
- Add a `Key-Value Store` for use in and outside of Jobs
- Add a `@trigger.dev/shopify` package

## 2.2.7

### Patch Changes

- 756024da: Add support for listening to run notifications

## 2.2.6

### Patch Changes

- cb1825bf: OpenAI support for 4.16.0
- cb1825bf: Add support for background polling and use that in OpenAI integration to power assistants
- d0217344: Add `io.sendEvents()`

## 2.2.5

### Patch Changes

- 620b8383: Added invokeTrigger(), which allows jobs to be manually invoked
- 578d2e54: Fixed Buffer reference error

## 2.2.4

### Patch Changes

- c1710ae7: Creates a new package @trigger.dev/core-backend that includes code shared between @trigger.dev/sdk and the Trigger.dev server

## 2.2.3

### Patch Changes

- 6e1b8a11: implement functionality to cancel job runs triggered by a given eventId.

## 2.2.2

## 2.2.1

### Patch Changes

- 044d38e3: Auto-yield run execution to help prevent duplicate task executions
- abc9737a: Updated icon documentation in runTasks

## 2.2.0

### Minor Changes

- 975c5f1d: Drop support for Node v16, require Node >= 18. This allows us to use native fetch in our SDK which paves the way for multi-platform support.

### Patch Changes

- 50e3d9e4: When indexing user's jobs errors are now stored and displayed
- 59a94c71: Allow task property values to be blank, but strip them out before persisting them

## 2.1.9

### Patch Changes

- 9a187f9e: upgrade zod to 3.22.3

## 2.1.8

### Patch Changes

- 6a992a19: First release of `@trigger.dev/replicate` integration with remote callback support.
- ab9e4a98: Send client version back to the server via headers
- ab9e4a98: Better performance when resuming a run, especially one with a large amount of tasks

## 2.1.7

## 2.1.6

## 2.1.5

## 2.1.4

### Patch Changes

- ad14983e: You can create statuses in your Jobs that can then be read using React hooks
- 50137a6f: Decouple zod
- c0dfa804: Add support for Bring Your Own Auth

## 2.1.3

## 2.1.2

## 2.1.1

## 2.1.0

### Minor Changes

- Integrations are now simpler and support authentication during webhook registration ([`878da3c0`](https://github.com/triggerdotdev/trigger.dev/commit/878da3c01f0a4dfaf33a1f8943a7ad4eed8b8877))

## 2.1.0-beta.1

## 2.1.0-beta.0

### Minor Changes

- Integrations are now simpler and support authentication during webhook registration ([`878da3c0`](https://github.com/triggerdotdev/trigger.dev/commit/878da3c01f0a4dfaf33a1f8943a7ad4eed8b8877))

## 2.0.14

## 2.0.13

## 2.0.12

## 2.0.11

### Patch Changes

- 302bd02f: Issue #377: only expose the external eventId in the API
- b5db9f5e: Adding MIT license

## 2.0.10

### Patch Changes

- b1b9321a: Deprecated queue options in the job and removed startPosition

## 2.0.9

### Patch Changes

- 33184a81: Add subtasks to the schema/types when getting an individual run

## 2.0.8

## 2.0.7

### Patch Changes

- fa3a22eb: Added an $isNull EventFilter condition matcher

## 2.0.6

### Patch Changes

- 59075f5f: EventFilter now supports more complex condition filters #271

## 2.0.5

## 2.0.4

### Patch Changes

- 96384991: Adding the validate endpoint action to be able to add an endpoint first in the dashboard

## 2.0.3

## 2.0.2

### Patch Changes

- 0a790de2: core version changed to 1.0.0. Dependencies for core set to ^1.0.0
- ee99191f: Sync all package versions

## 0.0.5

### Patch Changes

- aa9fe7d4: core made public. The react and sdk packages now have it as a dependency.

## 0.0.4

### Patch Changes

- 92233f2e: @trigger.dev/core is now a separate package
- 92233f2e: Packages move to @latest
- e26923eb: backgroundFetch jsdocs

## 0.0.2-next.1

### Patch Changes

- e26923eb: backgroundFetch jsdocs

## 0.0.2-next.0

### Patch Changes

- a11ddf65: Added JSDocs related to logging

## 0.0.3

### Patch Changes

- 6673798: Bundling common-schemas into @trigger.dev/sdk
- Updated dependencies [6673798]
- @trigger.dev/core@0.1.1

## 0.0.2

### Patch Changes

- Updated dependencies [92dd011]
- @trigger.dev/core@0.1.0
Loading

0 comments on commit 6aa1798

Please sign in to comment.