From e360477bfbf7aa392da66e8c8d151c57cd8af248 Mon Sep 17 00:00:00 2001 From: Steve Coffman Date: Mon, 4 Apr 2022 14:55:52 -0400 Subject: [PATCH 1/4] Add @ClaudiaJ Mattel improvements but with original repo URL Signed-off-by: Steve Coffman --- benchmark_test.go | 2 +- example/example_test.go | 2 +- formatter.go | 2 +- formatter_test.go | 10 +++++----- go.mod | 2 +- middleware.go | 2 +- middleware_test.go | 2 +- stackskip_test.go | 4 ++-- suite_test.go | 8 ++++---- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/benchmark_test.go b/benchmark_test.go index 73df4cd..a8da7b6 100644 --- a/benchmark_test.go +++ b/benchmark_test.go @@ -6,7 +6,7 @@ import ( "net" "testing" - logadapter "github.com/Mattel/logrus-stackdriver-formatter" + logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/interop" diff --git a/example/example_test.go b/example/example_test.go index 106fe85..ddacb4a 100644 --- a/example/example_test.go +++ b/example/example_test.go @@ -4,7 +4,7 @@ import ( "os" "strconv" - stackdriver "github.com/Mattel/logrus-stackdriver-formatter" + stackdriver "github.com/StevenACoffman/logrus-stackdriver-formatter" "github.com/sirupsen/logrus" ) diff --git a/formatter.go b/formatter.go index 8aa2c9a..e0db32e 100644 --- a/formatter.go +++ b/formatter.go @@ -137,7 +137,7 @@ func NewFormatter(options ...Option) *Formatter { fmtr := Formatter{ StackSkip: []string{ "github.com/sirupsen/logrus", - "github.com/Mattel/logrus-stackdriver-formatter", + "github.com/StevenACoffman/logrus-stackdriver-formatter", "github.com/grpc-ecosystem/go-grpc-middleware", "go.opentelemetry.io", }, diff --git a/formatter_test.go b/formatter_test.go index 2525993..de4ae09 100644 --- a/formatter_test.go +++ b/formatter_test.go @@ -6,7 +6,7 @@ import ( "errors" "testing" - logadapter "github.com/Mattel/logrus-stackdriver-formatter" + logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" ) @@ -25,7 +25,7 @@ func TestFormatter(t *testing.T) { logadapter.WithVersion("0.1"), logadapter.WithSkipTimestamp(), logadapter.WithSourceReference( - "https://github.com/Mattel/test.git", + "https://github.com/StevenACoffman/test.git", "v1.2.3", ), ) @@ -101,7 +101,7 @@ var formatterTests = []struct { }, "sourceReferences": []map[string]interface{}{ { - "repository": "https://github.com/Mattel/test.git", + "repository": "https://github.com/StevenACoffman/test.git", "revisionId": "v1.2.3", }, }, @@ -147,7 +147,7 @@ var formatterTests = []struct { }, "sourceReferences": []map[string]interface{}{ { - "repository": "https://github.com/Mattel/test.git", + "repository": "https://github.com/StevenACoffman/test.git", "revisionId": "v1.2.3", }, }, @@ -204,7 +204,7 @@ var formatterTests = []struct { }, "sourceReferences": []map[string]interface{}{ { - "repository": "https://github.com/Mattel/test.git", + "repository": "https://github.com/StevenACoffman/test.git", "revisionId": "v1.2.3", }, }, diff --git a/go.mod b/go.mod index 5c34dc2..7007653 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/Mattel/logrus-stackdriver-formatter +module github.com/StevenACoffman/logrus-stackdriver-formatter go 1.16 diff --git a/middleware.go b/middleware.go index 2f0d4e7..24d681f 100644 --- a/middleware.go +++ b/middleware.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/Mattel/logrus-stackdriver-formatter/ctxlogrus" + "github.com/StevenACoffman/logrus-stackdriver-formatter/ctxlogrus" "github.com/felixge/httpsnoop" "github.com/gofrs/uuid" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" diff --git a/middleware_test.go b/middleware_test.go index eb87bc8..203d1dc 100644 --- a/middleware_test.go +++ b/middleware_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - logadapter "github.com/Mattel/logrus-stackdriver-formatter" + logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/testing/testproto" "github.com/sirupsen/logrus" diff --git a/stackskip_test.go b/stackskip_test.go index ba23a37..00ab97b 100644 --- a/stackskip_test.go +++ b/stackskip_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/Mattel/logrus-stackdriver-formatter/test" + "github.com/StevenACoffman/logrus-stackdriver-formatter/test" "github.com/google/go-cmp/cmp" "github.com/sirupsen/logrus" ) @@ -19,7 +19,7 @@ func TestStackSkip(t *testing.T) { WithProjectID("test-project"), WithService("test"), WithVersion("0.1"), - WithStackSkip("github.com/Mattel/logrus-stackdriver-formatter"), + WithStackSkip("github.com/StevenACoffman/logrus-stackdriver-formatter"), WithSkipTimestamp(), ) diff --git a/suite_test.go b/suite_test.go index 1f6ef97..ad0d597 100644 --- a/suite_test.go +++ b/suite_test.go @@ -10,8 +10,8 @@ import ( "os" "testing" - logadapter "github.com/Mattel/logrus-stackdriver-formatter" - "github.com/Mattel/logrus-stackdriver-formatter/ctxlogrus" + logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" + "github.com/StevenACoffman/logrus-stackdriver-formatter/ctxlogrus" grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags" grpc_testing "github.com/grpc-ecosystem/go-grpc-middleware/testing" pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/testing/testproto" @@ -36,7 +36,7 @@ func newGRPCTestSuite(t *testing.T) *grpcTestSuite { logadapter.WithService("logging-test"), logadapter.WithVersion("v1.0.0"), logadapter.WithStackTraceStyle(logadapter.TraceInPayload), - logadapter.WithSourceReference("github.com/Mattel/logrus-stackdriver-formatter", "v1.0.0"), + logadapter.WithSourceReference("github.com/StevenACoffman/logrus-stackdriver-formatter", "v1.0.0"), logadapter.WithPrettyPrint(), ) var out io.Writer @@ -141,7 +141,7 @@ func newHTTPTestSuite(t *testing.T) *httpTestSuite { logadapter.WithService("logging-test"), logadapter.WithVersion("v1.0.0"), logadapter.WithStackTraceStyle(logadapter.TraceInPayload), - logadapter.WithSourceReference("github.com/Mattel/logrus-stackdriver-formatter", "v1.0.0"), + logadapter.WithSourceReference("github.com/StevenACoffman/logrus-stackdriver-formatter", "v1.0.0"), logadapter.WithPrettyPrint(), ) var out io.Writer From dab533db17f25e6fc650f066b16d9440a50084be Mon Sep 17 00:00:00 2001 From: Steve Coffman Date: Mon, 4 Apr 2022 15:07:10 -0400 Subject: [PATCH 2/4] Add github actions Signed-off-by: Steve Coffman --- .github/dependabot.yml | 94 ++++++++++++++++++++++++++++ .github/workflows/golangci-lint.yaml | 32 ++++++++++ .github/workflows/test.yml | 37 +++++++++++ 3 files changed, 163 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/golangci-lint.yaml create mode 100644 .github/workflows/test.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..13a686a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,94 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: +# commenting out pkg for now because they cause build failures without subsequent manual intervention +# due to go mod tidy needing to be run on all dependents +# - package-ecosystem: "gomod" # See documentation for possible values +# directory: "/pkg" # Location of package manifests +# schedule: +# interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/admin-reports" # Location of package manifests + schedule: + interval: "weekly" + ignore: + # ignore all Kubernetes minor updates beyond cluster version + - dependency-name: "k8s.io/api" + update-types: ["version-update:semver-minor"] + - dependency-name: "k8s.io/apimachinery" + update-types: ["version-update:semver-minor"] + - dependency-name: "k8s.io/client-go" + update-types: ["version-update:semver-minor"] + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/distutil" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/instructional-area-gen" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/listdistricts" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/nwea-mock-server" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/pubsub" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/pull-demographics" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/pull-test-results" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "reports" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "roster" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "signer" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "gomod" # See documentation for possible values + directory: "yearend" # Location of package manifests + schedule: + interval: "weekly" +### Docker + - package-ecosystem: "docker" # See documentation for possible values + directory: "admin-reports" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "docker" # See documentation for possible values + directory: "pubsub" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "docker" # See documentation for possible values + directory: "pull-demographics" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "docker" # See documentation for possible values + directory: "pull-test-results" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "docker" # See documentation for possible values + directory: "reports" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "docker" # See documentation for possible values + directory: "roster" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml new file mode 100644 index 0000000..1ae3889 --- /dev/null +++ b/.github/workflows/golangci-lint.yaml @@ -0,0 +1,32 @@ +name: golangci-lint +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + GOPRIVATE: "github.com/Khan" + GOFLAGS: "-trimpath" + GO_VERSION: 1.18 +jobs: + golangci: + name: Linter + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + # stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1). + go-version: ${{ env.GO_VERSION }} + - uses: actions/checkout@v2 + - name: lint + uses: golangci/golangci-lint-action@v3.1.0 + with: + version: latest + # skip cache because of flaky behaviors + skip-build-cache: true + skip-pkg-cache: true + args: --timeout 5m --issues-exit-code=0 + # only-new-issues: true #show only new issues if it's a pull request. options working-directory and only-new-issues are incompatible \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fcaaf0f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Test +on: + push: + branches: + - main + pull_request: + branches: + - main +env: + GOPRIVATE: "github.com/Khan" + GOFLAGS: "-trimpath" + GO_VERSION: 1.18 +jobs: + test: +# runs-on: [self-hosted, linux, x64] + runs-on: ubuntu-latest + timeout-minutes: 40 + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - name: Setup Gcloud + uses: 'google-github-actions/setup-gcloud@v0' + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + install_components: 'beta,cloud-datastore-emulator' + # export_default_credentials: true + # Old bad way without workload identity federation: + # service_account_key: ${{ secrets.GCP_GCR_SA_KEY }} + # service_account_email: ${{ secrets.GCP_GCR_SA_EMAIL }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Test + run: |- + echo "starting go tests without race" + go test ./... -timeout 5m -v -trimpath \ No newline at end of file From 32b45eb5d8b4a39e1515479b61f38453e0fd2641 Mon Sep 17 00:00:00 2001 From: Steve Coffman Date: Mon, 4 Apr 2022 15:07:55 -0400 Subject: [PATCH 3/4] Create go.yml --- .github/workflows/go.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..5a2bd3f --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,25 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.17 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... From b4031b977f43f1bb2bffcd127131c08a7bdab414 Mon Sep 17 00:00:00 2001 From: Steve Coffman Date: Tue, 5 Apr 2022 09:03:53 -0400 Subject: [PATCH 4/4] Back to Mattel for PR Signed-off-by: Steve Coffman --- .github/dependabot.yml | 94 ----------------------------------------- README.md | 14 +++--- benchmark_test.go | 2 +- example/example_test.go | 2 +- formatter.go | 2 +- formatter_test.go | 14 +++--- go.mod | 2 +- middleware.go | 2 +- middleware_test.go | 2 +- stackskip_test.go | 8 ++-- suite_test.go | 8 ++-- 11 files changed, 28 insertions(+), 122 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 13a686a..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,94 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: -# commenting out pkg for now because they cause build failures without subsequent manual intervention -# due to go mod tidy needing to be run on all dependents -# - package-ecosystem: "gomod" # See documentation for possible values -# directory: "/pkg" # Location of package manifests -# schedule: -# interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/admin-reports" # Location of package manifests - schedule: - interval: "weekly" - ignore: - # ignore all Kubernetes minor updates beyond cluster version - - dependency-name: "k8s.io/api" - update-types: ["version-update:semver-minor"] - - dependency-name: "k8s.io/apimachinery" - update-types: ["version-update:semver-minor"] - - dependency-name: "k8s.io/client-go" - update-types: ["version-update:semver-minor"] - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/distutil" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/instructional-area-gen" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/listdistricts" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/nwea-mock-server" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/pubsub" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/pull-demographics" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/pull-test-results" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "reports" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "roster" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "signer" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "yearend" # Location of package manifests - schedule: - interval: "weekly" -### Docker - - package-ecosystem: "docker" # See documentation for possible values - directory: "admin-reports" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "docker" # See documentation for possible values - directory: "pubsub" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "docker" # See documentation for possible values - directory: "pull-demographics" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "docker" # See documentation for possible values - directory: "pull-test-results" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "docker" # See documentation for possible values - directory: "reports" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "docker" # See documentation for possible values - directory: "roster" # Location of package manifests - schedule: - interval: "weekly" diff --git a/README.md b/README.md index 587fca8..ddae773 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # logrus-stackdriver-formatter -[![Go Report Card](https://goreportcard.com/badge/github.com/StevenACoffman/logrus-stackdriver-formatter)](https://goreportcard.com/report/github.com/StevenACoffman/logrus-stackdriver-formatter) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/StevenACoffman/logrus-stackdriver-formatter) -[![License MIT](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](https://github.com/StevenACoffman/logrus-stackdriver-formatter#license) +[![Go Report Card](https://goreportcard.com/badge/github.com/Mattel/logrus-stackdriver-formatter)](https://goreportcard.com/report/github.com/Mattel/logrus-stackdriver-formatter) +[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/Mattel/logrus-stackdriver-formatter) +[![License MIT](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](https://github.com/Mattel/logrus-stackdriver-formatter#license) Logrus-stackdriver-formatter provides: + [logrus](https://github.com/sirupsen/logrus) formatter for Stackdriver. @@ -23,7 +23,7 @@ package main import ( -stackdriver "github.com/StevenACoffman/logrus-stackdriver-formatter" +stackdriver "github.com/Mattel/logrus-stackdriver-formatter" "github.com/sirupsen/logrus" ) @@ -52,7 +52,7 @@ Here's a sample entry (prettified) from the example: "severity": "ERROR", "context": { "reportLocation": { - "file": "github.com/StevenACoffman/logrus-stackdriver-formatter/example_test.go", + "file": "github.com/Mattel/logrus-stackdriver-formatter/example_test.go", "line": 21, "function": "ExampleLogError" } @@ -99,7 +99,7 @@ and log-structured data streams. ```go import ( "os" - logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" + logadapter "github.com/Mattel/logrus-stackdriver-formatter" kitlog "github.com/go-kit/kit/log" ) @@ -118,7 +118,7 @@ func main() { ```go import ( "os" - logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" + logadapter "github.com/Mattel/logrus-stackdriver-formatter" kitlog "github.com/go-kit/kit/log" ) diff --git a/benchmark_test.go b/benchmark_test.go index a8da7b6..73df4cd 100644 --- a/benchmark_test.go +++ b/benchmark_test.go @@ -6,7 +6,7 @@ import ( "net" "testing" - logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" + logadapter "github.com/Mattel/logrus-stackdriver-formatter" "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/interop" diff --git a/example/example_test.go b/example/example_test.go index 2f9233d..e175257 100644 --- a/example/example_test.go +++ b/example/example_test.go @@ -11,7 +11,7 @@ import ( "github.com/gofrs/uuid" "go.opentelemetry.io/otel/trace" - stackdriver "github.com/StevenACoffman/logrus-stackdriver-formatter" + stackdriver "github.com/Mattel/logrus-stackdriver-formatter" "github.com/sirupsen/logrus" ) diff --git a/formatter.go b/formatter.go index 3cff2f3..4551a49 100644 --- a/formatter.go +++ b/formatter.go @@ -137,7 +137,7 @@ func NewFormatter(options ...Option) *Formatter { fmtr := Formatter{ StackSkip: []string{ "github.com/sirupsen/logrus", - "github.com/StevenACoffman/logrus-stackdriver-formatter", + "github.com/Mattel/logrus-stackdriver-formatter", "github.com/grpc-ecosystem/go-grpc-middleware", "go.opentelemetry.io", }, diff --git a/formatter_test.go b/formatter_test.go index 40a0a0f..b042027 100644 --- a/formatter_test.go +++ b/formatter_test.go @@ -9,7 +9,7 @@ import ( "github.com/gofrs/uuid" - logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" + logadapter "github.com/Mattel/logrus-stackdriver-formatter" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/trace" @@ -29,7 +29,7 @@ func TestFormatter(t *testing.T) { logadapter.WithVersion("0.1"), logadapter.WithSkipTimestamp(), logadapter.WithSourceReference( - "https://github.com/StevenACoffman/test.git", + "https://github.com/Mattel/test.git", "v1.2.3", ), logadapter.WithGlobalTraceID(TraceID), @@ -50,8 +50,8 @@ var ( TraceID = uuid.Must(uuid.FromString("105445aa7843bc8bf206b12000100000")) SpanID = [8]byte{0, 0, 0, 0, 0, 0, 0, 1} SpanContext = trace.SpanContext{}.WithSpanID(SpanID). - WithTraceID(trace.TraceID(TraceID)). - WithTraceFlags(TraceFlags) + WithTraceID(trace.TraceID(TraceID)). + WithTraceFlags(TraceFlags) LineNumber = platformLine() ) @@ -115,7 +115,7 @@ var formatterTests = []struct { }, "sourceReferences": []map[string]interface{}{ { - "repository": "https://github.com/StevenACoffman/test.git", + "repository": "https://github.com/Mattel/test.git", "revisionId": "v1.2.3", }, }, @@ -161,7 +161,7 @@ var formatterTests = []struct { }, "sourceReferences": []map[string]interface{}{ { - "repository": "https://github.com/StevenACoffman/test.git", + "repository": "https://github.com/Mattel/test.git", "revisionId": "v1.2.3", }, }, @@ -218,7 +218,7 @@ var formatterTests = []struct { }, "sourceReferences": []map[string]interface{}{ { - "repository": "https://github.com/StevenACoffman/test.git", + "repository": "https://github.com/Mattel/test.git", "revisionId": "v1.2.3", }, }, diff --git a/go.mod b/go.mod index 7007653..5c34dc2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/StevenACoffman/logrus-stackdriver-formatter +module github.com/Mattel/logrus-stackdriver-formatter go 1.16 diff --git a/middleware.go b/middleware.go index aff7927..ecc7cea 100644 --- a/middleware.go +++ b/middleware.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/StevenACoffman/logrus-stackdriver-formatter/ctxlogrus" + "github.com/Mattel/logrus-stackdriver-formatter/ctxlogrus" "github.com/felixge/httpsnoop" "github.com/gofrs/uuid" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" diff --git a/middleware_test.go b/middleware_test.go index d3d4534..33e04c6 100644 --- a/middleware_test.go +++ b/middleware_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" + logadapter "github.com/Mattel/logrus-stackdriver-formatter" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/testing/testproto" "github.com/sirupsen/logrus" diff --git a/stackskip_test.go b/stackskip_test.go index 54de3e9..0dc5564 100644 --- a/stackskip_test.go +++ b/stackskip_test.go @@ -9,7 +9,7 @@ import ( "github.com/gofrs/uuid" "go.opentelemetry.io/otel/trace" - "github.com/StevenACoffman/logrus-stackdriver-formatter/test" + "github.com/Mattel/logrus-stackdriver-formatter/test" "github.com/google/go-cmp/cmp" "github.com/sirupsen/logrus" ) @@ -19,8 +19,8 @@ var ( TraceID = uuid.Must(uuid.FromString("105445aa7843bc8bf206b12000100000")) SpanID = [8]byte{0, 0, 0, 0, 0, 0, 0, 1} SpanContext = trace.SpanContext{}.WithSpanID(SpanID). - WithTraceID(trace.TraceID(TraceID)). - WithTraceFlags(TraceFlags) + WithTraceID(trace.TraceID(TraceID)). + WithTraceFlags(TraceFlags) LineNumber = platformLine() ) @@ -33,7 +33,7 @@ func TestStackSkip(t *testing.T) { WithProjectID("test-project"), WithService("test"), WithVersion("0.1"), - WithStackSkip("github.com/StevenACoffman/logrus-stackdriver-formatter"), + WithStackSkip("github.com/Mattel/logrus-stackdriver-formatter"), WithSkipTimestamp(), WithGlobalTraceID(TraceID), ) diff --git a/suite_test.go b/suite_test.go index 5b28e11..d14bb04 100644 --- a/suite_test.go +++ b/suite_test.go @@ -10,8 +10,8 @@ import ( "os" "testing" - logadapter "github.com/StevenACoffman/logrus-stackdriver-formatter" - "github.com/StevenACoffman/logrus-stackdriver-formatter/ctxlogrus" + logadapter "github.com/Mattel/logrus-stackdriver-formatter" + "github.com/Mattel/logrus-stackdriver-formatter/ctxlogrus" grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags" grpc_testing "github.com/grpc-ecosystem/go-grpc-middleware/testing" pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/testing/testproto" @@ -37,7 +37,7 @@ func newGRPCTestSuite(t *testing.T) *grpcTestSuite { logadapter.WithVersion("v1.0.0"), logadapter.WithStackTraceStyle(logadapter.TraceInPayload), logadapter.WithSourceReference( - "github.com/StevenACoffman/logrus-stackdriver-formatter", + "github.com/Mattel/logrus-stackdriver-formatter", "v1.0.0", ), logadapter.WithPrettyPrint(), @@ -159,7 +159,7 @@ func newHTTPTestSuite(t *testing.T) *httpTestSuite { logadapter.WithVersion("v1.0.0"), logadapter.WithStackTraceStyle(logadapter.TraceInPayload), logadapter.WithSourceReference( - "github.com/StevenACoffman/logrus-stackdriver-formatter", + "github.com/Mattel/logrus-stackdriver-formatter", "v1.0.0", ), logadapter.WithPrettyPrint(),