Repository: go-kratos/kratos
Pull request #3450 (2024-10-24 18:13:02)

build(deps): bump actions/setup-go from 5.0.2 to 5.1.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.2 to 5.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/setup-go/releases">actions/setup-go's releases</a>.</em></p>
<blockquote>
<h2>v5.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Add workflow file for publishing releases to immutable action package by <a href="https://github.com/Jcambass"><code>@​Jcambass</code></a> in <a href="https://redirect.github.com/actions/setup-go/pull/500">actions/setup-go#500</a></li>
<li>Upgrade IA Publish by <a href="https://github.com/Jcambass"><code>@​Jcambass</code></a> in <a href="https://redirect.github.com/actions/setup-go/pull/502">actions/setup-go#502</a></li>
<li>Add architecture to cache key by <a href="https://github.com/Zxilly"><code>@​Zxilly</code></a> in <a href="https://redirect.github.com/actions/setup-go/pull/493">actions/setup-go#493</a>
This addresses issues with caching by adding the architecture (arch) to the cache key, ensuring that cache keys are accurate to prevent conflicts.
Note: This change may break previous cache keys as they will no longer be compatible with the new format.</li>
<li>Enhance workflows and Upgrade micromatch Dependency by <a href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a> in <a href="https://redirect.github.com/actions/setup-go/pull/510">actions/setup-go#510</a></li>
</ul>
<p><strong>Bug Fixes</strong></p>
<ul>
<li>Revise <code>isGhes</code> logic by <a href="https://github.com/jww3"><code>@​jww3</code></a> in <a href="https://redirect.github.com/actions/setup-go/pull/511">actions/setup-go#511</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Zxilly"><code>@​Zxilly</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-go/pull/493">actions/setup-go#493</a></li>
<li><a href="https://github.com/Jcambass"><code>@​Jcambass</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-go/pull/500">actions/setup-go#500</a></li>
<li><a href="https://github.com/jww3"><code>@​jww3</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-go/pull/511">actions/setup-go#511</a></li>
<li><a href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-go/pull/510">actions/setup-go#510</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-go/compare/v5...v5.1.0">https://github.com/actions/setup-go/compare/v5...v5.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/actions/setup-go/commit/41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed"><code>41dfa10</code></a> Enhance workflows and Upgrade micromatch Dependency (<a href="https://redirect.github.com/actions/setup-go/issues/510">#510</a>)</li>
<li><a href="https://github.com/actions/setup-go/commit/941977282cd715ac8e0b3adc8555bef6dc794b7e"><code>9419772</code></a> Revise <code>isGhes</code> logic (<a href="https://redirect.github.com/actions/setup-go/issues/511">#511</a>)</li>
<li><a href="https://github.com/actions/setup-go/commit/d60b41a563a30eac31c3ec623e6ff0b3f16e1a06"><code>d60b41a</code></a> Merge pull request <a href="https://redirect.github.com/actions/setup-go/issues/502">#502</a> from actions/Jcambass-patch-1</li>
<li><a href="https://github.com/actions/setup-go/commit/e09f57f6a9dc1a4c326dfc2aaf66b49f6c56f9f8"><code>e09f57f</code></a> Upgrade IA Publish</li>
<li><a href="https://github.com/actions/setup-go/commit/df1a11710ed378b187f40c71eb3d6c08d82e7108"><code>df1a117</code></a> Merge pull request <a href="https://redirect.github.com/actions/setup-go/issues/500">#500</a> from actions/Jcambass-patch-1</li>
<li><a href="https://github.com/actions/setup-go/commit/49582f64768fe5808736e4f6d4a39b55b1d0ee52"><code>49582f6</code></a> Add workflow file for publishing releases to immutable action package</li>
<li><a href="https://github.com/actions/setup-go/commit/b26d40294f8ad76fcc90b915dac85892322fe62d"><code>b26d402</code></a> fix: add arch to cache key (<a href="https://redirect.github.com/actions/setup-go/issues/493">#493</a>)</li>
<li>See full diff in <a href="https://github.com/actions/setup-go/compare/v5.0.2...v5.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-go&package-manager=github_actions&previous-version=5.0.2&new-version=5.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 974ce964..2bb0cb7e 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -35,6 +35,6 @@ Usage: `fixes/resolves #<issue number>`, or `fixes/resolves (paste link of issue
 
 #### Other special notes for the reviewers:
 <!--
-* Somethings that need extra attention for the reviewers
+* Some things that need extra attention for the reviewers
 * Some additional notes, TODO list, etc.
 -->
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 6b8c22df..e794e431 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -25,7 +25,7 @@ jobs:
           ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
           ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
       consul:
-        image: consul:1.12.3
+        image: hashicorp/consul:1.20
         ports:
           - 8500:8500
       nacos:
@@ -44,7 +44,7 @@ jobs:
     steps:
       - uses: actions/checkout@v4
       - name: Set up Go
-        uses: actions/setup-go@v5.0.2
+        uses: actions/setup-go@v5.1.0
         with:
           go-version: ${{ matrix.go }}
 
diff --git a/.golangci.yml b/.golangci.yml
index 5e7c6d23..6d021062 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -45,7 +45,7 @@ linters:
   # - nestif
   # - prealloc
   # - testpackage
-  # - stylrcheck
+  # - stylecheck
   # - wsl
 
 linters-settings:
diff --git a/README.md b/README.md
index 6f768c4d..5cb416bd 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ Kratos is accessible, powerful, and provides tools required for large, robust ap
 
 Kratos has the most extensive and thorough [documentation](https://go-kratos.dev/en/docs/getting-started/start) and [example](https://github.com/go-kratos/examples) library of all modern web application frameworks, making it a breeze to get started with the framework.
 
-We also provide a [modern template](https://github.com/go-kratos/kratos-layout). This template should help reduce the work required to setup up modern projects.
+We also provide a [modern template](https://github.com/go-kratos/kratos-layout). This template should help reduce the work required to set up modern projects.
 
 ### Goals
 
diff --git a/ROADMAP.md b/ROADMAP.md
index da9872a8..aec5ac95 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -41,7 +41,7 @@ This document defines the roadmap for Kratos development.
         - [ ] javascript/typescript clients
     - [x] gRPC
         - [x] TLS
-        - [x] Uarry Handler
+        - [x] Unary Handler
         - [x] Streaming Handler
 - [ ] Cache
     - [ ] go-redis
diff --git a/cmd/kratos/internal/change/get.go b/cmd/kratos/internal/change/get.go
index 32046d1e..f1fea42c 100644
--- a/cmd/kratos/internal/change/get.go
+++ b/cmd/kratos/internal/change/get.go
@@ -116,6 +116,7 @@ func ParseCommitsInfo(info []CommitInfo) string {
 		"fix":   {},
 		"feat":  {},
 		"deps":  {},
+		"build": {},
 		"break": {},
 		"chore": {},
 		"other": {},
@@ -127,7 +128,7 @@ func ParseCommitsInfo(info []CommitInfo) string {
 		if index != -1 {
 			msg = msg[:index-1]
 		}
-		prefix := []string{"fix", "feat", "deps", "break", "chore"}
+		prefix := []string{"fix", "feat", "build", "deps", "break", "chore"}
 		var matched bool
 		for _, v := range prefix {
 			msg = strings.TrimPrefix(msg, " ")
@@ -153,6 +154,8 @@ func ParseCommitsInfo(info []CommitInfo) string {
 			text = "### New Features\n"
 		case "fix":
 			text = "### Bug Fixes\n"
+		case "build":
+			text = "### Builds\n"
 		case "chore":
 			text = "### Chores\n"
 		case "other":
@@ -166,7 +169,7 @@ func ParseCommitsInfo(info []CommitInfo) string {
 			md[key] += fmt.Sprintf("- %s\n", value)
 		}
 	}
-	return fmt.Sprint(md["break"], md["deps"], md["feat"], md["fix"], md["chore"], md["other"])
+	return fmt.Sprint(md["break"], md["deps"], md["feat"], md["fix"], md["build"], md["chore"], md["other"])
 }
 
 func ParseReleaseInfo(info ReleaseInfo) string {
diff --git a/cmd/kratos/internal/proto/server/server.go b/cmd/kratos/internal/proto/server/server.go
index 8a30d93c..665dea8a 100644
--- a/cmd/kratos/internal/proto/server/server.go
+++ b/cmd/kratos/internal/proto/server/server.go
@@ -72,7 +72,7 @@ func run(_ *cobra.Command, args []string) {
 		}),
 	)
 	if _, err := os.Stat(targetDir); os.IsNotExist(err) {
-		fmt.Printf("Target directory: %s does not exsit\n", targetDir)
+		fmt.Printf("Target directory: %s does not exist\n", targetDir)
 		return
 	}
 	for _, s := range res {
diff --git a/cmd/kratos/version.go b/cmd/kratos/version.go
index 8a5d5093..ce435279 100644
--- a/cmd/kratos/version.go
+++ b/cmd/kratos/version.go
@@ -1,4 +1,4 @@
 package main
 
 // release is the current kratos tool version.
-const release = "v2.8.1"
+const release = "v2.8.2"
diff --git a/cmd/protoc-gen-go-errors/version.go b/cmd/protoc-gen-go-errors/version.go
index 92f84a09..75bbab49 100644
--- a/cmd/protoc-gen-go-errors/version.go
+++ b/cmd/protoc-gen-go-errors/version.go
@@ -1,4 +1,4 @@
 package main
 
 // release is the current protoc-gen-go-errors version.
-const release = "v2.8.1"
+const release = "v2.8.2"
diff --git a/cmd/protoc-gen-go-http/version.go b/cmd/protoc-gen-go-http/version.go
index 1c973e7a..deb91589 100644
--- a/cmd/protoc-gen-go-http/version.go
+++ b/cmd/protoc-gen-go-http/version.go
@@ -1,4 +1,4 @@
 package main
 
 // release is the current protoc-gen-go-http version.
-const release = "v2.8.1"
+const release = "v2.8.2"
diff --git a/contrib/config/apollo/README.md b/contrib/config/apollo/README.md
index a8eea493..3b10738b 100644
--- a/contrib/config/apollo/README.md
+++ b/contrib/config/apollo/README.md
@@ -1,4 +1,4 @@
-## Apollo config centry
+## Apollo config center
 
 This module implements the `config.Source` interface in kratos based apollo config management center.
 
diff --git a/contrib/config/apollo/go.mod b/contrib/config/apollo/go.mod
index 736f97ca..de3c6ee1 100644
--- a/contrib/config/apollo/go.mod
+++ b/contrib/config/apollo/go.mod
@@ -4,7 +4,7 @@ go 1.19
 
 require (
 	github.com/apolloconfig/agollo/v4 v4.3.1
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 )
 
 require (
diff --git a/contrib/config/consul/go.mod b/contrib/config/consul/go.mod
index 34880590..0d4327aa 100644
--- a/contrib/config/consul/go.mod
+++ b/contrib/config/consul/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/config/consul/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/hashicorp/consul/api v1.26.1
 )
 
diff --git a/contrib/config/etcd/go.mod b/contrib/config/etcd/go.mod
index e739f30f..6ea8df9d 100644
--- a/contrib/config/etcd/go.mod
+++ b/contrib/config/etcd/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/config/etcd/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	go.etcd.io/etcd/client/v3 v3.5.11
 	google.golang.org/grpc v1.61.1
 )
diff --git a/contrib/config/kubernetes/README.md b/contrib/config/kubernetes/README.md
index 9ed07366..0739dcba 100644
--- a/contrib/config/kubernetes/README.md
+++ b/contrib/config/kubernetes/README.md
@@ -7,7 +7,7 @@ execute this command:
 ```
 kubectl create clusterrolebinding go-kratos:kube --clusterrole=view --serviceaccount=mesh:default
 ```
-or use `kubect apply -f bind-role.yaml`
+or use `kubectl apply -f bind-role.yaml`
 ```yaml
 apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRoleBinding
diff --git a/contrib/config/kubernetes/go.mod b/contrib/config/kubernetes/go.mod
index 3746535f..944eaf99 100644
--- a/contrib/config/kubernetes/go.mod
+++ b/contrib/config/kubernetes/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/config/kubernetes/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	k8s.io/api v0.26.3
 	k8s.io/apimachinery v0.26.3
 	k8s.io/client-go v0.26.3
diff --git a/contrib/config/nacos/go.mod b/contrib/config/nacos/go.mod
index fb7773dc..3a07060a 100644
--- a/contrib/config/nacos/go.mod
+++ b/contrib/config/nacos/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/config/nacos/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/nacos-group/nacos-sdk-go v1.0.9
 )
 
diff --git a/contrib/config/polaris/go.mod b/contrib/config/polaris/go.mod
index c10dd6b5..ae45d446 100644
--- a/contrib/config/polaris/go.mod
+++ b/contrib/config/polaris/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/config/polaris/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/polarismesh/polaris-go v1.1.0
 )
 
diff --git a/contrib/encoding/msgpack/go.mod b/contrib/encoding/msgpack/go.mod
index 0de42d06..8b6b48a4 100644
--- a/contrib/encoding/msgpack/go.mod
+++ b/contrib/encoding/msgpack/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/encoding/msgpack/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/vmihailenco/msgpack/v5 v5.4.1
 )
 
diff --git a/contrib/errortracker/sentry/go.mod b/contrib/errortracker/sentry/go.mod
index 0720da6d..ca73cb59 100644
--- a/contrib/errortracker/sentry/go.mod
+++ b/contrib/errortracker/sentry/go.mod
@@ -4,7 +4,7 @@ go 1.19
 
 require (
 	github.com/getsentry/sentry-go v0.25.0
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 )
 
 require (
diff --git a/contrib/log/aliyun/aliyun.go b/contrib/log/aliyun/aliyun.go
index 836960e0..946cb590 100644
--- a/contrib/log/aliyun/aliyun.go
+++ b/contrib/log/aliyun/aliyun.go
@@ -102,7 +102,7 @@ func (a *aliyunLog) Log(level log.Level, keyvals ...interface{}) error {
 	return a.producer.SendLog(a.opts.project, a.opts.logstore, "", "", logInst)
 }
 
-// NewAliyunLog new a aliyun logger with options.
+// NewAliyunLog new aliyun logger with options.
 func NewAliyunLog(options ...Option) Logger {
 	opts := defaultOptions()
 	for _, o := range options {
diff --git a/contrib/log/aliyun/go.mod b/contrib/log/aliyun/go.mod
index e6fbbeee..f89965ae 100644
--- a/contrib/log/aliyun/go.mod
+++ b/contrib/log/aliyun/go.mod
@@ -4,7 +4,7 @@ go 1.19
 
 require (
 	github.com/aliyun/aliyun-log-go-sdk v0.1.75
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	google.golang.org/protobuf v1.33.0
 )
 
diff --git a/contrib/log/fluent/go.mod b/contrib/log/fluent/go.mod
index e0996bae..17521db0 100644
--- a/contrib/log/fluent/go.mod
+++ b/contrib/log/fluent/go.mod
@@ -4,7 +4,7 @@ go 1.19
 
 require (
 	github.com/fluent/fluent-logger-golang v1.9.0
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 )
 
 require (
diff --git a/contrib/log/logrus/go.mod b/contrib/log/logrus/go.mod
index 5f8c9b3e..8e51c2eb 100644
--- a/contrib/log/logrus/go.mod
+++ b/contrib/log/logrus/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/log/logrus/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/sirupsen/logrus v1.8.1
 )
 
diff --git a/contrib/log/tencent/go.mod b/contrib/log/tencent/go.mod
index c77d1670..db9c2b07 100644
--- a/contrib/log/tencent/go.mod
+++ b/contrib/log/tencent/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/log/tencent/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/tencentcloud/tencentcloud-cls-sdk-go v1.0.2
 	google.golang.org/protobuf v1.33.0
 )
diff --git a/contrib/log/zap/go.mod b/contrib/log/zap/go.mod
index faf10ee1..6ff637b2 100644
--- a/contrib/log/zap/go.mod
+++ b/contrib/log/zap/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/log/zap/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	go.uber.org/zap v1.26.0
 )
 
diff --git a/contrib/log/zerolog/go.mod b/contrib/log/zerolog/go.mod
index ac37f0f2..0f449a74 100644
--- a/contrib/log/zerolog/go.mod
+++ b/contrib/log/zerolog/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/log/zerolog/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/rs/zerolog v1.30.0
 )
 
diff --git a/contrib/opensergo/go.mod b/contrib/opensergo/go.mod
index 4d0ec72a..ebd7a00b 100644
--- a/contrib/opensergo/go.mod
+++ b/contrib/opensergo/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/opensergo/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/opensergo/opensergo-go v0.0.0-20220331070310-e5b01fee4d1c
 	golang.org/x/net v0.24.0
 	google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917
diff --git a/contrib/polaris/go.mod b/contrib/polaris/go.mod
index e59ee435..77913c1b 100644
--- a/contrib/polaris/go.mod
+++ b/contrib/polaris/go.mod
@@ -4,7 +4,7 @@ go 1.19
 
 require (
 	github.com/go-kratos/aegis v0.2.0
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/google/uuid v1.4.0
 	github.com/polarismesh/polaris-go v1.3.0
 	google.golang.org/protobuf v1.33.0
diff --git a/contrib/registry/consul/go.mod b/contrib/registry/consul/go.mod
index 26f526fa..a15e1551 100644
--- a/contrib/registry/consul/go.mod
+++ b/contrib/registry/consul/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/registry/consul/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/hashicorp/consul/api v1.26.1
 )
 
diff --git a/contrib/registry/discovery/go.mod b/contrib/registry/discovery/go.mod
index 2331b533..d00726ab 100644
--- a/contrib/registry/discovery/go.mod
+++ b/contrib/registry/discovery/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/registry/discovery/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/go-resty/resty/v2 v2.11.0
 	github.com/pkg/errors v0.9.1
 )
diff --git a/contrib/registry/etcd/go.mod b/contrib/registry/etcd/go.mod
index 3c39306a..e2df92e0 100644
--- a/contrib/registry/etcd/go.mod
+++ b/contrib/registry/etcd/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/registry/etcd/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	go.etcd.io/etcd/client/v3 v3.5.11
 	google.golang.org/grpc v1.61.1
 )
diff --git a/contrib/registry/eureka/go.mod b/contrib/registry/eureka/go.mod
index 0dd9f250..cbfa2a2a 100644
--- a/contrib/registry/eureka/go.mod
+++ b/contrib/registry/eureka/go.mod
@@ -2,6 +2,6 @@ module github.com/go-kratos/kratos/contrib/registry/eureka/v2
 
 go 1.19
 
-require github.com/go-kratos/kratos/v2 v2.8.1
+require github.com/go-kratos/kratos/v2 v2.8.2
 
 replace github.com/go-kratos/kratos/v2 => ../../../
diff --git a/contrib/registry/kubernetes/go.mod b/contrib/registry/kubernetes/go.mod
index 711a963a..6918cdec 100644
--- a/contrib/registry/kubernetes/go.mod
+++ b/contrib/registry/kubernetes/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/registry/kubernetes/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/json-iterator/go v1.1.12
 	k8s.io/api v0.24.3
 	k8s.io/apimachinery v0.24.3
diff --git a/contrib/registry/nacos/go.mod b/contrib/registry/nacos/go.mod
index e8c2d405..d2fde8ce 100644
--- a/contrib/registry/nacos/go.mod
+++ b/contrib/registry/nacos/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/registry/nacos/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/nacos-group/nacos-sdk-go v1.0.9
 )
 
diff --git a/contrib/registry/polaris/go.mod b/contrib/registry/polaris/go.mod
index e26b3a9e..36214144 100644
--- a/contrib/registry/polaris/go.mod
+++ b/contrib/registry/polaris/go.mod
@@ -3,7 +3,7 @@ module github.com/go-kratos/kratos/contrib/registry/polaris/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/polarismesh/polaris-go v1.3.0
 )
 
diff --git a/contrib/registry/servicecomb/go.mod b/contrib/registry/servicecomb/go.mod
index f13aa051..8bcbd40e 100644
--- a/contrib/registry/servicecomb/go.mod
+++ b/contrib/registry/servicecomb/go.mod
@@ -5,7 +5,7 @@ go 1.19
 require (
 	github.com/go-chassis/cari v0.6.0
 	github.com/go-chassis/sc-client v0.6.1-0.20210615014358-a45e9090c751
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/gofrs/uuid v4.2.0+incompatible
 )
 
diff --git a/contrib/registry/zookeeper/go.mod b/contrib/registry/zookeeper/go.mod
index aaca519d..e1d65ba6 100644
--- a/contrib/registry/zookeeper/go.mod
+++ b/contrib/registry/zookeeper/go.mod
@@ -3,9 +3,9 @@ module github.com/go-kratos/kratos/contrib/registry/zookeeper/v2
 go 1.19
 
 require (
-	github.com/go-kratos/kratos/v2 v2.8.1
+	github.com/go-kratos/kratos/v2 v2.8.2
 	github.com/go-zookeeper/zk v1.0.3
-	golang.org/x/sync v0.7.0
+	golang.org/x/sync v0.8.0
 )
 
 replace github.com/go-kratos/kratos/v2 => ../../../
diff --git a/contrib/registry/zookeeper/go.sum b/contrib/registry/zookeeper/go.sum
index 0261f031..789f61e0 100644
--- a/contrib/registry/zookeeper/go.sum
+++ b/contrib/registry/zookeeper/go.sum
@@ -1,4 +1,4 @@
 github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg=
 github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
-golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
-golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
+golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
diff --git a/encoding/form/proto_decode.go b/encoding/form/proto_decode.go
index cdd93108..e327b5e0 100644
--- a/encoding/form/proto_decode.go
+++ b/encoding/form/proto_decode.go
@@ -20,7 +20,7 @@ import (
 	"google.golang.org/protobuf/types/known/wrapperspb"
 )
 
-const fieldSeparater = "."
+const fieldSeparator = "."
 
 var errInvalidFormatMapKey = errors.New("invalid formatting for map key")
 
@@ -138,7 +138,7 @@ func populateRepeatedField(fd protoreflect.FieldDescriptor, list protoreflect.Li
 }
 
 func populateMapField(fd protoreflect.FieldDescriptor, mp protoreflect.Map, fieldPath []string, values []string) error {
-	_, keyName, err := parseURLQueryMapKey(strings.Join(fieldPath, fieldSeparater))
+	_, keyName, err := parseURLQueryMapKey(strings.Join(fieldPath, fieldSeparator))
 	if err != nil {
 		return err
 	}
@@ -359,7 +359,7 @@ func parseURLQueryMapKey(key string) (string, string, error) {
 	)
 	if startIndex < 0 {
 		//nolint:mnd
-		values := strings.Split(key, fieldSeparater)
+		values := strings.Split(key, fieldSeparator)
 		//nolint:mnd
 		if len(values) != 2 {
 			return "", "", errInvalidFormatMapKey
diff --git a/internal/matcher/middleware.go b/internal/matcher/middleware.go
index 8d568182..1fa8e0a2 100644
--- a/internal/matcher/middleware.go
+++ b/internal/matcher/middleware.go
@@ -17,14 +17,14 @@ type Matcher interface {
 // New new a middleware matcher.
 func New() Matcher {
 	return &matcher{
-		matchs: make(map[string][]middleware.Middleware),
+		matches: make(map[string][]middleware.Middleware),
 	}
 }
 
 type matcher struct {
 	prefix   []string
 	defaults []middleware.Middleware
-	matchs   map[string][]middleware.Middleware
+	matches  map[string][]middleware.Middleware
 }
 
 func (m *matcher) Use(ms ...middleware.Middleware) {
@@ -42,7 +42,7 @@ func (m *matcher) Add(selector string, ms ...middleware.Middleware) {
 			return m.prefix[i] > m.prefix[j]
 		})
 	}
-	m.matchs[selector] = ms
+	m.matches[selector] = ms
 }
 
 func (m *matcher) Match(operation string) []middleware.Middleware {
@@ -50,12 +50,12 @@ func (m *matcher) Match(operation string) []middleware.Middleware {
 	if len(m.defaults) > 0 {
 		ms = append(ms, m.defaults...)
 	}
-	if next, ok := m.matchs[operation]; ok {
+	if next, ok := m.matches[operation]; ok {
 		return append(ms, next...)
 	}
 	for _, prefix := range m.prefix {
 		if strings.HasPrefix(operation, prefix) {
-			return append(ms, m.matchs[prefix]...)
+			return append(ms, m.matches[prefix]...)
 		}
 	}
 	return ms
diff --git a/log/README.md b/log/README.md
index 8c4c7b76..126763ce 100644
--- a/log/README.md
+++ b/log/README.md
@@ -8,7 +8,7 @@
 logger := log.NewStdLogger(os.Stdout)
 // fields & valuer
 logger = log.With(logger,
-    "service.name", "hellworld",
+    "service.name", "helloworld",
     "service.version", "v1.0.0",
     "ts", log.DefaultTimestamp,
     "caller", log.DefaultCaller,
diff --git a/log/global.go b/log/global.go
index f1984fc3..ae9244df 100644
--- a/log/global.go
+++ b/log/global.go
@@ -13,7 +13,7 @@ var global = &loggerAppliance{}
 // loggerAppliance is the proxy of `Logger` to
 // make logger change will affect all sub-logger.
 type loggerAppliance struct {
-	lock sync.Mutex
+	lock sync.RWMutex
 	Logger
 }
 
@@ -35,7 +35,9 @@ func SetLogger(logger Logger) {
 
 // GetLogger returns global logger appliance as logger in current process.
 func GetLogger() Logger {
-	return global
+	global.lock.RLock()
+	defer global.lock.RUnlock()
+	return global.Logger
 }
 
 // Log Print log by level and keyvals.
diff --git a/middleware/tracing/metadata.go b/middleware/tracing/metadata.go
index 7ad82806..4d9e7de5 100644
--- a/middleware/tracing/metadata.go
+++ b/middleware/tracing/metadata.go
@@ -40,7 +40,7 @@ func (b Metadata) Extract(parent context.Context, carrier propagation.TextMapCar
 	return parent
 }
 
-// Fields returns the keys who's values are set with Inject.
+// Fields returns the keys whose values are set with Inject.
 func (b Metadata) Fields() []string {
 	return []string{serviceHeader}
 }
diff --git a/third_party/validate/validate.proto b/third_party/validate/validate.proto
index 867d4f76..6b65ce33 100644
--- a/third_party/validate/validate.proto
+++ b/third_party/validate/validate.proto
@@ -535,7 +535,7 @@ message StringRules {
     // at a maximum
     optional uint64 max_bytes = 5;
 
-    // Pattern specifes that this field must match against the specified
+    // Pattern specifies that this field must match against the specified
     // regular expression (RE2 syntax). The included expression should elide
     // any delimiters.
     optional string pattern  = 6;
@@ -647,7 +647,7 @@ message BytesRules {
     // at a maximum
     optional uint64 max_len = 3;
 
-    // Pattern specifes that this field must match against the specified
+    // Pattern specifies that this field must match against the specified
     // regular expression (RE2 syntax). The included expression should elide
     // any delimiters.
     optional string pattern  = 4;
diff --git a/transport/grpc/resolver/discovery/builder.go b/transport/grpc/resolver/discovery/builder.go
index 5a084416..e8e98726 100644
--- a/transport/grpc/resolver/discovery/builder.go
+++ b/transport/grpc/resolver/discovery/builder.go
@@ -113,7 +113,7 @@ func (b *builder) Build(target resolver.Target, cc resolver.ClientConn, _ resolv
 		insecure:    b.insecure,
 		debugLog:    b.debugLog,
 		subsetSize:  b.subsetSize,
-		selecterKey: uuid.New().String(),
+		selectorKey: uuid.New().String(),
 	}
 	go r.watch()
 	return r, nil
diff --git a/transport/grpc/resolver/discovery/resolver.go b/transport/grpc/resolver/discovery/resolver.go
index 36effe71..4a7262a2 100644
--- a/transport/grpc/resolver/discovery/resolver.go
+++ b/transport/grpc/resolver/discovery/resolver.go
@@ -24,7 +24,7 @@ type discoveryResolver struct {
 
 	insecure    bool
 	debugLog    bool
-	selecterKey string
+	selectorKey string
 	subsetSize  int
 }
 
@@ -70,7 +70,7 @@ func (r *discoveryResolver) update(ins []*registry.ServiceInstance) {
 		filtered = append(filtered, in)
 	}
 	if r.subsetSize != 0 {
-		filtered = subset.Subset(r.selecterKey, filtered, r.subsetSize)
+		filtered = subset.Subset(r.selectorKey, filtered, r.subsetSize)
 	}
 
 	addrs := make([]resolver.Address, 0, len(filtered))
diff --git a/transport/http/resolver.go b/transport/http/resolver.go
index e0db0cb6..01c6c628 100644
--- a/transport/http/resolver.go
+++ b/transport/http/resolver.go
@@ -47,7 +47,7 @@ type resolver struct {
 
 	target      *Target
 	watcher     registry.Watcher
-	selecterKey string
+	selectorKey string
 	subsetSize  int
 
 	insecure bool
@@ -66,7 +66,7 @@ func newResolver(ctx context.Context, discovery registry.Discovery, target *Targ
 		watcher:     watcher,
 		rebalancer:  rebalancer,
 		insecure:    insecure,
-		selecterKey: uuid.New().String(),
+		selectorKey: uuid.New().String(),
 		subsetSize:  subsetSize,
 	}
 	if block {
@@ -133,7 +133,7 @@ func (r *resolver) update(services []*registry.ServiceInstance) bool {
 		filtered = append(filtered, ins)
 	}
 	if r.subsetSize != 0 {
-		filtered = subset.Subset(r.selecterKey, filtered, r.subsetSize)
+		filtered = subset.Subset(r.selectorKey, filtered, r.subsetSize)
 	}
 	nodes := make([]selector.Node, 0, len(filtered))
 	for _, ins := range filtered {
diff --git a/version.go b/version.go
index c6f87a57..04b88896 100644
--- a/version.go
+++ b/version.go
@@ -1,4 +1,4 @@
 package kratos
 
 // Release is the current kratos version.
-const Release = "v2.8.1"
+const Release = "v2.8.2"


Test patch:
diff --git a/config/options_test.go b/config/options_test.go
index 348471d3..aebc673a 100644
--- a/config/options_test.go
+++ b/config/options_test.go
@@ -185,7 +185,7 @@ func TestDefaultResolver(t *testing.T) {
 				default:
 					actual = v.Load()
 					if !reflect.DeepEqual(test.expect, actual) {
-						t.Logf("expect: %#v, actural: %#v", test.expect, actual)
+						t.Logf("expect: %#v, actual: %#v", test.expect, actual)
 						t.Fail()
 					}
 				}
@@ -343,7 +343,7 @@ func TestNewDefaultResolver(t *testing.T) {
 				default:
 					actual = v.Load()
 					if !reflect.DeepEqual(test.expect, actual) {
-						t.Logf("expect: %#v, actural: %#v", test.expect, actual)
+						t.Logf("expect: %#v, actual: %#v", test.expect, actual)
 						t.Fail()
 					}
 				}
diff --git a/contrib/registry/consul/registry_test.go b/contrib/registry/consul/registry_test.go
index 8133c55c..743e1dfb 100644
--- a/contrib/registry/consul/registry_test.go
+++ b/contrib/registry/consul/registry_test.go
@@ -117,8 +117,8 @@ func TestRegistry_Register(t *testing.T) {
 					t.Error(err)
 				}
 			}
-
-			watch, err := r.Watch(tt.args.ctx, tt.args.serverName)
+			watchCtx, watchCancel := context.WithCancel(context.Background())
+			watch, err := r.Watch(watchCtx, tt.args.serverName)
 			if err != nil {
 				t.Error(err)
 			}
@@ -127,6 +127,7 @@ func TestRegistry_Register(t *testing.T) {
 			if (err != nil) != tt.wantErr {
 				t.Errorf("GetService() error = %v, wantErr %v", err, tt.wantErr)
 				t.Errorf("GetService() got = %v", got)
+				watchCancel()
 				return
 			}
 			if !reflect.DeepEqual(got, tt.want) {
@@ -136,6 +137,11 @@ func TestRegistry_Register(t *testing.T) {
 			for _, instance := range tt.args.server {
 				_ = r.Deregister(tt.args.ctx, instance)
 			}
+			err = watch.Stop()
+			if err != nil {
+				t.Error(err)
+			}
+			watchCancel()
 		})
 	}
 }
@@ -204,7 +210,8 @@ func TestRegistry_GetService(t *testing.T) {
 				if err := r.Register(context.Background(), instance1); err != nil {
 					t.Error(err)
 				}
-				watch, err := r.Watch(context.Background(), instance1.Name)
+				watchCtx, watchCancel := context.WithCancel(context.Background())
+				watch, err := r.Watch(watchCtx, instance1.Name)
 				if err != nil {
 					t.Error(err)
 				}
@@ -212,6 +219,11 @@ func TestRegistry_GetService(t *testing.T) {
 				if err != nil {
 					t.Error(err)
 				}
+				err = watch.Stop()
+				if err != nil {
+					t.Error(err)
+				}
+				watchCancel()
 			},
 			deferFunc: func(t *testing.T) {
 				err := r.Deregister(context.Background(), instance1)
@@ -233,7 +245,8 @@ func TestRegistry_GetService(t *testing.T) {
 				if err := r.Register(context.Background(), instance2); err != nil {
 					t.Error(err)
 				}
-				watch, err := r.Watch(context.Background(), instance2.Name)
+				watchCtx, watchCancel := context.WithCancel(context.Background())
+				watch, err := r.Watch(watchCtx, instance2.Name)
 				if err != nil {
 					t.Error(err)
 				}
@@ -241,6 +254,11 @@ func TestRegistry_GetService(t *testing.T) {
 				if err != nil {
 					t.Error(err)
 				}
+				err = watch.Stop()
+				if err != nil {
+					t.Error(err)
+				}
+				watchCancel()
 			},
 			deferFunc: func(t *testing.T) {
 				err := r.Deregister(context.Background(), instance2)
@@ -387,7 +405,6 @@ func TestRegistry_Watch(t *testing.T) {
 					t.Error(err)
 				}
 			}()
-
 			watch, err := r.Watch(tt.args.ctx, tt.args.instance.Name)
 			if err != nil {
 				t.Error(err)
@@ -407,6 +424,10 @@ func TestRegistry_Watch(t *testing.T) {
 			if !reflect.DeepEqual(service, tt.want) {
 				t.Errorf("GetService() got = %v, want %v", service, tt.want)
 			}
+			err = watch.Stop()
+			if err != nil {
+				t.Error(err)
+			}
 		})
 	}
 }
@@ -475,40 +496,50 @@ func TestRegistry_IdleAndWatch(t *testing.T) {
 			}()
 
 			for i := 0; i < 10; i++ {
-				watch, err1 := r.Watch(context.Background(), tt.args.instance.Name)
+				watchCtx, watchCancel := context.WithCancel(context.Background())
+				watch, err1 := r.Watch(watchCtx, tt.args.instance.Name)
 				if err1 != nil {
 					t.Error(err1)
 				}
-				go func(i int) {
-					// first
-					service, err2 := watch.Next()
-					if (err2 != nil) != tt.wantErr {
-						t.Errorf("GetService() error = %v, wantErr %v", err, tt.wantErr)
-						t.Errorf("GetService() got = %v", service)
-						return
-					}
-					// instance changes
-					service, err2 = watch.Next()
-					if i == 9 {
-						return
-					}
-					if (err2 != nil) != tt.wantErr {
-						t.Errorf("GetService() error = %v, wantErr %v", err, tt.wantErr)
-						t.Errorf("GetService() got = %v", service)
-						return
-					}
-					if !reflect.DeepEqual(service, tt.want) {
-						t.Errorf("GetService() got = %v, want %v", service, tt.want)
-					}
-					// t.Logf("service:%v, i:%d", service, i)
-				}(i)
-				if i == 9 {
+				if i != 9 {
+					go func(i int) {
+						// first
+						service, err2 := watch.Next()
+						if (err2 != nil) != tt.wantErr {
+							t.Errorf("GetService() error = %v, wantErr %v", err, tt.wantErr)
+							t.Errorf("GetService() got = %v", service)
+							watchCancel()
+							return
+						}
+						// instance changes
+						service, err2 = watch.Next()
+						if i == 9 {
+							return
+						}
+						if (err2 != nil) != tt.wantErr {
+							t.Errorf("GetService() error = %v, wantErr %v", err, tt.wantErr)
+							t.Errorf("GetService() got = %v", service)
+							watchCancel()
+							return
+						}
+						if !reflect.DeepEqual(service, tt.want) {
+							t.Errorf("GetService() got = %v, want %v", service, tt.want)
+						}
+						err2 = watch.Stop()
+						if err2 != nil {
+							t.Error(err)
+						}
+						watchCancel()
+						// t.Logf("service:%v, i:%d", service, i)
+					}(i)
+				} else {
 					time.Sleep(time.Second * 3)
 					// become idle, close watcher
 					err1 = watch.Stop()
 					if err1 != nil {
 						t.Errorf("watch stop err:%v", err)
 					}
+					watchCancel()
 				}
 			}
 			time.Sleep(2 * time.Second)
@@ -615,7 +646,7 @@ func TestRegistry_IdleAndWatch2(t *testing.T) {
 			cancel()
 			time.Sleep(time.Second * 2)
 			// Everything is idle. Add new watch.
-			watchCtx := context.Background()
+			watchCtx, watchCancel := context.WithCancel(context.Background())
 			watch, err := r.Watch(watchCtx, tt.args.instance.Name)
 			if err != nil {
 				t.Error(err)
@@ -624,11 +655,13 @@ func TestRegistry_IdleAndWatch2(t *testing.T) {
 			if (err != nil) != tt.wantErr {
 				t.Errorf("GetService() error = %v, wantErr %v", err, tt.wantErr)
 				t.Errorf("GetService() got = %v", service)
+				watchCancel()
 				return
 			}
 			if !reflect.DeepEqual(service, tt.want) {
 				t.Errorf("GetService() got = %v, want %v", service, tt.want)
 			}
+			watchCancel()
 		})
 	}
 }
diff --git a/contrib/registry/kubernetes/registry_test.go b/contrib/registry/kubernetes/registry_test.go
index 6f9761a4..1ba71fed 100644
--- a/contrib/registry/kubernetes/registry_test.go
+++ b/contrib/registry/kubernetes/registry_test.go
@@ -150,7 +150,7 @@ func TestRegistry(t *testing.T) {
 
 	os.Setenv("HOSTNAME", pod.Items[0].Name)
 
-	// Alway remember delete test resource
+	// Always remember delete test resource
 	defer func() {
 		_ = clientSet.AppsV1().Deployments(namespace).Delete(context.Background(), deployName, metav1.DeleteOptions{})
 	}()
diff --git a/encoding/form/form_test.go b/encoding/form/form_test.go
index a81c5151..de13a65b 100644
--- a/encoding/form/form_test.go
+++ b/encoding/form/form_test.go
@@ -237,7 +237,7 @@ func TestDecodeStructPb(t *testing.T) {
 		t.Errorf("except %v, got %v", "kratos", req.Data.GetFields()["name"].GetStringValue())
 	}
 	if len(req.DataList) != 2 {
-		t.Fatalf("execpt %v, got %v", 2, len(req.DataList))
+		t.Fatalf("except %v, got %v", 2, len(req.DataList))
 	}
 	if "kratos" != req.DataList[0].GetFields()["name1"].GetStringValue() {
 		t.Errorf("except %v, got %v", "kratos", req.Data.GetFields()["name1"].GetStringValue())
diff --git a/log/filter_test.go b/log/filter_test.go
index f95f4976..91133c1b 100644
--- a/log/filter_test.go
+++ b/log/filter_test.go
@@ -102,7 +102,7 @@ func TestFilterFuncWitchLoggerPrefix(t *testing.T) {
 		want   string
 	}{
 		{
-			logger: NewFilter(With(NewStdLogger(buf), "caller", "caller", "prefix", "whaterver"), FilterFunc(testFilterFuncWithLoggerPrefix)),
+			logger: NewFilter(With(NewStdLogger(buf), "caller", "caller", "prefix", "whatever"), FilterFunc(testFilterFuncWithLoggerPrefix)),
 			want:   "",
 		},
 		{
@@ -168,7 +168,7 @@ func TestFilterWithContext(t *testing.T) {
 	_ = WithContext(ctx, filter).Log(LevelInfo, "kind", "test")
 
 	if info.String() != "" {
-		t.Error("filter is not woring")
+		t.Error("filter is not working")
 		return
 	}
 
diff --git a/log/global_test.go b/log/global_test.go
index 8ee15705..469fae31 100644
--- a/log/global_test.go
+++ b/log/global_test.go
@@ -117,3 +117,23 @@ func TestGlobalContext(t *testing.T) {
 		t.Errorf("Expected:%s, got:%s", "INFO msg=111", buffer.String())
 	}
 }
+
+func TestContextWithGlobalLog(t *testing.T) {
+	buffer := &bytes.Buffer{}
+
+	type traceKey struct{}
+	// set "trace-id" Valuer
+	newLogger := With(NewStdLogger(buffer), "trace-id", Valuer(func(ctx context.Context) interface{} {
+		return ctx.Value(traceKey{})
+	}))
+
+	SetLogger(newLogger)
+
+	// add value to ctx
+	ctx := context.WithValue(context.Background(), traceKey{}, "test-trace-id")
+
+	_ = WithContext(ctx, GetLogger()).Log(LevelInfo)
+	if buffer.String() != "INFO trace-id=test-trace-id\n" {
+		t.Errorf("Expected:%s, got:%s", "INFO trace-id=test-trace-id", buffer.String())
+	}
+}