Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#IOPID-2429] Remove dangling OpenApi definitions #1162

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

salvatorelaiso
Copy link
Collaborator

List of Changes

Clean OpenApi definitions

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

github-actions bot commented Oct 29, 2024

Jira Pull Request Link

This Pull Request refers to the following Jira issue IOPID-2429

@salvatorelaiso salvatorelaiso requested review from arcogabbo and removed request for rodoviti October 29, 2024 09:20
Copy link

Copy link

Terraform Plan 📖

Terraform Plan
ia.it", "api-app.io.pagopa.it"];
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex api_url
                                                | extend HTTPStatus = case(
                                                  httpStatus_d between (100 .. 199), "1XX",
                                                  httpStatus_d between (200 .. 299), "2XX",
                                                  httpStatus_d between (300 .. 399), "3XX",
                                                  httpStatus_d between (400 .. 499), "4XX",
                                                  "5XX")
                                                | summarize count() by HTTPStatus, bin(TimeGenerated, 5m)
                                                | render areachart with (xtitle = "time", ytitle= "count")
                                            EOT
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "ControlType"
                                            value      = "FrameControlChart"
                                        },
                                        # (1 unchanged element hidden)
                                        {
                                            isOptional = true
                                            name       = "PartTitle"
                                            value      = "Response Codes (5m)"
                                        },
                                      ~ {
                                            name       = "PartSubTitle"
                                          ~ value      = "/api/v1/payment-activations/{codiceContestoPagamento}" -> "/api/v1/user-data-processing"
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "Dimensions"
                                            value      = {
                                                aggregation = "Sum"
                                                splitBy     = []
                                                xAxis       = {
                                                    name = "httpStatus_d"
                                                    type = "string"
                                                }
                                                yAxis       = [
                                                    {
                                                        name = "count_"
                                                        type = "long"
                                                    },
                                                ]
                                            }
                                        },
                                        # (2 unchanged elements hidden)
                                    ]
                                  ~ settings = {
                                      ~ content = {
                                          ~ Query         = <<-EOT
                                              - let api_url = "/api/v1/payment-activations/[^/]+";
                                              + let api_url = "/api/v1/user-data-processing";
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex api_url
                                                | extend HTTPStatus = case(
                                                  httpStatus_d between (100 .. 199), "1XX",
                                                  httpStatus_d between (200 .. 299), "2XX",
                                                  httpStatus_d between (300 .. 399), "3XX",
                                                  httpStatus_d between (400 .. 499), "4XX",
                                                  "5XX")
                                                | summarize count() by HTTPStatus, bin(TimeGenerated, 5m)
                                                | render areachart with (xtitle = "time", ytitle= "count")
                                            EOT
                                            # (3 unchanged attributes hidden)
                                        }
                                    }
                                    # (1 unchanged attribute hidden)
                                }
                                # (1 unchanged attribute hidden)
                            }
                          ~ "56" = {
                              ~ metadata = {
                                  ~ inputs   = [
                                        # (7 unchanged elements hidden)
                                        {
                                            isOptional = true
                                            name       = "DraftRequestParameters"
                                            value      = {
                                                scope = "hierarchy"
                                            }
                                        },
                                      ~ {
                                            name       = "Query"
                                          ~ value      = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 1;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                              - | where requestUri_s matches regex "/api/v1/payment-activations/[^/]+"
                                              + | where requestUri_s matches regex "/api/v1/user-data-processing"
                                                | summarize
                                                    watermark=threshold,
                                                    duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
                                                | render timechart with (xtitle = "time", ytitle= "response time(s)")
                                            EOT
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "ControlType"
                                            value      = "FrameControlChart"
                                        },
                                        # (1 unchanged element hidden)
                                        {
                                            isOptional = true
                                            name       = "PartTitle"
                                            value      = "Percentile Response Time (5m)"
                                        },
                                      ~ {
                                            name       = "PartSubTitle"
                                          ~ value      = "/api/v1/payment-activations/{codiceContestoPagamento}" -> "/api/v1/user-data-processing"
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "Dimensions"
                                            value      = {
                                                aggregation = "Sum"
                                                splitBy     = []
                                                xAxis       = {
                                                    name = "TimeGenerated"
                                                    type = "datetime"
                                                }
                                                yAxis       = [
                                                    {
                                                        name = "duration_percentile_95"
                                                        type = "real"
                                                    },
                                                ]
                                            }
                                        },
                                        # (2 unchanged elements hidden)
                                    ]
                                  ~ settings = {
                                      ~ content = {
                                          ~ Query         = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 1;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                              - | where requestUri_s matches regex "/api/v1/payment-activations/[^/]+"
                                              + | where requestUri_s matches regex "/api/v1/user-data-processing"
                                                | summarize
                                                    watermark=threshold,
                                                    duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
                                                | render timechart with (xtitle = "time", ytitle= "response time(s)")
                                            EOT
                                            # (3 unchanged attributes hidden)
                                        }
                                    }
                                    # (1 unchanged attribute hidden)
                                }
                                # (1 unchanged attribute hidden)
                            }
                          ~ "57" = {
                              ~ metadata = {
                                  ~ inputs   = [
                                        # (7 unchanged elements hidden)
                                        {
                                            isOptional = true
                                            name       = "DraftRequestParameters"
                                            value      = {
                                                scope = "hierarchy"
                                            }
                                        },
                                      ~ {
                                            name       = "Query"
                                          ~ value      = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 0.99;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                              - | where requestUri_s matches regex "/api/v1/user-data-processing"
                                              + | where requestUri_s matches regex "/api/v1/user-data-processing/[^/]+"
                                                | summarize
                                                  Total=count(),
                                                  Success=count(httpStatus_d < 500) by bin(TimeGenerated, 5m)
                                                | extend availability=toreal(Success) / Total
                                                | project TimeGenerated, availability, watermark=threshold
                                                | render timechart with (xtitle = "time", ytitle= "availability(%)")
                                            EOT
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "ControlType"
                                            value      = "FrameControlChart"
                                        },
                                        # (1 unchanged element hidden)
                                        {
                                            isOptional = true
                                            name       = "PartTitle"
                                            value      = "Availability (5m)"
                                        },
                                      ~ {
                                            name       = "PartSubTitle"
                                          ~ value      = "/api/v1/user-data-processing" -> "/api/v1/user-data-processing/{choice}"
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "Dimensions"
                                            value      = {
                                                aggregation = "Sum"
                                                splitBy     = []
                                                xAxis       = {
                                                    name = "TimeGenerated"
                                                    type = "datetime"
                                                }
                                                yAxis       = [
                                                    {
                                                        name = "availability"
                                                        type = "real"
                                                    },
                                                    {
                                                        name = "watermark"
                                                        type = "real"
                                                    },
                                                ]
                                            }
                                        },
                                        # (2 unchanged elements hidden)
                                    ]
                                  ~ settings = {
                                      ~ content = {
                                          ~ Query     = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 0.99;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                              - | where requestUri_s matches regex "/api/v1/user-data-processing"
                                              + | where requestUri_s matches regex "/api/v1/user-data-processing/[^/]+"
                                                | summarize
                                                  Total=count(),
                                                  Success=count(httpStatus_d < 500) by bin(TimeGenerated, 5m)
                                                | extend availability=toreal(Success) / Total
                                                | project TimeGenerated, availability, watermark=threshold
                                                | render timechart with (xtitle = "time", ytitle= "availability(%)")
                                            EOT
                                            # (1 unchanged attribute hidden)
                                        }
                                    }
                                    # (1 unchanged attribute hidden)
                                }
                                # (1 unchanged attribute hidden)
                            }
                          ~ "58" = {
                              ~ metadata = {
                                  ~ inputs   = [
                                        # (7 unchanged elements hidden)
                                        {
                                            isOptional = true
                                            name       = "DraftRequestParameters"
                                            value      = {
                                                scope = "hierarchy"
                                            }
                                        },
                                      ~ {
                                            name       = "Query"
                                          ~ value      = <<-EOT
                                              - let api_url = "/api/v1/user-data-processing";
                                              + let api_url = "/api/v1/user-data-processing/[^/]+";
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex api_url
                                                | extend HTTPStatus = case(
                                                  httpStatus_d between (100 .. 199), "1XX",
                                                  httpStatus_d between (200 .. 299), "2XX",
                                                  httpStatus_d between (300 .. 399), "3XX",
                                                  httpStatus_d between (400 .. 499), "4XX",
                                                  "5XX")
                                                | summarize count() by HTTPStatus, bin(TimeGenerated, 5m)
                                                | render areachart with (xtitle = "time", ytitle= "count")
                                            EOT
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "ControlType"
                                            value      = "FrameControlChart"
                                        },
                                        # (1 unchanged element hidden)
                                        {
                                            isOptional = true
                                            name       = "PartTitle"
                                            value      = "Response Codes (5m)"
                                        },
                                      ~ {
                                            name       = "PartSubTitle"
                                          ~ value      = "/api/v1/user-data-processing" -> "/api/v1/user-data-processing/{choice}"
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "Dimensions"
                                            value      = {
                                                aggregation = "Sum"
                                                splitBy     = []
                                                xAxis       = {
                                                    name = "httpStatus_d"
                                                    type = "string"
                                                }
                                                yAxis       = [
                                                    {
                                                        name = "count_"
                                                        type = "long"
                                                    },
                                                ]
                                            }
                                        },
                                        # (2 unchanged elements hidden)
                                    ]
                                  ~ settings = {
                                      ~ content = {
                                          ~ Query         = <<-EOT
                                              - let api_url = "/api/v1/user-data-processing";
                                              + let api_url = "/api/v1/user-data-processing/[^/]+";
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex api_url
                                                | extend HTTPStatus = case(
                                                  httpStatus_d between (100 .. 199), "1XX",
                                                  httpStatus_d between (200 .. 299), "2XX",
                                                  httpStatus_d between (300 .. 399), "3XX",
                                                  httpStatus_d between (400 .. 499), "4XX",
                                                  "5XX")
                                                | summarize count() by HTTPStatus, bin(TimeGenerated, 5m)
                                                | render areachart with (xtitle = "time", ytitle= "count")
                                            EOT
                                            # (3 unchanged attributes hidden)
                                        }
                                    }
                                    # (1 unchanged attribute hidden)
                                }
                                # (1 unchanged attribute hidden)
                            }
                          ~ "59" = {
                              ~ metadata = {
                                  ~ inputs   = [
                                        # (7 unchanged elements hidden)
                                        {
                                            isOptional = true
                                            name       = "DraftRequestParameters"
                                            value      = {
                                                scope = "hierarchy"
                                            }
                                        },
                                      ~ {
                                            name       = "Query"
                                          ~ value      = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 1;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                              - | where requestUri_s matches regex "/api/v1/user-data-processing"
                                              + | where requestUri_s matches regex "/api/v1/user-data-processing/[^/]+"
                                                | summarize
                                                    watermark=threshold,
                                                    duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
                                                | render timechart with (xtitle = "time", ytitle= "response time(s)")
                                            EOT
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "ControlType"
                                            value      = "FrameControlChart"
                                        },
                                        # (1 unchanged element hidden)
                                        {
                                            isOptional = true
                                            name       = "PartTitle"
                                            value      = "Percentile Response Time (5m)"
                                        },
                                      ~ {
                                            name       = "PartSubTitle"
                                          ~ value      = "/api/v1/user-data-processing" -> "/api/v1/user-data-processing/{choice}"
                                            # (1 unchanged attribute hidden)
                                        },
                                        {
                                            isOptional = true
                                            name       = "Dimensions"
                                            value      = {
                                                aggregation = "Sum"
                                                splitBy     = []
                                                xAxis       = {
                                                    name = "TimeGenerated"
                                                    type = "datetime"
                                                }
                                                yAxis       = [
                                                    {
                                                        name = "duration_percentile_95"
                                                        type = "real"
                                                    },
                                                ]
                                            }
                                        },
                                        # (2 unchanged elements hidden)
                                    ]
                                  ~ settings = {
                                      ~ content = {
                                          ~ Query         = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 1;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                              - | where requestUri_s matches regex "/api/v1/user-data-processing"
                                              + | where requestUri_s matches regex "/api/v1/user-data-processing/[^/]+"
                                                | summarize
                                                    watermark=threshold,
                                                    duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
                                                | render timechart with (xtitle = "time", ytitle= "response time(s)")
                                            EOT
                                            # (3 unchanged attributes hidden)
                                        }
                                    }
                                    # (1 unchanged attribute hidden)
                                }
                                # (1 unchanged attribute hidden)
                            }
                          - "60" = {
                              - metadata = {
                                  - inputs   = [
                                      - {
                                          - isOptional = true
                                          - name       = "resourceTypeMode"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "ComponentId"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Scope"
                                          - value      = {
                                              - resourceIds = [
                                                  - "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-external/providers/Microsoft.Network/applicationGateways/io-p-appgateway",
                                                ]
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "PartId"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Version"
                                          - value      = "2.0"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "TimeRange"
                                          - value      = "PT4H"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "DashboardId"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "DraftRequestParameters"
                                          - value      = {
                                              - scope = "hierarchy"
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Query"
                                          - value      = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 0.99;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/v1/user-data-processing/[^/]+"
                                                | summarize
                                                  Total=count(),
                                                  Success=count(httpStatus_d < 500) by bin(TimeGenerated, 5m)
                                                | extend availability=toreal(Success) / Total
                                                | project TimeGenerated, availability, watermark=threshold
                                                | render timechart with (xtitle = "time", ytitle= "availability(%)")
                                            EOT
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "ControlType"
                                          - value      = "FrameControlChart"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "SpecificChart"
                                          - value      = "Line"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "PartTitle"
                                          - value      = "Availability (5m)"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "PartSubTitle"
                                          - value      = "/api/v1/user-data-processing/{choice}"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Dimensions"
                                          - value      = {
                                              - aggregation = "Sum"
                                              - splitBy     = []
                                              - xAxis       = {
                                                  - name = "TimeGenerated"
                                                  - type = "datetime"
                                                }
                                              - yAxis       = [
                                                  - {
                                                      - name = "availability"
                                                      - type = "real"
                                                    },
                                                  - {
                                                      - name = "watermark"
                                                      - type = "real"
                                                    },
                                                ]
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "LegendOptions"
                                          - value      = {
                                              - isEnabled = true
                                              - position  = "Bottom"
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "IsQueryContainTimeRange"
                                          - value      = false
                                        },
                                    ]
                                  - settings = {
                                      - content = {
                                          - PartTitle = "Availability (5m)"
                                          - Query     = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 0.99;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/v1/user-data-processing/[^/]+"
                                                | summarize
                                                  Total=count(),
                                                  Success=count(httpStatus_d < 500) by bin(TimeGenerated, 5m)
                                                | extend availability=toreal(Success) / Total
                                                | project TimeGenerated, availability, watermark=threshold
                                                | render timechart with (xtitle = "time", ytitle= "availability(%)")
                                            EOT
                                        }
                                    }
                                  - type     = "Extension/Microsoft_OperationsManagementSuite_Workspace/PartType/LogsDashboardPart"
                                }
                              - position = {
                                  - colSpan = 6
                                  - rowSpan = 4
                                  - x       = 0
                                  - y       = 80
                                }
                            }
                          - "61" = {
                              - metadata = {
                                  - inputs   = [
                                      - {
                                          - isOptional = true
                                          - name       = "resourceTypeMode"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "ComponentId"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Scope"
                                          - value      = {
                                              - resourceIds = [
                                                  - "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-external/providers/Microsoft.Network/applicationGateways/io-p-appgateway",
                                                ]
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "PartId"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Version"
                                          - value      = "2.0"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "TimeRange"
                                          - value      = "PT4H"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "DashboardId"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "DraftRequestParameters"
                                          - value      = {
                                              - scope = "hierarchy"
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Query"
                                          - value      = <<-EOT
                                                let api_url = "/api/v1/user-data-processing/[^/]+";
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex api_url
                                                | extend HTTPStatus = case(
                                                  httpStatus_d between (100 .. 199), "1XX",
                                                  httpStatus_d between (200 .. 299), "2XX",
                                                  httpStatus_d between (300 .. 399), "3XX",
                                                  httpStatus_d between (400 .. 499), "4XX",
                                                  "5XX")
                                                | summarize count() by HTTPStatus, bin(TimeGenerated, 5m)
                                                | render areachart with (xtitle = "time", ytitle= "count")
                                            EOT
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "ControlType"
                                          - value      = "FrameControlChart"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "SpecificChart"
                                          - value      = "Pie"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "PartTitle"
                                          - value      = "Response Codes (5m)"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "PartSubTitle"
                                          - value      = "/api/v1/user-data-processing/{choice}"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Dimensions"
                                          - value      = {
                                              - aggregation = "Sum"
                                              - splitBy     = []
                                              - xAxis       = {
                                                  - name = "httpStatus_d"
                                                  - type = "string"
                                                }
                                              - yAxis       = [
                                                  - {
                                                      - name = "count_"
                                                      - type = "long"
                                                    },
                                                ]
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "LegendOptions"
                                          - value      = {
                                              - isEnabled = true
                                              - position  = "Bottom"
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "IsQueryContainTimeRange"
                                          - value      = false
                                        },
                                    ]
                                  - settings = {
                                      - content = {
                                          - Dimensions    = {
                                              - aggregation = "Sum"
                                              - splitBy     = [
                                                  - {
                                                      - name = "HTTPStatus"
                                                      - type = "string"
                                                    },
                                                ]
                                              - xAxis       = {
                                                  - name = "TimeGenerated"
                                                  - type = "datetime"
                                                }
                                              - yAxis       = [
                                                  - {
                                                      - name = "count_"
                                                      - type = "long"
                                                    },
                                                ]
                                            }
                                          - PartTitle     = "Response Codes (5m)"
                                          - Query         = <<-EOT
                                                let api_url = "/api/v1/user-data-processing/[^/]+";
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex api_url
                                                | extend HTTPStatus = case(
                                                  httpStatus_d between (100 .. 199), "1XX",
                                                  httpStatus_d between (200 .. 299), "2XX",
                                                  httpStatus_d between (300 .. 399), "3XX",
                                                  httpStatus_d between (400 .. 499), "4XX",
                                                  "5XX")
                                                | summarize count() by HTTPStatus, bin(TimeGenerated, 5m)
                                                | render areachart with (xtitle = "time", ytitle= "count")
                                            EOT
                                          - SpecificChart = "StackedArea"
                                        }
                                    }
                                  - type     = "Extension/Microsoft_OperationsManagementSuite_Workspace/PartType/LogsDashboardPart"
                                }
                              - position = {
                                  - colSpan = 6
                                  - rowSpan = 4
                                  - x       = 6
                                  - y       = 80
                                }
                            }
                          - "62" = {
                              - metadata = {
                                  - inputs   = [
                                      - {
                                          - isOptional = true
                                          - name       = "resourceTypeMode"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "ComponentId"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Scope"
                                          - value      = {
                                              - resourceIds = [
                                                  - "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-external/providers/Microsoft.Network/applicationGateways/io-p-appgateway",
                                                ]
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "PartId"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Version"
                                          - value      = "2.0"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "TimeRange"
                                          - value      = "PT4H"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "DashboardId"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "DraftRequestParameters"
                                          - value      = {
                                              - scope = "hierarchy"
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Query"
                                          - value      = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 1;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/v1/user-data-processing/[^/]+"
                                                | summarize
                                                    watermark=threshold,
                                                    duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
                                                | render timechart with (xtitle = "time", ytitle= "response time(s)")
                                            EOT
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "ControlType"
                                          - value      = "FrameControlChart"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "SpecificChart"
                                          - value      = "StackedColumn"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "PartTitle"
                                          - value      = "Percentile Response Time (5m)"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "PartSubTitle"
                                          - value      = "/api/v1/user-data-processing/{choice}"
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "Dimensions"
                                          - value      = {
                                              - aggregation = "Sum"
                                              - splitBy     = []
                                              - xAxis       = {
                                                  - name = "TimeGenerated"
                                                  - type = "datetime"
                                                }
                                              - yAxis       = [
                                                  - {
                                                      - name = "duration_percentile_95"
                                                      - type = "real"
                                                    },
                                                ]
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "LegendOptions"
                                          - value      = {
                                              - isEnabled = true
                                              - position  = "Bottom"
                                            }
                                        },
                                      - {
                                          - isOptional = true
                                          - name       = "IsQueryContainTimeRange"
                                          - value      = false
                                        },
                                    ]
                                  - settings = {
                                      - content = {
                                          - Dimensions    = {
                                              - aggregation = "Sum"
                                              - splitBy     = []
                                              - xAxis       = {
                                                  - name = "TimeGenerated"
                                                  - type = "datetime"
                                                }
                                              - yAxis       = [
                                                  - {
                                                      - name = "watermark"
                                                      - type = "long"
                                                    },
                                                  - {
                                                      - name = "duration_percentile_95"
                                                      - type = "real"
                                                    },
                                                ]
                                            }
                                          - PartTitle     = "Percentile Response Time (5m)"
                                          - Query         = <<-EOT
                                                let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
                                                let threshold = 1;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/v1/user-data-processing/[^/]+"
                                                | summarize
                                                    watermark=threshold,
                                                    duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
                                                | render timechart with (xtitle = "time", ytitle= "response time(s)")
                                            EOT
                                          - SpecificChart = "Line"
                                        }
                                    }
                                  - type     = "Extension/Microsoft_OperationsManagementSuite_Workspace/PartType/LogsDashboardPart"
                                }
                              - position = {
                                  - colSpan = 6
                                  - rowSpan = 4
                                  - x       = 12
                                  - y       = 80
                                }
                            }
                            # (45 unchanged attributes hidden)
                        }
                        # (1 unchanged attribute hidden)
                    }
                }
                # (1 unchanged attribute hidden)
            }
        )
        id                   = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/dashboards/providers/Microsoft.Portal/dashboards/io-p-opex_iobackend_api_backend"
        name                 = "io-p-opex_iobackend_api_backend"
        tags                 = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (2 unchanged attributes hidden)
    }

Plan: 10 to add, 1 to change, 12 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.
Releasing state lock. This may take a few moments...

@gquadrati gquadrati merged commit 7603351 into master Oct 29, 2024
7 checks passed
@gquadrati gquadrati deleted the IOPID-2429-fix branch October 29, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants