Skip to content

Commit

Permalink
[Integration][Datadog] Remove slo_history from default templates (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankilevitch authored Dec 4, 2024
1 parent e337f8e commit 65b6ce4
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 132 deletions.
63 changes: 0 additions & 63 deletions integrations/datadog/.port/resources/blueprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,69 +283,6 @@
}
}
},
{
"identifier": "datadogSloHistory",
"description": "This blueprint represents a datadog SLO history",
"title": "Datadog SLO History",
"icon": "Datadog",
"schema": {
"properties": {
"monitor_type": {
"icon": "DefaultProperty",
"title": "Type",
"type": "string"
},
"sliValue": {
"icon": "DefaultProperty",
"title": "SLI Value",
"type": "number"
},
"sampling_start_date": {
"icon": "DefaultProperty",
"type": "string",
"title": "Sampling Start Date",
"format": "date-time"
},
"sampling_end_date": {
"icon": "DefaultProperty",
"type": "string",
"title": "Sampling End Date",
"format": "date-time"
},
"timeframe": {
"type": "number",
"title": "Timeframe",
"enum": [7, 30],
"enumColors": {
"7": "purple",
"30": "pink"
}
}
},
"required": []
},
"mirrorProperties": {
"slo_target": {
"title": "SLO Target",
"path": "slo.targetThreshold"
},
"slo_warning_threshold": {
"title": "SLO Warning Threshold",
"path": "slo.warningThreshold"
}
},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"slo": {
"title": "SLO",
"description": "The SLO to which this history belongs to",
"target": "datadogSlo",
"required": false,
"many": false
}
}
},
{
"identifier": "datadogCloudResource",
"description": "This blueprint represents a cloud resource in Datadog",
Expand Down
21 changes: 0 additions & 21 deletions integrations/datadog/.port/resources/port-app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,6 @@ resources:
services: >-
.monitor_tags + .tags | map(select(startswith("service:"))) |
unique | map(split(":")[1])
- kind: sloHistory
selector:
query: "true"
timeframe: 30
periodOfTimeInMonths: 6
port:
entity:
mappings:
identifier: >-
(.slo.id | tostring) + "-" + (.from_ts | tostring) + "-" + (.to_ts |
tostring)
title: .slo.name
blueprint: '"datadogSloHistory"'
properties:
monitory_type: .type
sampling_start_date: .from_ts | todate
sampling_end_date: .to_ts | todate
sliValue: .overall.sli_value
timeframe: .__timeframe
relations:
slo: .slo.id
- kind: host
selector:
query: >-
Expand Down
7 changes: 7 additions & 0 deletions integrations/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- towncrier release notes start -->

## 0.1.61 (2024-12-04)

### Improvements

- Remove `slo_history` from default installations


## 0.1.60 (2024-12-04)


Expand Down
162 changes: 115 additions & 47 deletions integrations/datadog/examples/blueprints.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,122 @@
{
"identifier": "datadogServiceMetric",
"description": "This blueprint represents a Datadog service metric",
"title": "Datadog Service Metric",
"icon": "Datadog",
"schema": {
"properties": {
"query": {
"type": "string",
"title": "Query",
"description": "The Datadog query used to retrieve this metric"
[
{
"identifier": "datadogServiceMetric",
"description": "This blueprint represents a Datadog service metric",
"title": "Datadog Service Metric",
"icon": "Datadog",
"schema": {
"properties": {
"query": {
"type": "string",
"title": "Query",
"description": "The Datadog query used to retrieve this metric"
},
"series": {
"type": "array",
"title": "Series",
"description": "Array containing detailed information about the metric series"
},
"res_type": {
"type": "string",
"title": "Response Type",
"description": "The type of response from the Datadog API"
},
"from_date": {
"type": "string",
"format": "date-time",
"title": "From Date",
"description": "Unix timestamp of the start of the queried time period"
},
"to_date": {
"type": "string",
"format": "date-time",
"title": "To Date",
"description": "Unix timestamp of the end of the queried time period"
},
"env": {
"type": "string",
"title": "Environment",
"description": "The environment of the service"
}
},
"series": {
"type": "array",
"title": "Series",
"description": "Array containing detailed information about the metric series"
},
"res_type": {
"type": "string",
"title": "Response Type",
"description": "The type of response from the Datadog API"
},
"from_date": {
"type": "string",
"format": "date-time",
"title": "From Date",
"description": "Unix timestamp of the start of the queried time period"
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"relations": {
"service": {
"title": "Service",
"description": "The service associated with this query",
"target": "datadogService",
"required": false,
"many": false
}
}
},
{
"identifier": "datadogSloHistory",
"description": "This blueprint represents a datadog SLO history",
"title": "Datadog SLO History",
"icon": "Datadog",
"schema": {
"properties": {
"monitor_type": {
"icon": "DefaultProperty",
"title": "Type",
"type": "string"
},
"sliValue": {
"icon": "DefaultProperty",
"title": "SLI Value",
"type": "number"
},
"sampling_start_date": {
"icon": "DefaultProperty",
"type": "string",
"title": "Sampling Start Date",
"format": "date-time"
},
"sampling_end_date": {
"icon": "DefaultProperty",
"type": "string",
"title": "Sampling End Date",
"format": "date-time"
},
"timeframe": {
"type": "number",
"title": "Timeframe",
"enum": [
7,
30
],
"enumColors": {
"7": "purple",
"30": "pink"
}
}
},
"to_date": {
"type": "string",
"format": "date-time",
"title": "To Date",
"description": "Unix timestamp of the end of the queried time period"
"required": []
},
"mirrorProperties": {
"slo_target": {
"title": "SLO Target",
"path": "slo.targetThreshold"
},
"env": {
"type": "string",
"title": "Environment",
"description": "The environment of the service"
"slo_warning_threshold": {
"title": "SLO Warning Threshold",
"path": "slo.warningThreshold"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"relations": {
"service": {
"title": "Service",
"description": "The service associated with this query",
"target": "datadogService",
"required": false,
"many": false
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"slo": {
"title": "SLO",
"description": "The SLO to which this history belongs to",
"target": "datadogSlo",
"required": false,
"many": false
}
}
}
}
]
22 changes: 22 additions & 0 deletions integrations/datadog/examples/mappings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,25 @@ resources:
env: .__env
relations:
service: .__service

- kind: sloHistory
selector:
query: "true"
timeframe: 30
periodOfTimeInMonths: 6
port:
entity:
mappings:
identifier: >-
(.slo.id | tostring) + "-" + (.from_ts | tostring) + "-" + (.to_ts |
tostring)
title: .slo.name
blueprint: '"datadogSloHistory"'
properties:
monitory_type: .type
sampling_start_date: .from_ts | todate
sampling_end_date: .to_ts | todate
sliValue: .overall.sli_value
timeframe: .__timeframe
relations:
slo: .slo.id
2 changes: 1 addition & 1 deletion integrations/datadog/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "datadog"
version = "0.1.60"
version = "0.1.61"
description = "Datadog Ocean Integration"
authors = ["Albert Luganga <[email protected]>"]

Expand Down

0 comments on commit 65b6ce4

Please sign in to comment.