Skip to content

Commit

Permalink
Remove all timestamp processor references
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerHelmuth committed Apr 11, 2024
1 parent 81c7a7c commit def75d1
Show file tree
Hide file tree
Showing 19 changed files with 15 additions and 1,191 deletions.
4 changes: 2 additions & 2 deletions .circleci/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Timestamp Processor Build
# Collector Test Build

Whenever bumping the collector libraries the version for `OTC_BUILDER_VERSION` within the `config.yaml` must be updated to match the collector library version.
The `OTC_BUILDER_VERSION` and `builder-config.yaml` collector versions must match.
23 changes: 0 additions & 23 deletions .github/dependabot.yml

This file was deleted.

6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,12 @@ release:
(cd dist && shasum -a 256 * > checksums.txt)

.PHONY: test
test: go_test integration_test
test: integration_test

.PHONY: integration_test
integration_test: test/test.sh build/otelcol_hny_$(GOOS)_$(GOARCH) artifacts/honeycomb-metrics-config.yaml
./test/test.sh

.PHONY: go_test
go_test:
(cd ./timestampprocessor && go test .)

# generate a configuration file for otel-collector that results in a favorable repackaging ratio
artifacts/honeycomb-metrics-config.yaml: config-generator.jq vendor-fixtures/hostmetrics-receiver-metadata.yaml
mkdir -p ./artifacts
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ A current version of the config that this repository generates should be availab

In order to use this configuration you will need a version of opentelemetry-collector that contains the `metricstransform` processor and the `timestamp` processor. Binaries for those processors should also be available on the [Releases page](https://github.com/honeycombio/opentelemetry-collector-configs/releases). However, if you would like to build your own binary, [refer to this documentation](./docs/building.md).

## Timestamp processor

This repository contains [code for a `timestamp` processor for OpenTelemetry Collector](./timestampprocessor), which allows rounding timestamps in metrics streams to a configurable value.

## Building the config

If you'd like to build a version of the configuration yourself, clone this repo and run `make config`. You'll need these prerequisites available in your `$PATH`:
Expand Down
10 changes: 3 additions & 7 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
- [docker](https://docs.docker.com/get-docker/)
- [fpm](https://fpm.readthedocs.io/en/v1.13.1/installing.html)
- [gh](https://github.com/cli/cli#installation)
2. Add release entry to `timestampprocessor/CHANGELOG.md`
3. Update timestampprocessor entry in the example in `docs/building.md` with the new release version
4. Open a PR with the above, and merge that into main
5. Get the latest from main.
6. Run ./release.sh and follow prompts. This will push a tag and create a release.
7. Update release notes with changelog entry
8. Manually create and then push tag `timestampprocessor/v{new version number}`
2. Get the latest from main.
3. Run ./release.sh and follow prompts. This will push a tag and create a release.
4. Update release notes with changelog entry
3 changes: 1 addition & 2 deletions builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ processors:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.95.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.95.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.95.0
- gomod: github.com/honeycombio/opentelemetry-collector-configs/timestampprocessor v0.0.0
path: ./timestampprocessor
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.95.0
24 changes: 0 additions & 24 deletions docs/building.md

This file was deleted.

12 changes: 8 additions & 4 deletions docs/metrics-transformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,17 +327,21 @@ Granularity to the nanosecond is not particularly helpful for the vast majority

We address this by modifying timestamps for all metrics received in a batch by rounding them down to the most recent second. In this example, all timestamps would end up getting set to `1626298669000000000`. If, for some reason, the timestamps in a batch varied by more than 1 second, we would still retain that variability at up to a 1-second granularity.

This transformation can be accomplished by using the `timestampprocessor`, which [currently lives in this repository](../timestampprocessor) but we're working on getting it merged into the official [opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib) repository instead. It can be configured like this:
This transformation can be accomplished by using the `transformprocessor`, which [lives in contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor). It can be configured like this:

```yaml
processors:
timestamp:
round_to_nearest: 1s
transform:
error_mode: ignore
metric_statements:
- context: datapoint
statements:
- set(time, TruncateTime(time, Duration("1s")))
service:
pipelines:
metrics:
receivers: [hostmetrics]
processors: [timestamp]
processors: [transform]
exporters: [otlp]
```
32 changes: 0 additions & 32 deletions timestampprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,3 @@ Relevant [OTTL](https://github.com/open-telemetry/opentelemetry-collector-contri
- [set](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#set)
- [TruncateTime](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#truncatetime)
- [Duration](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#duration)
# Timestamp Processor for OpenTelemetry Collector
Supported pipeline types: metrics
The timestamp processor will round all timestamps in metrics streams to the nearest `<duration>`.

Examples:

```yaml
processors:
timestamp:
round_to_nearest: 1s
```

## Publishing a new version of this module

Please use [semantic versioning standards](https://golang.org/doc/modules/version-numbers) when deciding on a new version number.

First, make sure that all changes are committed and pushed to the main branch.

Then:
```bash
go test ./...
git tag timestampprocessor/v1.4.0 # substitute the appropriate version
git push --follow-tags
```

To confirm that the published module is available:
```bash
go list -m github.com/honeycombio/opentelemetry-collector-configs/[email protected]
```
22 changes: 0 additions & 22 deletions timestampprocessor/config.go

This file was deleted.

58 changes: 0 additions & 58 deletions timestampprocessor/config_test.go

This file was deleted.

3 changes: 0 additions & 3 deletions timestampprocessor/doc.go

This file was deleted.

51 changes: 0 additions & 51 deletions timestampprocessor/factory.go

This file was deleted.

37 changes: 0 additions & 37 deletions timestampprocessor/factory_test.go

This file was deleted.

53 changes: 0 additions & 53 deletions timestampprocessor/go.mod

This file was deleted.

Loading

0 comments on commit def75d1

Please sign in to comment.