Skip to content

Commit

Permalink
Merge pull request #53 from hellofresh/patch/ot-0.15
Browse files Browse the repository at this point in the history
EES-4724 Updated deps to have latest stable OpenTelemetry version
  • Loading branch information
vgarvardt authored Dec 14, 2020
2 parents b37d36e + 0e70068 commit 8589fde
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
version: v1.27
version: v1.33

test:
name: Test
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ test:

lint:
@echo "$(OK_COLOR)==> Linting with golangci-lint$(NO_COLOR)"
@docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.27.0 golangci-lint run -v
@docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.33.0 golangci-lint run -v

.PHONY: test lint
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/hellofresh/health-go/v4
go 1.15

require (
github.com/go-redis/redis/v8 v8.3.3
github.com/go-redis/redis/v8 v8.4.2
github.com/go-sql-driver/mysql v1.5.0
github.com/jackc/pgx/v4 v4.9.2
github.com/lib/pq v1.8.0
github.com/jackc/pgx/v4 v4.10.0
github.com/lib/pq v1.9.0
github.com/streadway/amqp v1.0.0
github.com/stretchr/testify v1.6.1
go.mongodb.org/mongo-driver v1.4.1
go.opentelemetry.io/otel v0.13.0
google.golang.org/grpc v1.31.1
go.opentelemetry.io/otel v0.15.0
google.golang.org/grpc v1.34.0
)
51 changes: 51 additions & 0 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions health.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"sync"
"time"

"go.opentelemetry.io/otel/api/trace"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/trace"
)

// Status type represents health status
Expand Down Expand Up @@ -88,7 +88,7 @@ type (
func New(opts ...Option) (*Health, error) {
h := &Health{
checks: make(map[string]Config),
tp: trace.NoopTracerProvider(),
tp: trace.NewNoopTracerProvider(),
}

for _, o := range opts {
Expand Down Expand Up @@ -216,7 +216,7 @@ func (h *Health) Measure(ctx context.Context) Check {
failures[res.name] = res.err.Error()
status = getAvailability(status, res.skipOnErr)

cs.span.RecordError(cs.ctx, res.err)
cs.span.RecordError(res.err)
}

cs.span.End()
Expand Down
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package health
import (
"fmt"

"go.opentelemetry.io/otel/api/trace"
"go.opentelemetry.io/otel/trace"
)

// Option is the health-container options type
Expand Down
2 changes: 1 addition & 1 deletion options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel/api/trace"
"go.opentelemetry.io/otel/trace"
)

func TestWithChecks(t *testing.T) {
Expand Down

0 comments on commit 8589fde

Please sign in to comment.