Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new event types to application server #7269

Merged
merged 4 commits into from
Sep 2, 2024
Merged
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
45 changes: 45 additions & 0 deletions config/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -9989,6 +9989,15 @@
"file": "observability.go"
}
},
"event:as.down.data.ack.forward": {
"translations": {
"en": "forward downlink acknowledged"
},
"description": {
"package": "pkg/applicationserver",
"file": "observability.go"
}
},
"event:as.down.data.decode.fail": {
"translations": {
"en": "decode downlink data message failure"
Expand Down Expand Up @@ -10034,6 +10043,15 @@
"file": "observability.go"
}
},
"event:as.down.data.failed.forward": {
"translations": {
"en": "forward downlink failed"
},
"description": {
"package": "pkg/applicationserver",
"file": "observability.go"
}
},
"event:as.down.data.forward": {
"translations": {
"en": "forward downlink data message"
Expand All @@ -10043,6 +10061,24 @@
"file": "observability.go"
}
},
"event:as.down.data.nack.forward": {
"translations": {
"en": "forward downlink not acknowledged"
},
"description": {
"package": "pkg/applicationserver",
"file": "observability.go"
}
},
"event:as.down.data.queue.invalidated.forward": {
"translations": {
"en": "forward downlink queue invalidated"
},
"description": {
"package": "pkg/applicationserver",
"file": "observability.go"
}
},
"event:as.down.data.receive": {
"translations": {
"en": "receive downlink data message"
Expand All @@ -10052,6 +10088,15 @@
"file": "observability.go"
}
},
"event:as.down.data.sent.forward": {
"translations": {
"en": "forward downlink sent"
},
"description": {
"package": "pkg/applicationserver",
"file": "observability.go"
}
},
"event:as.end_device.batch.delete": {
"translations": {
"en": "batch delete end devices"
Expand Down
40 changes: 40 additions & 0 deletions pkg/applicationserver/observability.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,36 @@ var (
events.WithDataType(&ttnpb.ApplicationDownlink{}),
events.WithPropagateToParent(),
)
evtForwardDownlinkQueueInvalidated = events.Define(
"as.down.data.queue.invalidated.forward", "forward downlink queue invalidated",
events.WithVisibility(ttnpb.Right_RIGHT_APPLICATION_TRAFFIC_READ),
events.WithDataType(&ttnpb.ApplicationUp{}),
events.WithPropagateToParent(),
)
evtForwardDownlinkFailed = events.Define(
"as.down.data.failed.forward", "forward downlink failed",
events.WithVisibility(ttnpb.Right_RIGHT_APPLICATION_TRAFFIC_READ),
events.WithDataType(&ttnpb.ApplicationUp{}),
events.WithPropagateToParent(),
)
evtForwardDownlinkSent = events.Define(
"as.down.data.sent.forward", "forward downlink sent",
events.WithVisibility(ttnpb.Right_RIGHT_APPLICATION_TRAFFIC_READ),
events.WithDataType(&ttnpb.ApplicationUp{}),
events.WithPropagateToParent(),
)
evtForwardDownlinkAck = events.Define(
"as.down.data.ack.forward", "forward downlink acknowledged",
events.WithVisibility(ttnpb.Right_RIGHT_APPLICATION_TRAFFIC_READ),
events.WithDataType(&ttnpb.ApplicationUp{}),
events.WithPropagateToParent(),
)
evtForwardDownlinkNack = events.Define(
"as.down.data.nack.forward", "forward downlink not acknowledged",
events.WithVisibility(ttnpb.Right_RIGHT_APPLICATION_TRAFFIC_READ),
events.WithDataType(&ttnpb.ApplicationUp{}),
events.WithPropagateToParent(),
)
)

const (
Expand Down Expand Up @@ -283,6 +313,16 @@ func registerForwardUp(ctx context.Context, msg *ttnpb.ApplicationUp) {
events.Publish(evtForwardLocationSolved.NewWithIdentifiersAndData(ctx, msg.EndDeviceIds, msg))
case *ttnpb.ApplicationUp_ServiceData:
events.Publish(evtForwardServiceData.NewWithIdentifiersAndData(ctx, msg.EndDeviceIds, msg))
case *ttnpb.ApplicationUp_DownlinkQueueInvalidated:
events.Publish(evtForwardDownlinkQueueInvalidated.NewWithIdentifiersAndData(ctx, msg.EndDeviceIds, msg))
case *ttnpb.ApplicationUp_DownlinkFailed:
events.Publish(evtForwardDownlinkFailed.NewWithIdentifiersAndData(ctx, msg.EndDeviceIds, msg))
case *ttnpb.ApplicationUp_DownlinkSent:
events.Publish(evtForwardDownlinkSent.NewWithIdentifiersAndData(ctx, msg.EndDeviceIds, msg))
case *ttnpb.ApplicationUp_DownlinkAck:
events.Publish(evtForwardDownlinkAck.NewWithIdentifiersAndData(ctx, msg.EndDeviceIds, msg))
case *ttnpb.ApplicationUp_DownlinkNack:
events.Publish(evtForwardDownlinkNack.NewWithIdentifiersAndData(ctx, msg.EndDeviceIds, msg))
default:
return
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/webui/locales/ja.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

Check warning on line 1 in pkg/webui/locales/ja.json

View workflow job for this annotation

GitHub Actions / Check Mergeability

pkg/webui/locales/ja.json has a conflict when merging TheThingsIndustries/lorawan-stack:v3.32.
"account.components.oauth-client-form.messages.clientIdPlaceholder": "my-new-oauth-client",
"account.components.oauth-client-form.messages.clientNamePlaceholder": "私の新しいOAuthクライアント",
"account.components.oauth-client-form.messages.clientDescPlaceholder": "新しいOAuthクライアントに関する説明",
Expand Down Expand Up @@ -2706,13 +2706,18 @@
"event:application.update": "アプリケーションを更新",
"event:as.application.subscribe": "アプリケーションに登録",
"event:as.application.unsubscribe": "アプリケーションから退出",
"event:as.down.data.ack.forward": "",
"event:as.down.data.decode.fail": "ダウンリンクデータメッセージのデコード失敗",
"event:as.down.data.decode.warning": "ダウンリンクデータメッセージのデコード警告",
"event:as.down.data.drop": "ダウンリンクデータメッセージをドロップ",
"event:as.down.data.encode.fail": "ダウンリンクデータメッセージのエンコード失敗",
"event:as.down.data.encode.warning": "ダウンリンクデータメッセージのエンコード警告",
"event:as.down.data.failed.forward": "",
"event:as.down.data.forward": "ダウンリンクデータメッセージの転送",
"event:as.down.data.nack.forward": "",
"event:as.down.data.queue.invalidated.forward": "",
"event:as.down.data.receive": "ダウンリンクデータメッセージを受信",
"event:as.down.data.sent.forward": "",
"event:as.end_device.batch.delete": "エンドデバイスをバッチ削除",
"event:as.end_device.create": "エンドデバイスの作成",
"event:as.end_device.delete": "エンドデバイスの削除",
Expand Down
Loading