Skip to content

Commit

Permalink
add --start-time flag to docs
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Gardner <[email protected]>
  • Loading branch information
agardnerIT committed Jan 7, 2024
1 parent 3fe4044 commit 94aecac
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion docs/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
- [Insecure flag](insecure-flag.md)
- [Start Time flag](start-time-flag.md)
34 changes: 34 additions & 0 deletions docs/reference/start-time.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 94aecac

Please sign in to comment.