Skip to content

Commit

Permalink
fix(database/influxdb*): add type to link
Browse files Browse the repository at this point in the history
  • Loading branch information
genofire committed Jul 19, 2024
1 parent 631e81e commit 8e30a2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions database/influxdb/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func (conn *Connection) InsertLink(link *runtime.Link, t time.Time) {
tags.SetString("source.addr", link.SourceAddress)
tags.SetString("target.id", link.TargetID)
tags.SetString("target.addr", link.TargetAddress)
tags.SetString("type", link.Type.String())
if link.SourceHostname != "" {
tags.SetString("source.hostname", link.SourceHostname)
}
Expand Down
3 changes: 2 additions & 1 deletion database/influxdb2/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ func (conn *Connection) InsertLink(link *runtime.Link, t time.Time) {
AddTag("source.id", link.SourceID).
AddTag("source.addr", link.SourceAddress).
AddTag("target.id", link.TargetID).
AddTag("target.addr", link.TargetAddress)
AddTag("target.addr", link.TargetAddress).
AddTag("type", link.Type.String())
if link.SourceHostname != "" {
p.AddTag("source.hostname", link.SourceHostname)
}
Expand Down

0 comments on commit 8e30a2e

Please sign in to comment.