jianyuan / go-sentry Goto Github PK
View Code? Open in Web Editor NEWGo library for accessing the Sentry Web API
License: MIT License
Go library for accessing the Sentry Web API
License: MIT License
The Organization response has slightly changed. Update and split the struct accordingly.
Would it be possible to publish a new release? We are trying to take advantage of 1f63b22, but the last release was cut in October 2018. This release predates this commit, so we currently have to point to the current SHA in master which is non-ideal.
When we create project alerts with integrations (for example slack) we are expected response like MetricAlert
(
go-sentry/sentry/metric_alerts.go
Line 11 in 8f147c7
Here is method:
go-sentry/sentry/metric_alerts.go
Line 111 in 8f147c7
Here is endpoint from sentry repository.
https://github.com/getsentry/sentry/blob/41f9103679d2669ab5e9b32a8e2b1970578e4f4e/src/sentry/incidents/endpoints/project_alert_rule_index.py#L112
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
.github/workflows/go.yaml
actions/checkout v4
actions/setup-go v5
go.mod
go 1.19
github.com/google/go-querystring v1.1.0
github.com/peterhellberg/link v1.2.0
github.com/stretchr/testify v1.8.4
The Dashboard API is returning the below error.
https://pkg.go.dev/github.com/jianyuan/go-sentry/[email protected]/sentry#Dashboard
Error: parsing time "\"\"" as "\"2006-01-02T15:04:05Z07:00\"": cannot parse "\"" as "2006"
Error: json: cannot unmarshal number into Go struct field MetricAlertTriggerAction.triggers.actions.targetIdentifier of type string
Related issue: jianyuan/terraform-provider-sentry#49
Example rule condition for use with terraform-provider-sentry
:
{
id = "sentry.rules.conditions.event_frequency.EventFrequencyCondition",
interval = "1h",
value = "10"
}
The interval and value parameters are currently ignored so Sentry errors out.
Lines 23 to 28 in a2cc36d
The current get metric alert endpoint nested under the "projects" resource does not return the eventTypes
property. We will need to switch to the one nested under the "organisations" resource that does return this property.
Related issue: jianyuan/terraform-provider-sentry#237
Add context.Context
argument to all methods.
Package context defines the Context type, which carries deadlines, cancellation signals, and other request-scoped values across API boundaries and between processes.
As this will be a breaking change, it would be a good idea to bump the major version of this library to v2.
Also, fixes #29
Metric alert trigger actions can have a string
or int
value see here most specifically L#29 where it returns int(action.target_identifier)
This can result in the below error:
Error: json: cannot unmarshal number into Go struct field MetricAlertTriggerAction.triggers.actions.targetIdentifier of type string
https://github.com/jianyuan/go-sentry/blob/main/sentry/metric_alerts.go#L58
Though their documentation doesn't reflect it, Sentry appears to have added the ability to create rate limits on project keys during creation. If this is the case, the workaround at here is no longer necessary and can be refactored into a single request rather than a creation request + an update request.
The ProjectOwnership API is returning an error -
https://pkg.go.dev/github.com/jianyuan/go-sentry/[email protected]/sentry#ProjectOwnershipsService.Get
Error: json: cannot unmarshal string into Go struct field ProjectOwnership.autoAssignment of type bool
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.