opentracing-contrib / go-gin Goto Github PK
View Code? Open in Web Editor NEWOpenTracing middleware for gin-gonic
License: BSD 3-Clause "New" or "Revised" License
OpenTracing middleware for gin-gonic
License: BSD 3-Clause "New" or "Revised" License
Leaving this here to coordinate moving this repo to opentracing-contrib.
We would like to be able to set the span operation name to the matched gin route, however currently this is difficult. For example, if there is a route /user/:name
, and a request is made to /user/foo
, we would like to set the span name to the former.
The default span operation name is HTTP + method
, e.g. HTTP GET
. It's possible to override this default using the OperationNameFunc
option, which gives access to the http.Request
object, however I don't think that can be used to get the matched route (it's obviously possible to get the path, but that could contain path parameters, which we want to avoid).
As a side note, the gorilla/mux Opentracing middleware implementation defaults to the matched route as the operation name, see https://github.com/opentracing-contrib/go-gorilla/blob/3ee496ae11d5bebfd34703cee4efa29e0439a33d/gorilla/server.go#L35, which I think makes more sense than just the HTTP method used.
Looks like the tags are missing v
prefix
As per go module doc
Every required module in a go.mod has a semantic version, the minimum version of that dependency to use to build the module.
A semantic version has the form vMAJOR.MINOR.PATCH.
Because of this go module puts an alias v0.0.0 and then hash of the commit of each tag
e.g.
$ go get -u github.com/opentracing-contrib/[email protected]
go: github.com/opentracing-contrib/go-gin 1.0.0 => v0.0.0-20190301172248-2e18f8b9c7d4
This also could confuse some folks who aren't familiar with go versioning and could result in 404 if prefix v
is specified in go get
$ go get -u github.com/opentracing-contrib/[email protected]
go get github.com/opentracing-contrib/[email protected]: github.com/opentracing-contrib/[email protected]: invalid version: unknown revision v2.0.0
Currently this project does not use go modules. Also, there is there are no tags to reference it.
We still can use it in projects using go modules by referencing by the commit hash, which is not ideal.
I could add a MR using go modules, but to tag I would need permission.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.