Bump github.com/openzipkin/zipkin-go from 0.4.2 to 0.4.3 (#3026)

* Bump github.com/openzipkin/zipkin-go from 0.4.2 to 0.4.3

Bumps [github.com/openzipkin/zipkin-go](https://github.com/openzipkin/zipkin-go) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/openzipkin/zipkin-go/releases)
- [Commits](https://github.com/openzipkin/zipkin-go/compare/v0.4.2...v0.4.3)

---
updated-dependencies:
- dependency-name: github.com/openzipkin/zipkin-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Run ./hack/update-codegen.sh

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2024-04-29 07:26:39 +00:00 committed by GitHub
parent ca5f1cee7d
commit 75c6937594
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 49 additions and 15 deletions

2
go.mod
View File

@ -23,7 +23,7 @@ require (
github.com/gorilla/websocket v1.5.1 github.com/gorilla/websocket v1.5.1
github.com/hashicorp/golang-lru v1.0.2 github.com/hashicorp/golang-lru v1.0.2
github.com/kelseyhightower/envconfig v1.4.0 github.com/kelseyhightower/envconfig v1.4.0
github.com/openzipkin/zipkin-go v0.4.2 github.com/openzipkin/zipkin-go v0.4.3
github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_golang v1.19.0
github.com/prometheus/common v0.53.0 github.com/prometheus/common v0.53.0
github.com/spf13/pflag v1.0.5 github.com/spf13/pflag v1.0.5

4
go.sum
View File

@ -301,8 +301,8 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg=
github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg=
github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c=
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

View File

@ -1,6 +1,8 @@
run: run:
deadline: 5m timeout: 5m
skip-dirs:
issues:
exclude-dirs:
- zipkin_proto3 - zipkin_proto3
linters: linters:
@ -16,6 +18,7 @@ linters:
- lll - lll
- misspell - misspell
- nakedret - nakedret
- revive
- unparam - unparam
- unused - unused
@ -26,5 +29,5 @@ linters-settings:
line-length: 170 line-length: 170
gocyclo: gocyclo:
min-complexity: 20 min-complexity: 20
golint: revive:
min-confidence: 0.85 confidence: 0.85

View File

@ -112,5 +112,17 @@ Producer digesting JSON V2 Spans. The reporter uses the
[Sarama async producer](https://pkg.go.dev/github.com/IBM/sarama#AsyncProducer) [Sarama async producer](https://pkg.go.dev/github.com/IBM/sarama#AsyncProducer)
underneath. underneath.
## usage and examples ## Usage and Examples
[HTTP Server Example](examples/httpserver_test.go) [HTTP Server Example](examples/httpserver_test.go)
## Go Support Policy
zipkin-go follows the same version policy as Go's [Release Policy](https://go.dev/doc/devel/release):
two versions. zipkin-go will ensure these versions work and bugs are valid if
there's an issue with a current Go version.
Additionally, zipkin-go intentionally delays usage of language or standard
library features one additional version. For example, when Go 1.29 is released,
zipkin-go can use language features or standard libraries added in 1.27. This
is a convenience for embedders who have a slower version policy than Go.
However, only supported Go versions may be used to raise support issues.

13
vendor/github.com/openzipkin/zipkin-go/SECURITY.md generated vendored Normal file
View File

@ -0,0 +1,13 @@
# OpenZipkin Security Process
This document outlines the process for handling security concerns in OpenZipkin projects.
Any vulnerability or misconfiguration detected in our [security workflow](.github/workflows/security.yml)
should be addressed as a normal pull request.
OpenZipkin is a volunteer community and does not have a dedicated security team. There may be
periods where no volunteer is able to address a security concern. There is no SLA or warranty
offered by volunteers. If you are a security researcher, please consider this before escalating.
For security concerns that are sensitive or otherwise outside the scope of public issues, please
contact zipkin-admin@googlegroups.com.

View File

@ -80,7 +80,9 @@ func (s *spanImpl) Finish() {
if atomic.CompareAndSwapInt32(&s.mustCollect, 1, 0) { if atomic.CompareAndSwapInt32(&s.mustCollect, 1, 0) {
s.Duration = time.Since(s.Timestamp) s.Duration = time.Since(s.Timestamp)
if s.flushOnFinish { if s.flushOnFinish {
s.mtx.RLock()
s.tracer.reporter.Send(s.SpanModel) s.tracer.reporter.Send(s.SpanModel)
s.mtx.RUnlock()
} }
} }
} }
@ -89,13 +91,17 @@ func (s *spanImpl) FinishedWithDuration(d time.Duration) {
if atomic.CompareAndSwapInt32(&s.mustCollect, 1, 0) { if atomic.CompareAndSwapInt32(&s.mustCollect, 1, 0) {
s.Duration = d s.Duration = d
if s.flushOnFinish { if s.flushOnFinish {
s.mtx.RLock()
s.tracer.reporter.Send(s.SpanModel) s.tracer.reporter.Send(s.SpanModel)
s.mtx.RUnlock()
} }
} }
} }
func (s *spanImpl) Flush() { func (s *spanImpl) Flush() {
if s.SpanModel.Debug || (s.SpanModel.Sampled != nil && *s.SpanModel.Sampled) { if s.SpanModel.Debug || (s.SpanModel.Sampled != nil && *s.SpanModel.Sampled) {
s.mtx.RLock()
s.tracer.reporter.Send(s.SpanModel) s.tracer.reporter.Send(s.SpanModel)
s.mtx.RUnlock()
} }
} }

View File

@ -26,7 +26,7 @@ type SpanOption func(t *Tracer, s *spanImpl)
// Kind sets the kind of the span being created. // Kind sets the kind of the span being created.
func Kind(kind model.Kind) SpanOption { func Kind(kind model.Kind) SpanOption {
return func(t *Tracer, s *spanImpl) { return func(_ *Tracer, s *spanImpl) {
s.Kind = kind s.Kind = kind
} }
} }
@ -54,14 +54,14 @@ func Parent(sc model.SpanContext) SpanOption {
// StartTime uses a given start time for the span being created. // StartTime uses a given start time for the span being created.
func StartTime(start time.Time) SpanOption { func StartTime(start time.Time) SpanOption {
return func(t *Tracer, s *spanImpl) { return func(_ *Tracer, s *spanImpl) {
s.Timestamp = start s.Timestamp = start
} }
} }
// RemoteEndpoint sets the remote endpoint of the span being created. // RemoteEndpoint sets the remote endpoint of the span being created.
func RemoteEndpoint(e *model.Endpoint) SpanOption { func RemoteEndpoint(e *model.Endpoint) SpanOption {
return func(t *Tracer, s *spanImpl) { return func(_ *Tracer, s *spanImpl) {
s.RemoteEndpoint = e s.RemoteEndpoint = e
} }
} }
@ -69,7 +69,7 @@ func RemoteEndpoint(e *model.Endpoint) SpanOption {
// Tags sets initial tags for the span being created. If default tracer tags // Tags sets initial tags for the span being created. If default tracer tags
// are present they will be overwritten on key collisions. // are present they will be overwritten on key collisions.
func Tags(tags map[string]string) SpanOption { func Tags(tags map[string]string) SpanOption {
return func(t *Tracer, s *spanImpl) { return func(_ *Tracer, s *spanImpl) {
for k, v := range tags { for k, v := range tags {
s.Tags[k] = v s.Tags[k] = v
} }
@ -82,7 +82,7 @@ func Tags(tags map[string]string) SpanOption {
// This is available if late tag data is expected to be only available after the // This is available if late tag data is expected to be only available after the
// required finish time of the Span. // required finish time of the Span.
func FlushOnFinish(b bool) SpanOption { func FlushOnFinish(b bool) SpanOption {
return func(t *Tracer, s *spanImpl) { return func(_ *Tracer, s *spanImpl) {
s.flushOnFinish = b s.flushOnFinish = b
} }
} }

4
vendor/modules.txt vendored
View File

@ -243,8 +243,8 @@ github.com/modern-go/reflect2
# github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
## explicit ## explicit
github.com/munnerz/goautoneg github.com/munnerz/goautoneg
# github.com/openzipkin/zipkin-go v0.4.2 # github.com/openzipkin/zipkin-go v0.4.3
## explicit; go 1.18 ## explicit; go 1.20
github.com/openzipkin/zipkin-go github.com/openzipkin/zipkin-go
github.com/openzipkin/zipkin-go/idgenerator github.com/openzipkin/zipkin-go/idgenerator
github.com/openzipkin/zipkin-go/model github.com/openzipkin/zipkin-go/model