### Summary
Integrate the new implementations of the alertmanager along with changes to the ruler. This change can be broadly categoried into 3 parts:
#### Frontend
- The earlier `/api/v1/alerts` api was double encoding the response in json and sending it to the frontend. This PR fixes the json response object.
For instance, we have gone from the response `{
"status": "success",
"data": "{\"status\":\"success\",\"data\":[{\"labels\":{\"alertname\":\"[platform][consumer] consumer is above 100% memory utilization\",\"bu\":\"platform\",\"......
}` to the response `{"status":"success","data":[{"labels":{"alertname":"[Metrics] Pod CP......`
- `msteams` has been changed to `msteamsv2` wherever applicable
#### Ruler
The following changes have been done in the ruler component:
- Removal of the old alertmanager and notifier
- The RuleDB methods `Create`, `Edit` and `Delete` have been made transactional
- Introduction of a new `testPrepareNotifyFunc` for sending test notifications
- Integration with the new alertmanager
#### Alertmanager
Although a huge chunk of the alertmanagers have been merged in previous PRs (the list can be found at https://github.com/SigNoz/platform-pod/issues/404), this PR takes care of changes needed in order to incorporate it with the ruler
- Addition of ruleId based matching
- Support for marshalling the global configuration directly from the upstream alertmanager
- Addition of orgId to the legacy alertmanager
- Support for always adding defaults to both routes and receivers while creating them
- Migration to create the required alertmanager tables
- Migration for msteams to msteamsv2 has been added. We will start using msteamv2 config for the new alertmanager and keep using msteams for the old one.
#### Related Issues / PR's
Closes https://github.com/SigNoz/platform-pod/issues/404
Closes https://github.com/SigNoz/platform-pod/issues/176
* fix: move migrations to bun
* fix: use anonymous structs and move modes to types package
* fix: minor changes after tests
* fix: remove bun relations and add foreign keys
* fix: minor changes
* Update pkg/types/agent.go
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix: add migration and postgres provider
* fix: address minor comments
* fix: use bun create index
* fix: add migration
* fix: support for postgres in migrations
* Update pkg/sqlstore/pgstore/provider.go
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Update pkg/sqlmigration/001_add_organization.go
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix: address comments
* fix: move max connection to base config
* fix: update scope
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* chore: bump signoz-otel-collector dependency version to 0.111.5
* chore: logs filter suggestions: update import for ResourceHierarchy from signoz-otel-collector
* chore: upgrade signoz-otel-collector dependencies to v0.111.2
* chore: update references to otel-collector types in collector simulator
* chore: escape '$' as '$$$' and not '$$' in generated pipeline collector config
* chore: update go.sum entry for logstransformprocessor
* chore: some more go.sum updates to get build working
---------
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
* chore: upgrade signoz-otel-collector dependency to v0.102.10
* feat: first stab at ranking resource attribs higher
* chore: add test todo for validating resource attribs get ranked higher in logs filter suggestions
* chore: add test validating higher ranking for special resource attribs
* chore: some cleanup
* chore: some more cleanup
* chore: put together helper for fetching values for multiple attributes
* chore: poc: use helper for filter suggestions
* chore: add a working impl for getting attrib values for multiple attributes
* chore: start updating integration test to account for new approach for getting log attrib values
* chore: use a global zap logger in filter suggestion tests
* chore: fix attrib values clickhouse query expectation
* chore: only query values for actual attributes when generating example queries
* chore: update clickhouse-go-mock
* chore: cleanup: separate params for attributesLimit and examplesLimit for filter suggestions
* chore: some test cleanup
* chore: some more cleanup
* chore: some more cleanup
---------
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
* chore: stash initial work with API signature
* chore: put together setup for integration testing filter suggestions
* feat: filter suggestions: suggest attribs using existing autocomplete logic
* chore: filter suggestions test: add expectation for example queries
* feat: filter suggestions: default suggestions when data yet to be received
* feat: finish plumbing basic example queries
* chore: add test for filter suggestions with an existing query
* feat: filter suggestions: don't suggest attribs already included in existing filter
* chore: generate example queries by including existing filter first
* chore: upgrade ClickHouse-go-mock
* chore: some cleanup of reader.GetQBFilterSuggestionsForLogs
* chore: some cleanup of filter suggestion tests
* chore: some cleanup to http handler and request parsing logic for filter suggestions
* chore: remove expectation that attrib suggestions won't contain attribs already used in filter