Skip to content

Commit

Permalink
Merge pull request #6 from trpc-ecosystem/bugfix/csuzhang_fix_typo_be…
Browse files Browse the repository at this point in the history
…fore_release_published
  • Loading branch information
hanyuancheung authored Oct 25, 2023
2 parents 60fa949 + ecf2a3a commit e9b6cce
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ plugins:
enable_zpage: false # Default false, when enabled, the processor exports span locally and can be viewed at /debug/tracez
```
3. metrcs plugin setup
3. metrics plugin setup
default registered to etcd cluster, can be turned off.
support prometheus gateway, require program sending delete request to push gateway before exit, add defer metric.DeletePrometheusPush() in main function, e.g.,
```go
Expand Down
2 changes: 1 addition & 1 deletion config/codes/code_type_mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestCodeTypeMappingDescription_UnmarshalText(t *testing.T) {
{
name: "length exceeds maximum length",
args: args{
text: []byte("success|超长字符串超长字符串超长字符串超长字符串"),
text: []byte("success|Length exceeds maximum length"),
},
fields: fields{
CodeType: CodeTypeSuccess.String(),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.18

require (
github.com/cenkalti/backoff/v4 v4.2.1
github.com/golang/protobuf v1.5.3
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0
github.com/guillermo/go.procmeminfo v0.0.0-20131127224636-be4355a9fb0e
github.com/json-iterator/go v1.1.12
Expand Down Expand Up @@ -45,6 +44,7 @@ require (
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion oteltrpc/README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* caller_service: 主调方服务名,取msg.CallerServiceName()
* caller_method: 主调方方法名,取msg.CallerMethod()
* callee_service: 被调方服务名,取msg.CalleeServiceName()
* callee_method: 被调方方法名,取msg.CalleMethod()
* callee_method: 被调方方法名,取msg.CalleeMethod()

### 被调

Expand Down
4 changes: 2 additions & 2 deletions otelzap/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import (
"sync/atomic"
"time"

v1proto "github.com/golang/protobuf/proto"
jsoniter "github.com/json-iterator/go"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/sdk/resource"
commonproto "go.opentelemetry.io/proto/otlp/common/v1"
logsproto "go.opentelemetry.io/proto/otlp/logs/v1"
resourceproto "go.opentelemetry.io/proto/otlp/resource/v1"
"go.uber.org/zap/zapcore"
"google.golang.org/protobuf/proto"

"trpc-system/go-opentelemetry/pkg/metrics"
sdklog "trpc-system/go-opentelemetry/sdk/log"
Expand Down Expand Up @@ -472,7 +472,7 @@ func (bp *BatchWriteSyncer) shouldProcessInBatch() bool {

// calcLogSize calculates the packet size of a ScopeLogs
func calcLogSize(sl *logsproto.ScopeLogs) int {
return v1proto.Size(sl)
return proto.Size(sl)
}

// BatchSyncerOption apply changes to internalOptions.
Expand Down
3 changes: 1 addition & 2 deletions otelzap/zap_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import (
sdklog "trpc-system/go-opentelemetry/sdk/log"

"go.uber.org/zap"

"github.com/golang/protobuf/proto"
"go.uber.org/zap/zapcore"
"google.golang.org/protobuf/proto"

commonproto "go.opentelemetry.io/proto/otlp/common/v1"
logsproto "go.opentelemetry.io/proto/otlp/logs/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var (
DeferredProcessCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Subsystem: "opentelemetry_sdk",
Name: "defereed_process_counter",
Name: "deferred_process_counter",
Help: "deferred Process Counter",
},
[]string{"status", "telemetry"},
Expand Down
1 change: 0 additions & 1 deletion sdk/metric/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func newTLSConfig(tlsCert TLSCert) *tls.Config {
Certificates: []tls.Certificate{cert},
RootCAs: caCertPool,
}
tlsConfig.BuildNameToCertificate()
return tlsConfig
}
return nil
Expand Down
3 changes: 2 additions & 1 deletion sdk/remote/configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"time"

"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"

"trpc-system/go-opentelemetry/pkg/protocol/opentelemetry-ext/proto/operation"
Expand Down Expand Up @@ -84,7 +85,7 @@ func (rc *remoteConfigurator) syncDaemon() {

func (rc *remoteConfigurator) sync() {
if rc.client == nil {
cc, err := grpc.Dial(rc.remoteServiceAddr, grpc.WithInsecure())
cc, err := grpc.Dial(rc.remoteServiceAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
if rc.debug {
log.Printf("opentelemetry: remote dial err:%v", err)
Expand Down
3 changes: 2 additions & 1 deletion sdk/trace/dyeing_sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/trace"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"

"trpc-system/go-opentelemetry/pkg/protocol/opentelemetry-ext/proto/sampler"
Expand Down Expand Up @@ -149,7 +150,7 @@ func (ws *Sampler) updateDyeingMetadataDaemon() {

func (ws *Sampler) updateDyeingMetadata() {
if ws.client == nil {
cc, err := grpc.Dial(ws.samplerConfig.SamplerServiceAddr, grpc.WithInsecure())
cc, err := grpc.Dial(ws.samplerConfig.SamplerServiceAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/trace/fraction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func Test_getSamplerConfig(t *testing.T) {
},
},
},
SamplerServiceAddr: "your.own.gateway.ip:port ",
SamplerServiceAddr: "your.own.gateway.ip:port",
SyncInterval: time.Millisecond,
},
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/trace/noop.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

// NoopTracerProvider implementation a tracer provider that will do nothing
// use code lines blow to set a noop tracer
// otel.SetTracerProvider(NooTracerProvider)
// otel.SetTracerProvider(NoopTracerProvider)
var NoopTracerProvider = trace.NewNoopTracerProvider()

// SetNoopTracerProvider set the global trace provider as noop
Expand Down

0 comments on commit e9b6cce

Please sign in to comment.