From 94aecacdd96827a9fd4f3c7a073045b9fa33a37b Mon Sep 17 00:00:00 2001 From: Adam Gardner <26523841+agardnerIT@users.noreply.github.com> Date: Sun, 7 Jan 2024 12:51:28 +1000 Subject: [PATCH] add --start-time flag to docs Signed-off-by: Adam Gardner <26523841+agardnerIT@users.noreply.github.com> --- README.md | 12 ++++++++++-- docs/index.md | 3 ++- docs/reference/index.md | 3 ++- docs/reference/start-time.md | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 docs/reference/start-time.md diff --git a/README.md b/README.md index ff69be8..b671180 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ tracepusher users can set the status of the span (`OK`, `ERROR` or `UNSET`). Default is `OK`. -See [span status](docs/reference/span-status.md) page. +See [span status](https://agardnerit.github.io/tracepusher/reference/span-status) page. ## Insecure flag @@ -103,7 +103,15 @@ tracepusher users can set `--insecure [false|true]` to allow sending spans to `h Defaults to `false` but behaviour differs by version. -See [insecure flag](docs/reference/insecure-flag.md) for more info. +See [insecure flag](https://agardnerit.github.io/tracepusher/reference/insecure-flag) for more info. + +## Start Time + +> Only supported with `v0.10.0` and above. + +tracepusher users can (optionally) set the span start time using the `--start-time` flag. If unset, defaults to `now`. + +See [start time flag](https://agardnerit.github.io/tracepusher/reference/start-time-flag) for more info. ## Spin up OpenTelemetry Collector diff --git a/docs/index.md b/docs/index.md index dc87729..eec75e5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -56,5 +56,6 @@ See the following pages for advanced usage and reference information for the fla - [Span attributes and span attribute types](reference/span-attribute-types.md) - [Span events](reference/span-events.md) - [Span status](reference/span-status.md) -- [Insecure Flag](reference/insecure-flag.md) +- [Insecure flag](reference/insecure-flag.md) +- [Start time flag](reference/start-time.md) - [tracepusher flag reference pages](reference/index.md) diff --git a/docs/reference/index.md b/docs/reference/index.md index 0a33fbe..3b3de3d 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -13,4 +13,5 @@ - [Span Kind](span-kind.md) - [Span Durations and Duration Types](duration-type.md) - [Span Status](span-status.md) -- [Insecure flag](insecure-flag.md) \ No newline at end of file +- [Insecure flag](insecure-flag.md) +- [Start Time flag](start-time-flag.md) \ No newline at end of file diff --git a/docs/reference/start-time.md b/docs/reference/start-time.md new file mode 100644 index 0000000..d3fac7f --- /dev/null +++ b/docs/reference/start-time.md @@ -0,0 +1,34 @@ +## Start Time + +The optional flag `-st` or `--start-time` allows users to specify the span start time. + +If not specified, tracepusher assumes a start time of `now`. + +The two valid formats are: + +1) A 19 digit string representing milliseconds since the epoch: eg. 1700967916494000000 +2) "%Y-%m-%dT%H:%M:%S.%fZ" eg. "2023-11-26T03:05:16.844Z" + +## Example 1: Unix timestamp + +``` +./tracepusher \ + --endpoint http://localhost:4318 \ + --span-name spanOne \ + --service-name serviceOne \ + --duration 2 \ + --duration-type s \ + --start-time 1700967916494000000 +``` + +## Example 2: DateTime Format + +``` +./tracepusher \ + --endpoint http://localhost:4318 \ + --span-name spanOne \ + --service-name serviceOne \ + --duration 2 \ + --duration-type s \ + --start-time 2023-11-26T03:05:16.844Z +``` \ No newline at end of file