Skip to content

Commit

Permalink
update dependencies to latest otel v1.11.2 (#11)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Amy Tobey authored Jan 12, 2023
1 parent 33c5413 commit fe903bd
Show file tree
Hide file tree
Showing 4 changed files with 344 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.18
- name: Build otelinit
run: go build -v ./...
- name: Build test stub
Expand Down
14 changes: 10 additions & 4 deletions cmd/test-otel-init-go/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package main
// [ ] use random ports for listener address?

import (
"bytes"
"encoding/json"
"fmt"
"io/fs"
Expand Down Expand Up @@ -44,7 +45,7 @@ type CliEvent struct {
Events []CliEvent // reader code will stuff kind=event in here
}

// tid sid
// --------------- tid sid
type CliEvents map[string]map[string]CliEvent

// StubData is the structure of the data that the stub program
Expand Down Expand Up @@ -196,13 +197,18 @@ func runPrograms(t *testing.T, scenario Scenario) (StubData, CliEvents) {

// MAYBE: server json --stdout is maybe better? and could add a graceful exit on closed fds
otelcli := exec.Command(otelCliPath, cliArgs...)
otelcli.Env = []string{"PATH=/bin"} // apparently this is required for 'getent', no idea why
otelcli.Env = []string{"PATH=/bin"} // apparently PATH=/bin is required for 'getent', no idea why
var b bytes.Buffer
otelcli.Stdout = &b
otelcli.Stderr = &b

if !scenario.SkipOtelCli {
// run otel-cli server in the background
go func() {
err, output := otelcli.CombinedOutput()
err := otelcli.Start()
otelcli.Wait() // don't check error, it's fast and errors a lot for no reason
if err != nil {
log.Println(output)
log.Println(b.String())
log.Fatalf("Executing command %q failed: %s", otelcli.String(), err)
}
}()
Expand Down
30 changes: 23 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
module github.com/equinix-labs/otel-init-go

go 1.15
go 1.18

require (
github.com/google/go-cmp v0.5.6
go.opentelemetry.io/otel v1.3.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0
go.opentelemetry.io/otel/sdk v1.3.0
go.opentelemetry.io/otel/trace v1.3.0
google.golang.org/grpc v1.44.0
github.com/google/go-cmp v0.5.9
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2
go.opentelemetry.io/otel/sdk v1.11.2
go.opentelemetry.io/otel/trace v1.11.2
google.golang.org/grpc v1.51.0
)

require (
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect
golang.org/x/text v0.4.0 // indirect
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading

0 comments on commit fe903bd

Please sign in to comment.