Skip to content

Commit

Permalink
Add initial release changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Neale committed Dec 25, 2024
1 parent 4e8d004 commit cc60936
Show file tree
Hide file tree
Showing 10 changed files with 243 additions and 157 deletions.
78 changes: 77 additions & 1 deletion supabase/assets/dashboards/supabase_overview.json
Original file line number Diff line number Diff line change
@@ -1 +1,77 @@
Please build an out-of-the-box dashboard for your integration following our best practices here: https://datadoghq.dev/integrations-core/guidelines/dashboards/#best-practices
{
"title": "Supabase Overview",
"description": "## Supabase\n",
"widgets": [
{
"id": 4717263751542750,
"definition": {
"title": "",
"banner_img": "/static/images/logos/supabase_large.svg",
"show_title": true,
"type": "group",
"layout_type": "ordered",
"widgets": [
{
"id": 5685022835071772,
"definition": {
"type": "note",
"content": "## Supabase\n",
"background_color": "white",
"font_size": "14",
"text_align": "left",
"vertical_align": "center",
"show_tick": false,
"tick_pos": "50%",
"tick_edge": "left",
"has_padding": true
},
"layout": {
"x": 0,
"y": 0,
"width": 3,
"height": 3
}
},
{
"id": 8921963557059570,
"definition": {
"type": "note",
"content": "",
"background_color": "white",
"font_size": "14",
"text_align": "center",
"vertical_align": "center",
"show_tick": false,
"tick_pos": "50%",
"tick_edge": "left",
"has_padding": true
},
"layout": {
"x": 3,
"y": 0,
"width": 3,
"height": 3
}
}
]
},
"layout": {
"x": 0,
"y": 0,
"width": 6,
"height": 6
}
}
],
"template_variables": [
{
"name": "host",
"prefix": "host",
"available_values": [],
"default": "*"
}
],
"layout_type": "ordered",
"notify_list": [],
"reflow_type": "fixed"
}
2 changes: 1 addition & 1 deletion supabase/assets/service_checks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"host",
"endpoint"
],
"name": "Supabase OpenMetrics endpoint health",
"name": "Supabase Storage API OpenMetrics endpoint health",
"description": "Returns `CRITICAL` if the Agent is unable to connect to the Supabase Storage API OpenMetrics endpoint, otherwise returns `OK`."
}
]
File renamed without changes.
11 changes: 5 additions & 6 deletions supabase/datadog_checks/supabase/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
from typing import Any # noqa: F401

from datadog_checks.base import ConfigurationError, OpenMetricsBaseCheckV2 # noqa: F401
from .config_models import ConfigMixin

from .config_models import ConfigMixin
from .metrics import RENAME_LABELS_MAP, STORAGE_API_METRICS, SUPABASE_METRICS


(
PRIVILEGED_METRICS_NAMESPACE,
STORAGE_API_METRICS_NAMESPACE,
Expand All @@ -17,6 +16,7 @@
'supabase.storage_api',
]


class SupabaseCheck(OpenMetricsBaseCheckV2, ConfigMixin):

DEFAULT_METRIC_LIMIT = 0
Expand All @@ -31,11 +31,10 @@ def parse_config(self):
self.scraper_configs = []
privileged_metrics_endpoint = self.instance.get("privileged_metrics_endpoint")
storage_api_endpoint = self.instance.get("storage_api_endpoint")

if not privileged_metrics_endpoint and not storage_api_endpoint:
raise ConfigurationError(
"Must specify at least one of the following:"
"`privileged_metrics_endpoint` or `storage_api_endpoint`."
"Must specify at least one of the following:" "`privileged_metrics_endpoint` or `storage_api_endpoint`."
)

if privileged_metrics_endpoint:
Expand All @@ -55,4 +54,4 @@ def generate_config(self, endpoint, namespace, metrics):
'rename_labels': RENAME_LABELS_MAP,
}
config.update(self.instance)
return config
return config
Loading

0 comments on commit cc60936

Please sign in to comment.