Skip to content

Comments

[#IEL-111] Fix opex io sign#1306

Draft
Iustin-Burlacu wants to merge 5 commits intomasterfrom
fixes/opex-io-sign
Draft

[#IEL-111] Fix opex io sign#1306
Iustin-Burlacu wants to merge 5 commits intomasterfrom
fixes/opex-io-sign

Conversation

@Iustin-Burlacu
Copy link
Collaborator

Fix opex io sign

  • change config
  • change trigger

Fixes IEL-111

@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

⚠️ No Changeset found

Latest commit: 28b2d5c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

Jira Pull Request Link

This Pull Request refers to the following Jira issue IEL-111

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

Terraform Plan 📖

Terraform Plan
          | where requestUri_s matches regex "/api/sign/v1/signature-requests$"
            | summarize
              Total=count(),
              Success=count(httpStatus_d < 500) by bin(TimeGenerated, 5m)
            | extend availability=toreal(Success) / Total
            | where availability < threshold
        EOT
        tags                    = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (12 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # azurerm_monitor_scheduled_query_rules_alert.alarm_availability_5 will be updated in-place
  ~ resource "azurerm_monitor_scheduled_query_rules_alert" "alarm_availability_5" {
        id                      = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/dashboards/providers/Microsoft.Insights/scheduledQueryRules/io-p-opex_iobackend_api_io_sign-availability @ _api_sign_v1_signature-requests_id"
        name                    = "io-p-opex_iobackend_api_io_sign-availability @ _api_sign_v1_signature-requests_id"
      ~ query                   = <<-EOT
            let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
          - let threshold = 0.99;
          + let threshold = 0.9;
            AzureDiagnostics
            | where originalHost_s in (api_hosts)
            | where requestUri_s matches regex "/api/sign/v1/signature-requests/[^/]+$"
            | summarize
              Total=count(),
              Success=count(httpStatus_d < 500) by bin(TimeGenerated, 5m)
            | extend availability=toreal(Success) / Total
            | where availability < threshold
        EOT
        tags                    = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (12 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # azurerm_monitor_scheduled_query_rules_alert.alarm_time_0 will be updated in-place
  ~ resource "azurerm_monitor_scheduled_query_rules_alert" "alarm_time_0" {
        id                      = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/dashboards/providers/Microsoft.Insights/scheduledQueryRules/io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_metadata"
        name                    = "io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_metadata"
      ~ query                   = <<-EOT
            let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
          - let threshold = 1;
          + let threshold = 3;
            AzureDiagnostics
            | where originalHost_s in (api_hosts)
            | where requestUri_s matches regex "/api/sign/v1/metadata$"
            | summarize
                watermark=threshold,
                duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
            | where duration_percentile_95 > threshold
        EOT
        tags                    = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (12 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # azurerm_monitor_scheduled_query_rules_alert.alarm_time_1 will be updated in-place
  ~ resource "azurerm_monitor_scheduled_query_rules_alert" "alarm_time_1" {
        id                      = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/dashboards/providers/Microsoft.Insights/scheduledQueryRules/io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_qtsp_clauses"
        name                    = "io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_qtsp_clauses"
      ~ query                   = <<-EOT
            let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
          - let threshold = 1;
          + let threshold = 3;
            AzureDiagnostics
            | where originalHost_s in (api_hosts)
            | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses$"
            | summarize
                watermark=threshold,
                duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
            | where duration_percentile_95 > threshold
        EOT
        tags                    = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (12 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # azurerm_monitor_scheduled_query_rules_alert.alarm_time_2 will be updated in-place
  ~ resource "azurerm_monitor_scheduled_query_rules_alert" "alarm_time_2" {
        id                      = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/dashboards/providers/Microsoft.Insights/scheduledQueryRules/io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_qtsp_clauses_filled_document"
        name                    = "io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_qtsp_clauses_filled_document"
      ~ query                   = <<-EOT
            let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
          - let threshold = 1;
          + let threshold = 3;
            AzureDiagnostics
            | where originalHost_s in (api_hosts)
            | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses/filled_document$"
            | summarize
                watermark=threshold,
                duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
            | where duration_percentile_95 > threshold
        EOT
        tags                    = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (12 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # azurerm_monitor_scheduled_query_rules_alert.alarm_time_3 will be updated in-place
  ~ resource "azurerm_monitor_scheduled_query_rules_alert" "alarm_time_3" {
        id                      = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/dashboards/providers/Microsoft.Insights/scheduledQueryRules/io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_signatures"
        name                    = "io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_signatures"
      ~ query                   = <<-EOT
            let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
          - let threshold = 1;
          + let threshold = 3;
            AzureDiagnostics
            | where originalHost_s in (api_hosts)
            | where requestUri_s matches regex "/api/sign/v1/signatures$"
            | summarize
                watermark=threshold,
                duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
            | where duration_percentile_95 > threshold
        EOT
        tags                    = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (12 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # azurerm_monitor_scheduled_query_rules_alert.alarm_time_4 will be updated in-place
  ~ resource "azurerm_monitor_scheduled_query_rules_alert" "alarm_time_4" {
        id                      = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/dashboards/providers/Microsoft.Insights/scheduledQueryRules/io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_signature-requests"
        name                    = "io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_signature-requests"
      ~ query                   = <<-EOT
            let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
          - let threshold = 1;
          + let threshold = 3;
            AzureDiagnostics
            | where originalHost_s in (api_hosts)
            | where requestUri_s matches regex "/api/sign/v1/signature-requests$"
            | summarize
                watermark=threshold,
                duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
            | where duration_percentile_95 > threshold
        EOT
        tags                    = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (12 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # azurerm_monitor_scheduled_query_rules_alert.alarm_time_5 will be updated in-place
  ~ resource "azurerm_monitor_scheduled_query_rules_alert" "alarm_time_5" {
        id                      = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/dashboards/providers/Microsoft.Insights/scheduledQueryRules/io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_signature-requests_id"
        name                    = "io-p-opex_iobackend_api_io_sign-responsetime @ _api_sign_v1_signature-requests_id"
      ~ query                   = <<-EOT
            let api_hosts = datatable (name: string) ["app-backend.io.italia.it", "api-app.io.pagopa.it"];
          - let threshold = 1;
          + let threshold = 3;
            AzureDiagnostics
            | where originalHost_s in (api_hosts)
            | where requestUri_s matches regex "/api/sign/v1/signature-requests/[^/]+$"
            | summarize
                watermark=threshold,
                duration_percentile_95=percentiles(timeTaken_d, 95) by bin(TimeGenerated, 5m)
            | where duration_percentile_95 > threshold
        EOT
        tags                    = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (12 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # azurerm_portal_dashboard.this will be updated in-place
  ~ resource "azurerm_portal_dashboard" "this" {
      ~ dashboard_properties = jsonencode(
          ~ {
              ~ lenses   = {
                  ~ "0" = {
                      ~ parts = {
                          ~ "0"  = {
                              ~ 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/metadata$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/metadata$"
                                                | 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)
                            }
                          ~ "11" = {
                              ~ 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signatures$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signatures$"
                                                | 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)
                            }
                          ~ "12" = {
                              ~ 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signature-requests$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signature-requests$"
                                                | 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)
                            }
                          ~ "14" = {
                              ~ 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signature-requests$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signature-requests$"
                                                | 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)
                            }
                          ~ "15" = {
                              ~ 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signature-requests/[^/]+$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signature-requests/[^/]+$"
                                                | 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)
                            }
                          ~ "17" = {
                              ~ 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signature-requests/[^/]+$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signature-requests/[^/]+$"
                                                | 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)
                            }
                          ~ "2"  = {
                              ~ 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/metadata$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/metadata$"
                                                | 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)
                            }
                          ~ "3"  = {
                              ~ 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses$"
                                                | 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)
                            }
                          ~ "5"  = {
                              ~ 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses$"
                                                | 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)
                            }
                          ~ "6"  = {
                              ~ 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses/filled_document$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses/filled_document$"
                                                | 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)
                            }
                          ~ "8"  = {
                              ~ 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses/filled_document$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 3;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/qtsp/clauses/filled_document$"
                                                | 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)
                            }
                          ~ "9"  = {
                              ~ 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signatures$"
                                                | 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"
                                        },
                                        # (6 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;
                                              + let threshold = 0.9;
                                                AzureDiagnostics
                                                | where originalHost_s in (api_hosts)
                                                | where requestUri_s matches regex "/api/sign/v1/signatures$"
                                                | 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)
                            }
                            # (6 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_io_sign"
        name                 = "io-p-opex_iobackend_api_io_sign"
        tags                 = {
            "CostCenter"  = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"   = "Terraform"
            "Environment" = "Prod"
            "Owner"       = "io"
            "Source"      = "https://github.com/pagopa/io-backend"
        }
        # (2 unchanged attributes hidden)
    }

Plan: 0 to add, 13 to change, 0 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...

@sonarqubecloud
Copy link

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.

1 participant