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
Sets the timestamp of the metrics. If not set, the current time of the client will be used.
268
+
Timestamp must meet CloudWatch requirements, otherwise a `InvalidTimestampException` will be thrown. See [Timestamps](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#about_timestamp) for valid values.
269
+
270
+
Example:
271
+
```c#
272
+
logger.SetTimestamp(DateTime.Now);
273
+
```
274
+
275
+
265
276
-**Flush**()
266
277
267
-
Flushes the current MetricsContext to the configured sink and resets all properties and metric values. The namespace and default dimensions will be preserved across flushes. Custom dimensions are preserved by default, but this behavior can be changed by setting `flushPreserveDimensions = false` on the metrics logger.
278
+
Flushes the current MetricsContext to the configured sink and resets all properties and metric values. The namespace and default dimensions will be preserved across flushes. Custom dimensions are preserved by default, but this behavior can be changed by setting `FlushPreserveDimensions = false` on the metrics logger.
268
279
269
280
Examples:
270
281
@@ -273,12 +284,12 @@ flush(); // default dimensions and custom dimensions will be preserved after ea
273
284
```
274
285
275
286
```c#
276
-
logger.setFlushPreserveDimensions=false;
287
+
logger.FlushPreserveDimensions=false;
277
288
flush(); // only default dimensions will be preserved after each flush()
278
289
```
279
290
280
291
```c#
281
-
setFlushPreserveDimensions(false);
282
-
resetDimensions(false); // default dimensions are disabled; no dimensions will be preserved after each flush()
283
-
flush();
292
+
logger.FlushPreserveDimensions=false;
293
+
logger.ResetDimensions(false); // default dimensions are disabled; no dimensions will be preserved after each flush()
0 commit comments