Skip to content

Commit

Permalink
Embed ctimefmt into timeutils (open-telemetry#24042)
Browse files Browse the repository at this point in the history
`ctimefmt` was originally authored by @Mottl, then forked and extended
by observIQ. The fork is used in various places within this repo, but
ultimately it would be simpler if we can consolidate this functionality
into the `timeutils` package.

This PR embeds the code from observIQ's fork into an internal package
within `timeutils`. As a dedicated package, I believe the original
license is respected and the code clearly attributed to the original
author.
  • Loading branch information
djaglowski authored Jul 10, 2023
1 parent 4e3c466 commit 11134b0
Show file tree
Hide file tree
Showing 70 changed files with 233 additions and 130 deletions.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,7 @@ issues:
- path: testbed
linters:
- exhaustive
# Preserve original source code in attributed package.
- path: ctimefmt
linters:
- revive
1 change: 0 additions & 1 deletion cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19 // indirect
github.com/observiq/ctimefmt v1.0.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.81.0 // indirect
Expand Down
3 changes: 0 additions & 3 deletions cmd/configschema/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19 // indirect
github.com/observiq/ctimefmt v1.0.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.81.0 // indirect
Expand Down
3 changes: 0 additions & 3 deletions cmd/otelcontribcol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cmd/oteltestbedcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ require (
github.com/mostynb/go-grpc-compression v1.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/observiq/ctimefmt v1.0.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.81.0 // indirect
Expand Down
3 changes: 0 additions & 3 deletions cmd/oteltestbedcol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion connector/countconnector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/observiq/ctimefmt v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opentelemetry.io/collector v0.81.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.81.0 // indirect
Expand Down
3 changes: 0 additions & 3 deletions connector/countconnector/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion connector/routingconnector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/observiq/ctimefmt v1.0.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.81.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
go.opentelemetry.io/collector v0.81.0 // indirect
Expand Down
3 changes: 0 additions & 3 deletions connector/routingconnector/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion exporter/datadogexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mostynb/go-grpc-compression v1.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/observiq/ctimefmt v1.0.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.81.0 // indirect
Expand Down
3 changes: 0 additions & 3 deletions exporter/datadogexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion exporter/signalfxexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/observiq/ctimefmt v1.0.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
Expand Down
3 changes: 0 additions & 3 deletions exporter/signalfxexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/nginxinc/nginx-prometheus-exporter v0.8.1-0.20201110005315-f5a5f8086c19 // indirect
github.com/observiq/ctimefmt v1.0.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.81.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.81.0 // indirect
Expand Down
3 changes: 0 additions & 3 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/coreinternal/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.19
require (
github.com/cenkalti/backoff/v4 v4.2.1
github.com/docker/go-connections v0.4.0
github.com/observiq/ctimefmt v1.0.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.81.0
github.com/stretchr/testify v1.8.4
github.com/testcontainers/testcontainers-go v0.21.0
Expand Down
3 changes: 0 additions & 3 deletions internal/coreinternal/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 11134b0

Please sign in to comment.