Skip to content

Commit

Permalink
Merge pull request #9 from keyko-io/feature/timeseries-schema
Browse files Browse the repository at this point in the history
Add timeseries schema
  • Loading branch information
aaitor authored Feb 25, 2020
2 parents 09c3b11 + 4353ba8 commit 090d700
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>io.keyko.monitoring</groupId>
<artifactId>schemas</artifactId>
<packaging>jar</packaging>
<version>0.2.3</version>
<version>0.2.4</version>
<name>Web3 Monitoring Schemas</name>
<url>https://github.com/keyko-io/web3-monitoring-schemas</url>

Expand Down
19 changes: 19 additions & 0 deletions src/main/resources/avro/TimeSeriesParameter.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"namespace": "io.keyko.monitoring.schemas",
"type": "record",
"name": "TimeSeriesParameter",
"fields": [{
"name": "value",
"type": ["null","string"]
},
{
"name": "numberValue",
"type": "long",
"default": 0
},
{
"name": "label",
"type": ["null","string"]
}
]
}
65 changes: 65 additions & 0 deletions src/main/resources/avro/TimeSeriesRecord.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"namespace": "io.keyko.monitoring.schemas",
"type": "record",
"name": "TimeSeriesRecord",
"fields": [
{
"name": "blockNumber",
"type": "long"
},
{
"name": "timestamp",
"type": "long",
"logicalType": "timestamp-millis"
},
{
"name": "methodName",
"type": "string"
},
{
"name": "contractName",
"type": "string"
},
{
"name": "param_0",
"type": ["null","TimeSeriesParameter"]
},
{
"name": "param_1",
"type": ["null","TimeSeriesParameter"]
},
{
"name": "param_2",
"type": ["null","TimeSeriesParameter"]
},
{
"name": "param_3",
"type": ["null","TimeSeriesParameter"]
},
{
"name": "param_4",
"type": ["null","TimeSeriesParameter"]
},
{
"name": "param_5",
"type": ["null","TimeSeriesParameter"]
},
{
"name": "param_6",
"type": ["null","TimeSeriesParameter"]
},
{
"name": "param_7",
"type": ["null","TimeSeriesParameter"]
},
{
"name": "param_8",
"type": ["null","TimeSeriesParameter"]
},
{
"name": "param_9",
"type": ["null","TimeSeriesParameter"]
}

]
}

0 comments on commit 090d700

Please sign in to comment.