diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..5a0f57c --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,36 @@ +name: Go + +on: + pull_request + +jobs: + + go-otel-exporter: + runs-on: ubuntu-18.04 + + strategy: + # if one test fails, do not abort the rest + fail-fast: false + matrix: + include: + - go-version: 1.13.x + - go-version: 1.14.x + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Vet + run: go vet ./... diff --git a/newrelic/exporter_test.go b/newrelic/exporter_test.go index 6521403..c8090ef 100644 --- a/newrelic/exporter_test.go +++ b/newrelic/exporter_test.go @@ -110,8 +110,8 @@ type Data struct { } type Common struct { - timestamp interface{} `json:"-"` - interval interface{} `json:"-"` + timestamp interface{} + interval interface{} Attributes map[string]string `json:"attributes"` } @@ -119,14 +119,14 @@ type Span struct { ID string `json:"id"` TraceID string `json:"trace.id"` Attributes map[string]interface{} `json:"attributes"` - timestamp interface{} `json:"-"` + timestamp interface{} } type Metric struct { - Name string `json:"name"` - Type string `json:"type"` - Value interface{} `json:"value"` - timestamp interface{} `json:"-"` + Name string `json:"name"` + Type string `json:"type"` + Value interface{} `json:"value"` + timestamp interface{} Attributes map[string]interface{} `json:"attributes"` }