Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit dce3d1c

Browse files
Alexandcoatsgrtlr
Alexandcoats
andauthored
fix(analytics)!: correctly calculate alias and NFT analytics (#887)
* Fix output diff analytics * Remove foundry analytics for now * Remove from dashboard too Co-authored-by: Jochen Görtler <[email protected]>
1 parent 0cd627c commit dce3d1c

File tree

8 files changed

+521
-387
lines changed

8 files changed

+521
-387
lines changed

docker/assets/grafana/dashboards/analytics_dashboard.json

Lines changed: 0 additions & 208 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,214 +1462,6 @@
14621462
"title": "NFT Activity",
14631463
"type": "timeseries"
14641464
},
1465-
{
1466-
"datasource": {
1467-
"type": "influxdb",
1468-
"uid": "P951FEA4DE68E13C5"
1469-
},
1470-
"description": "",
1471-
"fieldConfig": {
1472-
"defaults": {
1473-
"color": {
1474-
"mode": "palette-classic"
1475-
},
1476-
"custom": {
1477-
"axisCenteredZero": false,
1478-
"axisColorMode": "text",
1479-
"axisLabel": "",
1480-
"axisPlacement": "auto",
1481-
"barAlignment": 0,
1482-
"drawStyle": "line",
1483-
"fillOpacity": 0,
1484-
"gradientMode": "none",
1485-
"hideFrom": {
1486-
"legend": false,
1487-
"tooltip": false,
1488-
"viz": false
1489-
},
1490-
"lineInterpolation": "stepAfter",
1491-
"lineWidth": 1,
1492-
"pointSize": 5,
1493-
"scaleDistribution": {
1494-
"type": "linear"
1495-
},
1496-
"showPoints": "auto",
1497-
"spanNulls": true,
1498-
"stacking": {
1499-
"group": "A",
1500-
"mode": "none"
1501-
},
1502-
"thresholdsStyle": {
1503-
"mode": "off"
1504-
}
1505-
},
1506-
"decimals": 0,
1507-
"mappings": [],
1508-
"thresholds": {
1509-
"mode": "absolute",
1510-
"steps": [
1511-
{
1512-
"color": "green",
1513-
"value": null
1514-
},
1515-
{
1516-
"color": "red",
1517-
"value": 80
1518-
}
1519-
]
1520-
}
1521-
},
1522-
"overrides": []
1523-
},
1524-
"gridPos": {
1525-
"h": 9,
1526-
"w": 12,
1527-
"x": 12,
1528-
"y": 28
1529-
},
1530-
"id": 23,
1531-
"options": {
1532-
"legend": {
1533-
"calcs": [],
1534-
"displayMode": "list",
1535-
"placement": "bottom",
1536-
"showLegend": true
1537-
},
1538-
"tooltip": {
1539-
"mode": "single",
1540-
"sort": "none"
1541-
}
1542-
},
1543-
"targets": [
1544-
{
1545-
"alias": "Minted",
1546-
"datasource": {
1547-
"type": "influxdb",
1548-
"uid": "P951FEA4DE68E13C5"
1549-
},
1550-
"groupBy": [
1551-
{
1552-
"params": [
1553-
"$__interval"
1554-
],
1555-
"type": "time"
1556-
},
1557-
{
1558-
"params": [
1559-
"null"
1560-
],
1561-
"type": "fill"
1562-
}
1563-
],
1564-
"measurement": "stardust_foundry_activity",
1565-
"orderByTime": "ASC",
1566-
"policy": "default",
1567-
"refId": "A",
1568-
"resultFormat": "time_series",
1569-
"select": [
1570-
[
1571-
{
1572-
"params": [
1573-
"created_count"
1574-
],
1575-
"type": "field"
1576-
},
1577-
{
1578-
"params": [],
1579-
"type": "sum"
1580-
}
1581-
]
1582-
],
1583-
"tags": []
1584-
},
1585-
{
1586-
"alias": "Transferred",
1587-
"datasource": {
1588-
"type": "influxdb",
1589-
"uid": "P951FEA4DE68E13C5"
1590-
},
1591-
"groupBy": [
1592-
{
1593-
"params": [
1594-
"$__interval"
1595-
],
1596-
"type": "time"
1597-
},
1598-
{
1599-
"params": [
1600-
"null"
1601-
],
1602-
"type": "fill"
1603-
}
1604-
],
1605-
"hide": false,
1606-
"measurement": "stardust_foundry_activity",
1607-
"orderByTime": "ASC",
1608-
"policy": "default",
1609-
"refId": "B",
1610-
"resultFormat": "time_series",
1611-
"select": [
1612-
[
1613-
{
1614-
"params": [
1615-
"transferred_count"
1616-
],
1617-
"type": "field"
1618-
},
1619-
{
1620-
"params": [],
1621-
"type": "sum"
1622-
}
1623-
]
1624-
],
1625-
"tags": []
1626-
},
1627-
{
1628-
"alias": "Burned",
1629-
"datasource": {
1630-
"type": "influxdb",
1631-
"uid": "P951FEA4DE68E13C5"
1632-
},
1633-
"groupBy": [
1634-
{
1635-
"params": [
1636-
"$__interval"
1637-
],
1638-
"type": "time"
1639-
},
1640-
{
1641-
"params": [
1642-
"null"
1643-
],
1644-
"type": "fill"
1645-
}
1646-
],
1647-
"hide": false,
1648-
"measurement": "stardust_foundry_activity",
1649-
"orderByTime": "ASC",
1650-
"policy": "default",
1651-
"refId": "D",
1652-
"resultFormat": "time_series",
1653-
"select": [
1654-
[
1655-
{
1656-
"params": [
1657-
"destroyed_count"
1658-
],
1659-
"type": "field"
1660-
},
1661-
{
1662-
"params": [],
1663-
"type": "sum"
1664-
}
1665-
]
1666-
],
1667-
"tags": []
1668-
}
1669-
],
1670-
"title": "Foundry Activity",
1671-
"type": "timeseries"
1672-
},
16731465
{
16741466
"collapsed": true,
16751467
"gridPos": {

src/db/collections/analytics/influx.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ impl InfluxDb {
4949
self.insert_analytics(milestone_timestamp, milestone_index, analytics.base_token),
5050
self.insert_analytics(milestone_timestamp, milestone_index, analytics.ledger_outputs),
5151
self.insert_analytics(milestone_timestamp, milestone_index, analytics.aliases),
52-
self.insert_analytics(milestone_timestamp, milestone_index, analytics.native_tokens),
5352
self.insert_analytics(milestone_timestamp, milestone_index, analytics.nfts),
5453
self.insert_analytics(milestone_timestamp, milestone_index, analytics.storage_deposits),
5554
self.insert_analytics(milestone_timestamp, milestone_index, analytics.unclaimed_tokens),

src/db/collections/analytics/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ pub struct Analytics {
2424
pub base_token: BaseTokenActivityAnalytics,
2525
pub ledger_outputs: LedgerOutputAnalytics,
2626
pub aliases: AliasActivityAnalytics,
27-
pub native_tokens: FoundryActivityAnalytics,
2827
pub nfts: NftActivityAnalytics,
2928
pub storage_deposits: LedgerSizeAnalytics,
3029
pub unclaimed_tokens: UnclaimedTokensAnalytics,
@@ -46,7 +45,6 @@ impl MongoDb {
4645
addresses,
4746
ledger_outputs,
4847
aliases,
49-
native_tokens,
5048
nfts,
5149
storage_deposits,
5250
unclaimed_tokens,
@@ -59,8 +57,7 @@ impl MongoDb {
5957
) = tokio::try_join!(
6058
output_collection.get_address_analytics(milestone_index),
6159
output_collection.get_ledger_output_analytics(milestone_index),
62-
output_collection.get_alias_output_tracker(milestone_index),
63-
output_collection.get_foundry_output_analytics(milestone_index),
60+
output_collection.get_alias_output_analytics(milestone_index),
6461
output_collection.get_nft_output_analytics(milestone_index),
6562
output_collection.get_ledger_size_analytics(milestone_index),
6663
output_collection.get_unclaimed_token_analytics(milestone_index),
@@ -80,7 +77,6 @@ impl MongoDb {
8077
base_token,
8178
ledger_outputs,
8279
aliases,
83-
native_tokens,
8480
nfts,
8581
storage_deposits,
8682
unclaimed_tokens,

0 commit comments

Comments
 (0)