port-labs / ocean

🌊 Ocean 🌊 is an innovative solution developed by Port to seamlessly integrate various third-party systems with our developer portal product, empowering engineers to effortlessly prioritize key features and streamline the integration process.
https://ocean.getport.io
Apache License 2.0
118 stars 55 forks source link

[Integration][Datadog] Add metrics availabity data on service and hosts #867

Closed phalbert closed 2 months ago

phalbert commented 3 months ago

Description

Type of change

Please leave one option from the following and delete the rest:

Screenshots

Screenshot 2024-08-13 at 07 59 38 Screenshot 2024-08-13 at 07 54 03 Screenshot 2024-08-13 at 07 54 16 Screenshot 2024-08-13 at 07 54 35

API Documentation

Provide links to the API documentation used for this integration.

phalbert commented 3 months ago

A few other improvements I could make. cc @PeyGis , @Tankilevitch

  1. Dashboard and Query Data: Implement a caching mechanism to store fetched dashboard definitions and query results for a certain duration.

  2. Time Window: Allow users to configure the time window (currently hardcoded to 10 minutes) for the check_metric_data_exists function. This gives users more control over the metric availability checks.

phalbert commented 3 months ago

I think the implementation is too specific for the user use-case.

We have multiple resources touched to support that capability. And I think they needs to be separated.

Service Host Dashboard Dashboard-Metrics

IMO we need to approach it by taking advantage of port builder capabilities, relations, mirrors, aggregation properties.

Service -> Dashboard Metrics or Service -> Dashboard -> Metrics Or Metrics -> Service

Screenshot 2024-08-07 at 00 27 23

This change now adds available metrics as relational array of metric ids that are available for a host or service