/
grpcmetric.go
27 lines (22 loc) · 893 Bytes
/
grpcmetric.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2021 The searKing Author. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package otelgrpc
import (
otelcontrib "go.opentelemetry.io/contrib"
"go.opentelemetry.io/otel/attribute"
)
const (
// GRPCTypeKey is convention for grpc type of gRPC connection.
GRPCTypeKey = attribute.Key("rpc.grpc.type")
)
var (
// InstrumentationName is the name of this instrumentation package.
InstrumentationName = "github.com/searKing/golang/third_party/github.com/open-telemetry/opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc"
// InstrumentationVersion is the version of this instrumentation package.
InstrumentationVersion = otelcontrib.Version()
// AttrsFilter is a filter before Report
AttrsFilter = func(attrs ...attribute.KeyValue) []attribute.KeyValue {
return attrs
}
)