Comments (7)
if we have a handler like:
func doSomething( c *gin.Context ) {...}
then register 2 handler:
eg = gin.New()
eg.Use( Middleware(eg, tracer) )
eg.POST( "/api/v1/m1", doSomething )
eg.POST( "/api/v1/m2", doSomething )
according to the code in go2sky gin plugin:
mm[r.Handler] = routeInfo{ operationName: fmt.Sprintf("/%s%s", r.Method, r.Path), }
the mm will be:
mm['doSomething'] = "/POST/api/v1/m1" // will be overwrited by m2
mm['doSomething'] = "/POST/api/v1/m2"
all the request from "/POST/api/v1/m1" will be recognized as "/POST/api/v1/m2", as it's overwrited.
hope this helps.
from go2sky.
Hi @Logic0
Glad to receive your feedback. I don't quite understand what you said. Could you give me an example :)
from go2sky.
Thank you. It does happen. Let me see how to solve it.
from go2sky.
Hi @Logic0, If use http.Request.Method + http.Request.URL.Path
as the operation name, so /user/:name
will generate multiple operation name, I will keep the current solution until there is a better solution.
from go2sky.
We did a discussion, this should be plugin FAQ.
from go2sky.
@Logic0 As you have known the logic behind this, I recommend using a method wrapper to make this conflict gone. I have talked with @arugal, my suggestion would like to add a FAQ document with an example.
from go2sky.
Hi @Logic0 https://github.com/SkyAPM/go2sky-plugins/tree/master/gin/v3 We provide a new version, welcome to use.
from go2sky.
Related Issues (20)
- close gRPCReporter error HOT 2
- go get error HOT 5
- Tracing event source and sink in knative eventing HOT 6
- How to send log to the log page? HOT 1
- Grpc Reporter's logger cannot use custom logger.
- To create a exit span with one statement, not two statement HOT 3
- It has small probability will be panic HOT 5
- [Broken] CROSS_PROCESS HOT 1
- Can go2sky support output to kafka/pulsar HOT 4
- go2sky.SetGlobalTracer is undefined in v1.3.0 HOT 1
- fetch dynamic configuration error rpc error: code = PermissionDenied desc = HOT 6
- send keep alive signal error rpc error HOT 3
- unexpected EOF HOT 2
- panic on google.golang.org/protobuf/encoding/protowire.AppendString
- Unexcepted parentSpanID when parent span is ended HOT 1
- fetch dynamic configuration error rpc error: code = Unimplemented desc = Method not found: skywalking.v3.ConfigurationDiscoveryService/fetchConfigurations HOT 6
- gRPCReporter can use nanosecond instead of millisecond HOT 1
- Make sampling decision with span tags. HOT 5
- reach max send buffer
- memory leak
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go2sky.