Open alibresco opened 10 months ago
Yes it was added just for the default "json" format. I don't see where if would fit in the event format, could you explain how you intend to use it ?
Sure, I was thinking like:
$ gnmic subscribe --address $ADDRESS --mode once --path "system/config/hostname" --calculate-latency --format event
!! {"name":"default-1704901049","paths":["system/config/hostname"],"mode":"once"}
[
{
"name": "default-1704901049",
"timestamp": 1698699748523989703,
"recv-timestamp": 1704901052684658561,
"recv-time": "2024-01-10T10:37:32.684658561-05:00",
"latency-nano": 6201304160668858,
"latency-milli": 6201304160,
"tags": {
"source": "<ADDRESS>",
"subscription-name": "default-1704901049"
},
"values": {
"/system/config/hostname": "<ADDRESS>"
}
}
]
The use here for me is really in the recv-timestamp
field. I want to pass these events along a pipeline, and it would be helpful to know when the message was received by gnmic without needing to override the timestamp (so the previous timestamp is still accessible).
Running gnmic with the
--calculate-latency
flag does not seem to work work with--format event
.For example:
Is this intentional? Could the latency info be added to the event format?