You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/measuring/usage-scenario.md
+21-17Lines changed: 21 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,15 +129,17 @@ services:
129
129
+ Declares the default entrypoint for the service container. This overrides the ENTRYPOINT instruction from the service's Dockerfile.
130
130
+ The value of `entrypoint` can either be an empty string (ENTRYPOINT instruction will be ignored) or a single word (helpful to provide a script).
131
131
+ If you need an entrypoint that consists of multiple commands/arguments, either provide a script (e.g. `entrypoint.sh`) or set it to an empty string and provide your commands via `command`.
132
-
- `log-stdout:`**[boolean]** *(optional)*
133
-
+ Will log the *stdout* and make it available through the frontend in the *Logs* tab.
134
-
+ Please see the [Best Practices →]({{< relref "best-practices" >}}) for when and how to log.
135
-
- `log-stderr:`**[boolean]** *(optional)*
136
-
+ Will log the *stderr* and make it available through the frontend in the *Logs* tab and in error messages.
137
-
+ Please see the [Best Practices →]({{< relref "best-practices" >}}) for when and how to log.
+ Will log the *stderr* of the container and make it available through the frontend in the *Logs* tab and in error messages.
137
+
+ Please see the [Best Practices →]({{< relref "best-practices" >}}) for when to disable the logging.
138
138
- `read-notes-stdout:`**[bool]** *(optional)*
139
-
+ Read notes from *stdout*. Most likely you do not need this, as it also requires customization of your application (writing of a log message in a specific format). It may be helpful if your application has asynchronous operations and you want to know when they have finished.
140
-
+ Make sure to also set `log-stdout` to `true`. Format specification is documented below in section [Read-notes-stdout format specification →]({{< relref "#read-notes-stdout-format-specification" >}}).
139
+
+ Read notes from *stdout* of the container.
140
+
+ Most likely you do not need this, as it also requires customization of your application (writing of a log message in a specific format). It may be helpful if your application has asynchronous operations and you want to know when they have finished. In most cases, it is more appropriate to read the notes from the command's *stdout* in your flow (see below).
141
+
+ Note that `log-stdout` has to be enabled (it is the default).
142
+
+ Format specification is documented below in section [Read-notes-stdout format specification →]({{< relref "#read-notes-stdout-format-specification" >}}).
141
143
- `read-sci-stdout:`**[bool]** *(optional)*
142
144
+ Enables the reading of ticks for the unit of work (*R*) required to calculate the SCI metric.
143
145
+ Please see [Software Carbon Intensity (SCI) →]({{< relref "carbon/sci" >}}) for more information.
@@ -195,7 +197,7 @@ flow:
195
197
+ `console` will execute a shell command inside the container
196
198
- `command:`**[str]**
197
199
+ The command to be executed. If type is `console` then piping or moving to background is not supported.
+ When the command is detached it will get sent to the background. This allows to run commands in parallel if needed, for instance if you want to stress the DB in parallel with a web request
200
202
- `note:`**[str]** *(optional)*
201
203
+ A string that will appear as note attached to the datapoint of measurement (optional)
@@ -205,15 +207,17 @@ flow:
205
207
- `shell:`**[str]** *(optional)*
206
208
+ Will execute the `command` in a shell. Use this if you need shell-mechanics like redirection `>` or chaining `&&`.
207
209
+ Please use a string for a shell command here like `sh`, `bash`, `ash` etc. The shell must be available in your container
208
-
- `log-stdout:`**[boolean]** *(optional)*
209
-
+ Will log the *stdout* and make it available through the frontend in the *Logs* tab.
210
-
+ Please see the [Best Practices →]({{< relref "best-practices" >}}) for when and how to log.
211
-
- `log-stderr:`**[boolean]** *(optional)*
212
-
+ Will log the *stderr* and make it available through the frontend in the *Logs* tab and in error messages.
213
-
+ Please see the [Best Practices →]({{< relref "best-practices" >}}) for when and how to log.
+ Will log the *stderr* of the command and make it available through the frontend in the *Logs* tab and in error messages.
215
+
+ Please see the [Best Practices →]({{< relref "best-practices" >}}) for when to disable the logging.
214
216
- `read-notes-stdout:`**[bool]** *(optional)*
215
-
+ Read notes from the *stdout* of the command. This is helpful if you have a long running command that does multiple steps and you want to log every step.
216
-
+ Make sure to also set `log-stdout` to `true`. Format specification is documented below in section [Read-notes-stdout format specification →]({{< relref "#read-notes-stdout-format-specification" >}}).
217
+
+ Read notes from the *stdout* of the command.
218
+
+ This is helpful if you have a long running command that does multiple steps and you want to log every step.
219
+
+ Note that `log-stdout` has to be enabled (it is the default).
220
+
+ Format specification is documented below in section [Read-notes-stdout format specification →]({{< relref "#read-notes-stdout-format-specification" >}}).
217
221
- `read-sci-stdout:`**[bool]** *(optional)*
218
222
+ Enables the reading of ticks for the unit of work (*R*) required to calculate the SCI metric.
219
223
+ Please see [Software Carbon Intensity (SCI) →]({{< relref "carbon/sci" >}}) for more information.
0 commit comments