-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding JS bindings to @axiomhq/js for /v2/monitors endpoint support #263
Comments
hi @ThetaBird , that sounds great, your contribution is very welcomed, me or @gabrielelpidio can help with reviewing & merging it. Having the changes you mentioned in one PR should work out the best, go for it. |
@dasfmi Thanks! I'm trying to get integration to pass (without adding monitors just yet) and am running into the following: Command: # values were redacted
AXIOM_TOKEN=xaat-token AXIOM_ORG_ID=personal-org pnpm run integration
# also tried adding AXIOM_URL=https://api.axiom.co The integration script was failing when Also noticed that docs seem to be outdated so I'll create a separate PR once I get everything sorted out with this process. |
So this boils down to the default parallel test execution of vitest. Since each integration creates and deletes datasets before and after the run, race conditions are introduced where we try to create existing datasets and delete nonexisting ones. The tests pass in CI simply because we do I got things running locally without issues by changing the "integration": "vitest run --threads=false src/*" Out of curiosity, how were things running locally on your end? |
Ready for review in #265 |
I'm seeing that @axiomhq/js doesn't yet have JS bindings for Axiom's /v2/monitors API endpoints. I would like to bring the library one step closer to full parity by creating a PR with the functionality if there isn't any internal work in progress to get this added in the near future.
My goals for the PR would consist of the following:
packages/js/src/monitors.ts
with JS bindings using axiom-go Monitor struct for reference (thanks to @thecraftman for the pointer!) and following the design patterns used in neighboring servicespackages/js/src/test/unit/monitors.test.ts
for testing CRUD operationsexamples/js/src
for list-monitors, get-monitor, create-monitor, update-monitor, and delete-monitorThe current plan is to do all this in one PR, if I get verbal approval to continue with this. Open to splitting things out into multiple PRs if requested.
I think this would be a good starting point to get familiarized with the contributing process - adding bindings should be relatively straight forward and I might find the time to port other services as well.
Please let me know if this is a good idea and/or whether I am missing anything in the outline!
The text was updated successfully, but these errors were encountered: