Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ erl_crash.dump
# Ignore package tarball (built via "mix hex.build").
graphql_api_assignment-*.tar

.cursor/

7 changes: 7 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ config :ecto_shorts,
config :graphql_api_assignment,
generators: [timestamp_type: :utc_datetime]

config :prometheus_telemetry,
default_millisecond_buckets: [100, 300, 500, 1000, 2000, 5000, 10_000],
default_microsecond_buckets: [50_000, 100_000, 250_000, 500_000, 750_000],
measurement_poll_period: :timer.seconds(10),
ecto_max_query_length: 150,
ecto_known_query_module: nil

# Configures the endpoint
config :graphql_api_assignment, GraphqlApiAssignmentWeb.Endpoint,
url: [host: "localhost"],
Expand Down
209 changes: 209 additions & 0 deletions grafana/custom/token_pipeline_export.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 3,
"links": [],
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "cedvl3fku3chsc"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": true,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"legend": {
"calcs": [
"sum"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.5.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cedvl3fku3chsc"
},
"editorMode": "code",
"expr": "rate(grapql_api_token_generation_duration_millisecond_bucket[1m])",
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Token Generation Duration",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "cedvl3fku3chsc"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 1,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.5.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cedvl3fku3chsc"
},
"editorMode": "code",
"expr": "grapql_api_token_generation_total_count",
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Total Session Tokens Generated",
"type": "gauge"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Token Pipeline",
"uid": "aedynclbhdg5cc",
"version": 2,
"weekStart": ""
}
Loading