summaryrefslogtreecommitdiff
path: root/vendor/github.com/uber/jaeger-client-go/contrib_observer.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-08 06:21:54 -0500
committerGitHub <noreply@github.com>2021-03-08 06:21:54 -0500
commit7c09752fb88faba0cda07dbeabe17616c7262ea1 (patch)
treebd626d1310b64b2f5410a2ca8a7f5a7232634d2b /vendor/github.com/uber/jaeger-client-go/contrib_observer.go
parentb7c00f2cc03499d5d385a7aa7e8cd35d0ab994d7 (diff)
parentd0d084dd8ce37141e0a2f0e9def78ffbb613ab94 (diff)
downloadpodman-7c09752fb88faba0cda07dbeabe17616c7262ea1.tar.gz
podman-7c09752fb88faba0cda07dbeabe17616c7262ea1.tar.bz2
podman-7c09752fb88faba0cda07dbeabe17616c7262ea1.zip
Merge pull request #9525 from vrothberg/prune
[NO TESTS NEEDED] Prune and debloat
Diffstat (limited to 'vendor/github.com/uber/jaeger-client-go/contrib_observer.go')
-rw-r--r--vendor/github.com/uber/jaeger-client-go/contrib_observer.go56
1 files changed, 0 insertions, 56 deletions
diff --git a/vendor/github.com/uber/jaeger-client-go/contrib_observer.go b/vendor/github.com/uber/jaeger-client-go/contrib_observer.go
deleted file mode 100644
index 4ce1881f3..000000000
--- a/vendor/github.com/uber/jaeger-client-go/contrib_observer.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2017 Uber Technologies, Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package jaeger
-
-import (
- opentracing "github.com/opentracing/opentracing-go"
-)
-
-// ContribObserver can be registered with the Tracer to receive notifications
-// about new Spans. Modelled after github.com/opentracing-contrib/go-observer.
-type ContribObserver interface {
- // Create and return a span observer. Called when a span starts.
- // If the Observer is not interested in the given span, it must return (nil, false).
- // E.g :
- // func StartSpan(opName string, opts ...opentracing.StartSpanOption) {
- // var sp opentracing.Span
- // sso := opentracing.StartSpanOptions{}
- // if spanObserver, ok := Observer.OnStartSpan(span, opName, sso); ok {
- // // we have a valid SpanObserver
- // }
- // ...
- // }
- OnStartSpan(sp opentracing.Span, operationName string, options opentracing.StartSpanOptions) (ContribSpanObserver, bool)
-}
-
-// ContribSpanObserver is created by the Observer and receives notifications
-// about other Span events. This interface is meant to match
-// github.com/opentracing-contrib/go-observer, via duck typing, without
-// directly importing the go-observer package.
-type ContribSpanObserver interface {
- OnSetOperationName(operationName string)
- OnSetTag(key string, value interface{})
- OnFinish(options opentracing.FinishOptions)
-}
-
-// wrapper observer for the old observers (see observer.go)
-type oldObserver struct {
- obs Observer
-}
-
-func (o *oldObserver) OnStartSpan(sp opentracing.Span, operationName string, options opentracing.StartSpanOptions) (ContribSpanObserver, bool) {
- spanObserver := o.obs.OnStartSpan(operationName, options)
- return spanObserver, spanObserver != nil
-}