Skip to content

Commit 7499cce

Browse files
committed
refactor: add instrument to base event
1 parent 2546d44 commit 7499cce

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

src/main/kotlin/spp/protocol/instrument/event/LiveInstrumentAdded.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import java.time.Instant
3030
*/
3131
@DataObject
3232
data class LiveInstrumentAdded(
33-
val instrument: LiveInstrument,
33+
override val instrument: LiveInstrument,
3434
override val occurredAt: Instant = Instant.now()
3535
) : LiveInstrumentEvent {
3636
override val eventType: LiveInstrumentEventType

src/main/kotlin/spp/protocol/instrument/event/LiveInstrumentApplied.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import java.time.Instant
3030
*/
3131
@DataObject
3232
data class LiveInstrumentApplied(
33-
val instrument: LiveInstrument,
33+
override val instrument: LiveInstrument,
3434
override val occurredAt: Instant
3535
) : LiveInstrumentEvent {
3636
override val eventType: LiveInstrumentEventType

src/main/kotlin/spp/protocol/instrument/event/LiveInstrumentEvent.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package spp.protocol.instrument.event
1818

1919
import io.vertx.core.json.JsonObject
20+
import spp.protocol.instrument.LiveInstrument
2021
import spp.protocol.instrument.event.LiveInstrumentEventType.*
2122
import java.time.Instant
2223

@@ -28,6 +29,7 @@ import java.time.Instant
2829
*/
2930
interface LiveInstrumentEvent {
3031

32+
val instrument: LiveInstrument
3133
val occurredAt: Instant
3234
val eventType: LiveInstrumentEventType
3335

src/main/kotlin/spp/protocol/instrument/event/LiveInstrumentHit.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import spp.protocol.instrument.LiveInstrument
2525
* @author [Brandon Fergerson](mailto:bfergerson@apache.org)
2626
*/
2727
interface LiveInstrumentHit : LiveInstrumentEvent {
28-
val instrument: LiveInstrument
28+
override val instrument: LiveInstrument
2929
val serviceInstance: String
3030
val service: String
3131
}

src/main/kotlin/spp/protocol/instrument/event/LiveInstrumentRemoved.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import java.time.Instant
3131
*/
3232
@DataObject
3333
data class LiveInstrumentRemoved(
34-
val instrument: LiveInstrument,
34+
override val instrument: LiveInstrument,
3535
override val occurredAt: Instant,
3636
val cause: LiveStackTrace? = null
3737
) : LiveInstrumentEvent {

0 commit comments

Comments
 (0)