Skip to content

Tags: equinix-labs/otel-init-go

Tags

v0.0.9

Toggle v0.0.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
update otel and grpc dependencies to latest (#28)

v0.0.8

Toggle v0.0.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
update dependencies to latest (#23)

* update dependencies to latest

* bump to go 1.20

* yamlllllllllll

v0.0.7

Toggle v0.0.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update actions/setup-go action to v3 (#15)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

v0.0.6

Toggle v0.0.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
update dependencies to latest otel v1.11.2 (#11)

* update dependencies to latest otel v1.11.2

Also discovered a bug in the test harness, fixed it.

* newer otel & deps needs Go 1.17 or greater

* actually go 1.18

v0.0.5

Toggle v0.0.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
update all otel deps (#7)

Updates everything to otel-go 1.3

v0.0.4

Toggle v0.0.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
bump to opentelemetry-go v1.0.0 (#5)

Signed-off-by: Amy Tobey <[email protected]>

v0.0.3

Toggle v0.0.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
add more helpers (#4)

* add some more helpers

* rename file to align with its contents

* add more helpers and some tests for them

Not perfect test coverage but enough to get *some* confidence it's
mostly right. More to come.

* fix comment

that's what I get for copying from otel-cli

Signed-off-by: Amy Tobey <[email protected]>

v0.0.2

Toggle v0.0.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add helpers (#3)

* go mod tidy
* add simple trace propagation carrier and helper for envvars

No tests for now, we'll add those in a follow-up PR if this works out.

Signed-off-by: Amy Tobey <[email protected]>

v0.0.1

Toggle v0.0.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
add otel-cli tests (#2)

Adds a first pass at full-system testing using otel-cli's server mode. This is working well enough to merge now as a basis for further work.

* empty OTEL_EXPORTER_OTLP_INSECURE should not log

Turns out strconv.ParseBool returns error on empty string, so this
avoids that while keeping it clear how it fails closed.

* add a test program

This program calls the otel-init-go API, creates one span, then
immediately ends it and exits.

* make test program dump state to json

The test program now writes its state to json on stdout. This output is
intended to be captured in tests, to compare against pre-set environment
variable configurations.

Made otelinit.Config public so it can be tunneled through context and
picked up in the test program. There are other ways to accomplish this
but it might be useful to folks down the road for debugging. So now
the "otel-init-config" value in the context can be used to grab the
config without an increase in API surface other than returning context,
which like the last API change, it probably should have in the first place.
(I fully expect these changes to settle down by the time this PR merges.)

* add a safe function for extracting config from context

* remove outdated comment

* set conf to empty config on retrieval error

This code path might never fire but if it does, it probably shouldn't
crash :)

* add tests!

This is the first pass at trying the idea of using a stub program and
otel-cli together to validate otel-cli's behavior through real
environment variable configuration and connections to an OTLP server
(otel-cli). Lots to do, but this is a working start and it's the end of
my work day :)

* add an explanatory comment to main.go

* first pass at data tests

This was easier than I thought it would be? Hooray for comparing
string/string maps I guess.

Also fixed a test failure in 01, that was a mistake in the data :)

* move fixtures to testdata/, clean up

Now that this seems to be working, move the test fixtures into the
testdata/ directory that is a Go standard for things like fixture data.

Along the way remove printf stuff that's no longer needed.

Also map filename through in Scenario struct so it can be used in
errors.

* add a full-loop test using otel-cli

Discovered I needed to add a wildcard match for especially trace and
span ids, but did it for the whole map while I was there. It's not the
prettiest approach but I tried writing a cmp.Comparator and it didn't
work out, so for now this gets the job done nicely.

* add basic github actions test runner

* add unit tests for otelinit/config.go

* add godoc to type

* try not to leak envvars prefixed with GITHUB

This could be better but for now should filter out most of the noise and
dangerous stuff. And it's a test program so maybe it's ok to be a leetle
gross.

* get rid of hard-coded paths

The setup for the test stub is a little gross but seems to work ok. This
is better than a hard-coded path, so let's see how it goes.

* download the latest otel-cli release for tests

* try the engineerd/configurator downloader instead

* try templating the url & set token

* fix ordering

* avoid releases to avoid needing a token for now

Looks like I need to set up token passing for the release-based download
to work. Instead, for now, just download the tarball and pull otel-cli
out.

* simplify stub path, have CI build stub before test

* try working-directory instead of path

* move build up

* fix up horrible comments

Signed-off-by: Amy Tobey <[email protected]>