Skip to content

Commit

Permalink
Use map mandatory key notation in the telemetry docs
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Dec 1, 2023
1 parent b0f0f49 commit 5ecee37
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions guides/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ A telemetry span of a full scenario execution globally (i.e. the exported `init/
```erlang
event_name: [amoc, scenario, run, _]
measurements: #{} %% As described in `telemetry:span/3`
metadata: #{scenario => module()} %% Plus as described in `telemetry:span/3`
metadata: #{scenario := module()} %% Plus as described in `telemetry:span/3`
```

A telemetry span of a full scenario execution for a user (i.e. the exported `start/1,2` function):
```erlang
event_name: [amoc, scenario, user, _]
measurements: #{} %% As described in `telemetry:span/3`
metadata: #{scenario => module(),
user_id => non_neg_integer()} %% Plus as described in `telemetry:span/3`
metadata: #{scenario := module(),
user_id := non_neg_integer()} %% Plus as described in `telemetry:span/3`
```

## Controller

Indicates the number of users manually added or removed
```erlang
event_name: [amoc, controller, users]
measurements: #{count => non_neg_integer()}
metadata: #{monotonic_time => integer(), scenario => module(), type => add | remove}
measurements: #{count := non_neg_integer()}
metadata: #{monotonic_time := integer(), scenario := module(), type := add | remove}
```

## Throttle
Expand All @@ -33,8 +33,8 @@ metadata: #{monotonic_time => integer(), scenario => module(), type => add | rem
Raised when a throttle mechanism is initialised.
```erlang
event_name: [amoc, throttle, init]
measurements: #{count => 1}
metadata: #{monotonic_time => integer(), name => atom()}
measurements: #{count := 1}
metadata: #{monotonic_time := integer(), name := atom()}
```

### Rate
Expand All @@ -43,8 +43,8 @@ Raised when a throttle mechanism is initialised or its configured rate is change
This event is raised only on the master node.
```erlang
event_name: [amoc, throttle, rate]
measurements: #{rate => non_neg_integer()}
metadata: #{monotonic_time => integer(), name => atom()}
measurements: #{rate := non_neg_integer()}
metadata: #{monotonic_time := integer(), name := atom(), msg => binary()}
```

### Request
Expand All @@ -53,8 +53,8 @@ Raised when a process client requests to be allowed pass through a throttled mec
This event is raised only on the master node.
```erlang
event_name: [amoc, throttle, request]
measurements: #{count => 1}
metadata: #{monotonic_time => integer(), name => atom()}
measurements: #{count := 1}
metadata: #{monotonic_time := integer(), name := atom()}
```

### Execute
Expand All @@ -63,8 +63,8 @@ Raised when a process client is allowed to execute after a throttled mechanism.
This event is raised only on the master node.
```erlang
event_name: [amoc, throttle, execute]
measurements: #{count => 1}
metadata: #{monotonic_time => integer(), name => atom()}
measurements: #{count := 1}
metadata: #{monotonic_time := integer(), name := atom()}
```

### Throttle process internals
Expand All @@ -84,8 +84,8 @@ Indicates when a coordinating event was raised, like a process being added for c
### Event
```erlang
event_name: [amoc, coordinator, start | stop | add | reset | timeout]
measurements: #{count => 1}
metadata: #{monotonic_time => integer(), name => atom()}
measurements: #{count := 1}
metadata: #{monotonic_time := integer(), name := atom()}
```

## Config
Expand Down

0 comments on commit 5ecee37

Please sign in to comment.