diff --git a/plaid/assets/dashboards/plaid_overview.json b/plaid/assets/dashboards/plaid_overview.json new file mode 100644 index 0000000000000..71fc8288c819d --- /dev/null +++ b/plaid/assets/dashboards/plaid_overview.json @@ -0,0 +1,685 @@ +{ + "title": "Plaid Dashboard", + "description": "[[suggested_dashboards]]", + "widgets": [ + { + "id": 3400095124075958, + "definition": { + "type": "image", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Plaid_logo.svg/1024px-Plaid_logo.svg.png", + "sizing": "cover", + "has_background": true, + "has_border": true, + "vertical_align": "center", + "horizontal_align": "center" + }, + "layout": { + "x": 0, + "y": 0, + "width": 6, + "height": 2 + } + }, + { + "id": 8042867912922960, + "definition": { + "title": "Overview", + "background_color": "vivid_purple", + "show_title": true, + "type": "group", + "layout_type": "ordered", + "widgets": [ + { + "id": 8289666179599236, + "definition": { + "title": "Total Events", + "title_size": "16", + "title_align": "left", + "type": "query_value", + "requests": [ + { + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:plaid_logs" + }, + "storage": "hot" + } + ], + "response_format": "scalar" + } + ], + "autoscale": true, + "precision": 2 + }, + "layout": { + "x": 0, + "y": 0, + "width": 6, + "height": 2 + } + }, + { + "id": 5495912710157440, + "definition": { + "title": "Transfer Error Count", + "title_size": "16", + "title_align": "left", + "type": "query_value", + "requests": [ + { + "formulas": [ + { + "formula": "query2" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query2", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:plaid_logs @failure_reason.description:*" + }, + "storage": "hot" + } + ], + "response_format": "scalar" + } + ], + "autoscale": true, + "precision": 2, + "timeseries_background": { + "yaxis": { + "include_zero": true + }, + "type": "area" + } + }, + "layout": { + "x": 0, + "y": 2, + "width": 3, + "height": 3 + } + }, + { + "id": 2734456775436858, + "definition": { + "title": "Transaction Error Rate (%)", + "title_size": "16", + "title_align": "left", + "type": "query_value", + "requests": [ + { + "formulas": [ + { + "formula": "(query1 / query2) * 100" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:plaid_logs @failure_reason.description:*" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query2", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:plaid_logs" + }, + "storage": "hot" + } + ], + "response_format": "scalar" + } + ], + "autoscale": true, + "precision": 2, + "timeseries_background": { + "type": "area", + "yaxis": { + "include_zero": true + } + } + }, + "layout": { + "x": 3, + "y": 2, + "width": 3, + "height": 3 + } + }, + { + "id": 6974604515654690, + "definition": { + "title": "Description along with Failure reason", + "title_size": "16", + "title_align": "left", + "requests": [ + { + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@description", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + }, + { + "facet": "@failure_reason.description", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:plaid_logs @failure_reason.description:*" + }, + "storage": "hot" + } + ], + "style": { + "palette": "classic" + }, + "sort": { + "count": 500, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "type": "sunburst", + "legend": { + "type": "automatic" + } + }, + "layout": { + "x": 0, + "y": 5, + "width": 6, + "height": 4 + } + } + ] + }, + "layout": { + "x": 6, + "y": 0, + "width": 6, + "height": 10 + } + }, + { + "id": 7753683597743458, + "definition": { + "type": "note", + "content": "Plaid specializes in financial technology by offering APIs that allow developers to integrate banking services into their applications. By connecting users' bank accounts to apps, Plaid enables features like account verification, transaction history retrieval, and balance checks. This functionality is crucial for various applications, including budgeting tools, personal finance management, and payment processing.", + "background_color": "transparent", + "font_size": "14", + "text_align": "left", + "vertical_align": "center", + "show_tick": false, + "tick_pos": "50%", + "tick_edge": "left", + "has_padding": true + }, + "layout": { + "x": 0, + "y": 2, + "width": 6, + "height": 2 + } + }, + { + "id": 7101223040909356, + "definition": { + "title": "All Plaid Logs", + "title_size": "16", + "title_align": "left", + "requests": [ + { + "query": { + "query_string": "source:plaid_logs", + "sort": { + "column": "timestamp", + "order": "desc" + }, + "data_source": "logs_stream", + "storage": "hot", + "indexes": [] + }, + "response_format": "event_list", + "columns": [ + { + "field": "status_line", + "width": "auto" + }, + { + "field": "timestamp", + "width": "auto" + }, + { + "field": "content", + "width": "compact" + } + ] + } + ], + "type": "list_stream" + }, + "layout": { + "x": 0, + "y": 4, + "width": 6, + "height": 6 + } + }, + { + "id": 5352405555753252, + "definition": { + "title": "Networks Used", + "title_size": "16", + "title_align": "left", + "requests": [ + { + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@network", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:plaid_logs" + }, + "storage": "hot" + } + ], + "style": { + "palette": "datadog16" + }, + "sort": { + "count": 500, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "type": "sunburst", + "legend": { + "type": "automatic" + } + }, + "layout": { + "x": 0, + "y": 0, + "width": 6, + "height": 4, + "is_column_break": true + } + }, + { + "id": 4936592794883656, + "definition": { + "title": "Status Distribution", + "title_size": "16", + "title_align": "left", + "requests": [ + { + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@status", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:plaid_logs" + }, + "storage": "hot" + } + ], + "style": { + "palette": "datadog16" + }, + "sort": { + "count": 500, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "type": "sunburst", + "legend": { + "type": "automatic" + } + }, + "layout": { + "x": 6, + "y": 0, + "width": 6, + "height": 4 + } + }, + { + "id": 2256059020192036, + "definition": { + "title": "Unswept Status Rate (%)", + "title_size": "16", + "title_align": "left", + "type": "query_value", + "requests": [ + { + "formulas": [ + { + "formula": "(query1 / query2) * 100", + "number_format": { + "unit": { + "type": "canonical_unit", + "unit_name": "percent" + } + } + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:plaid_logs @sweep_status:unswept" + }, + "storage": "hot" + }, + { + "data_source": "logs", + "name": "query2", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [], + "search": { + "query": "source:plaid_logs @sweep_status:*" + }, + "storage": "hot" + } + ], + "response_format": "scalar" + } + ], + "autoscale": true, + "precision": 2, + "timeseries_background": { + "type": "area", + "yaxis": { + "include_zero": true + } + } + }, + "layout": { + "x": 0, + "y": 4, + "width": 3, + "height": 3 + } + }, + { + "id": 8461972634481036, + "definition": { + "title": "Types of Transfer", + "title_size": "16", + "title_align": "left", + "requests": [ + { + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@type", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:plaid_logs" + }, + "storage": "hot" + } + ], + "style": { + "palette": "datadog16" + }, + "sort": { + "count": 500, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "type": "sunburst", + "legend": { + "type": "automatic" + } + }, + "layout": { + "x": 3, + "y": 4, + "width": 5, + "height": 3 + } + }, + { + "id": 5682008564150520, + "definition": { + "title": "Different Currency Used", + "title_size": "16", + "title_align": "left", + "requests": [ + { + "response_format": "scalar", + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "logs", + "name": "query1", + "indexes": [ + "*" + ], + "compute": { + "aggregation": "count" + }, + "group_by": [ + { + "facet": "@iso_currency_code", + "limit": 10, + "sort": { + "order": "desc", + "aggregation": "count" + } + } + ], + "search": { + "query": "source:plaid_logs" + }, + "storage": "hot" + } + ], + "style": { + "palette": "datadog16" + }, + "sort": { + "count": 500, + "order_by": [ + { + "type": "formula", + "index": 0, + "order": "desc" + } + ] + } + } + ], + "type": "sunburst", + "legend": { + "type": "automatic" + } + }, + "layout": { + "x": 8, + "y": 4, + "width": 4, + "height": 3 + } + } + ], + "template_variables": [], + "layout_type": "ordered", + "notify_list": [], + "reflow_type": "fixed" +} \ No newline at end of file diff --git a/plaid/assets/logs/plaid.yaml b/plaid/assets/logs/plaid.yaml new file mode 100644 index 0000000000000..f0e475c139f71 --- /dev/null +++ b/plaid/assets/logs/plaid.yaml @@ -0,0 +1,37 @@ +id: plaid +# See app_id in your integration's manifest.json file to learn more: +# https://docs.datadoghq.com/developers/integrations/check_references/#manifest-file +metric_id: plaid +# If for some reason id must be different than app_id, add the app_id in this field instead. +# If id and app_id already match, this field can be left blank. +backend_only: false +facets: + - facetType: list + groups: + - Plaid + name: Account id + path: plaid_account_id + source: log + type: string +pipeline: + type: pipeline + name: plaid_logs + enabled: true + filter: + query: "source:plaid" + processors: + - type: attribute-remapper + name: "Map `created` to `timestamp`" + enabled: true + sources: + - created + sourceType: attribute + target: timestamp + targetType: attribute + preserveSource: true + overrideOnConflict: false + - type: date-remapper + name: "Define `timestamp` as the official date of the log" + enabled: true + sources: + - timestamp diff --git a/plaid/assets/logs/plaid_tests.yaml b/plaid/assets/logs/plaid_tests.yaml new file mode 100644 index 0000000000000..b11b574c44239 --- /dev/null +++ b/plaid/assets/logs/plaid_tests.yaml @@ -0,0 +1,77 @@ +id: "plaid" +tests: + - + sample: |- + { + "amount" : "12.34", + "authorization_id" : "128ff9dc-6634-22f3-a8d7-0902fc8dd99a", + "created" : "2024-12-20T12:04:24.386329Z", + "description" : "posted", + "type" : "debit", + "cancellable" : false, + "standard_return_window" : "2024-12-26", + "network" : "ach", + "originator_client_id" : "66d5881a2972360019c5e068", + "sweep_status" : "unswept", + "account_id" : "dLaW3JympPiWRaz9NGPwUB98VNmDPLcJ3AXxr", + "ach_class" : "ppd", + "iso_currency_code" : "USD", + "origination_account_id" : "", + "unauthorized_return_window" : "2025-03-21", + "id" : "6ed7708c-9e7a-9a79-13fc-a65e2f771a76", + "ledger_id" : "4b15ee7e-a39f-4c94-a84e-bfa3982a7737", + "user" : { + "legal_name" : "Anne Charleston" + }, + "status" : "posted" + } + result: + custom: + account_id: "dLaW3JympPiWRaz9NGPwUB98VNmDPLcJ3AXxr" + ach_class: "ppd" + amount: "12.34" + authorization_id: "128ff9dc-6634-22f3-a8d7-0902fc8dd99a" + cancellable: false + created: "2024-12-20T12:04:24.386329Z" + description: "posted" + id: "6ed7708c-9e7a-9a79-13fc-a65e2f771a76" + iso_currency_code: "USD" + ledger_id: "4b15ee7e-a39f-4c94-a84e-bfa3982a7737" + network: "ach" + origination_account_id: "" + originator_client_id: "66d5881a2972360019c5e068" + standard_return_window: "2024-12-26" + status: "posted" + sweep_status: "unswept" + timestamp: "2024-12-20T12:04:24.386329Z" + type: "debit" + unauthorized_return_window: "2025-03-21" + user: + legal_name: "Anne Charleston" + message: |- + { + "amount" : "12.34", + "authorization_id" : "128ff9dc-6634-22f3-a8d7-0902fc8dd99a", + "created" : "2024-12-20T12:04:24.386329Z", + "description" : "posted", + "type" : "debit", + "cancellable" : false, + "standard_return_window" : "2024-12-26", + "network" : "ach", + "originator_client_id" : "66d5881a2972360019c5e068", + "sweep_status" : "unswept", + "account_id" : "dLaW3JympPiWRaz9NGPwUB98VNmDPLcJ3AXxr", + "ach_class" : "ppd", + "iso_currency_code" : "USD", + "origination_account_id" : "", + "unauthorized_return_window" : "2025-03-21", + "id" : "6ed7708c-9e7a-9a79-13fc-a65e2f771a76", + "ledger_id" : "4b15ee7e-a39f-4c94-a84e-bfa3982a7737", + "user" : { + "legal_name" : "Anne Charleston" + }, + "status" : "posted" + } + tags: + - "source:LOGS_SOURCE" + timestamp: 1734696264386 \ No newline at end of file diff --git a/plaid/assets/plaid_logo.svg b/plaid/assets/plaid_logo.svg new file mode 100644 index 0000000000000..aee9579266b23 --- /dev/null +++ b/plaid/assets/plaid_logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/plaid/images/plaid_other_logs.png b/plaid/images/plaid_other_logs.png new file mode 100644 index 0000000000000..888f8e41bb2d2 Binary files /dev/null and b/plaid/images/plaid_other_logs.png differ diff --git a/plaid/images/plaid_overview.png b/plaid/images/plaid_overview.png new file mode 100644 index 0000000000000..9eb80998ad432 Binary files /dev/null and b/plaid/images/plaid_overview.png differ diff --git a/plaid/manifest.json b/plaid/manifest.json index 695580a4b390a..87668cecf5ef0 100644 --- a/plaid/manifest.json +++ b/plaid/manifest.json @@ -1,47 +1,53 @@ { - "manifest_version": "2.0.0", - "app_uuid": "104e8e43-bf5b-44f1-8ef3-76ad53a39c05", - "app_id": "plaid", - "display_on_public_website": false, - "tile": { - "overview": "README.md#Overview", - "configuration": "README.md#Setup", - "support": "README.md#Support", - "changelog": "CHANGELOG.md", - "description": "Gain insights into Plaid logs.", - "title": "Plaid", - "media": [], - "classifier_tags": [ - "Category::Log Collection", - "Offering::Integration", - "Submitted Data Type::Logs" - ] - }, - "assets": { - "integration": { - "auto_install": true, - "source_type_id": 30173459, - "source_type_name": "plaid", - "events": { - "creates_events": false - }, - "metrics": { - "prefix": "plaid.", - "check": "", - "metadata_path": "metadata.csv" - }, - "service_checks": { - "metadata_path": "assets/service_checks.json" + "manifest_version": "2.0.0", + "app_uuid": "104e8e43-bf5b-44f1-8ef3-76ad53a39c05", + "app_id": "plaid", + "display_on_public_website": false, + "tile": { + "overview": "README.md#Overview", + "configuration": "README.md#Setup", + "support": "README.md#Support", + "changelog": "CHANGELOG.md", + "description": "Gain insights into Plaid logs.", + "title": "Plaid", + "media": [ + { + "media_type": "image", + "caption": "Overview of Plaid Logs", + "image_url": "images/plaid_overview.png" + }, + { + "media_type": "image", + "caption": "Overview of other logs visualized", + "image_url": "images/plaid_other_logs.png" } - } + ], + "classifier_tags": [ + "Category::Log Collection", + "Offering::Integration", + "Submitted Data Type::Logs" + ] }, - "author": { - "support_email": "help@datadoghq.com", - "name": "Datadog", - "homepage": "https://www.datadoghq.com", - "sales_email": "info@datadoghq.com" + "assets": { + "integration": { + "auto_install": true, + "source_type_id": 30173459, + "source_type_name": "plaid", + "events": { + "creates_events": false + }, + "service_checks": { + "metadata_path": "assets/service_checks.json" } + }, + "dashboards": { + "Plaid logs Overview": "assets/dashboards/plaid_overview.json" + } +}, + "author": { + "support_email": "help@datadoghq.com", + "name": "Datadog", + "homepage": "https://www.datadoghq.com", + "sales_email": "info@datadoghq.com" + } } - - - \ No newline at end of file diff --git a/plaid/metadata.csv b/plaid/metadata.csv deleted file mode 100644 index 02cde5e98381e..0000000000000 --- a/plaid/metadata.csv +++ /dev/null @@ -1 +0,0 @@ -metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags