= gin
[source,bash]
----
go get -v github.com/tel-io/instrumentation/subMiddleware/gin@latest
----
[source,go]
----
import (
mw "github.com/tel-io/instrumentation/subMiddleware/gin"
)
func main(){
// should be initialized at first
t, cc := tel.New(ccx, cfg)
defer cc()
app := gin.Default()
app.Use(mw.ServerMiddlewareAll())
}
----
== example
Assume that you in gin folder
=== Launch OTEL stack
[source,bash]
----
docker-compose -p otel -f ../../docker/docker-compose.yaml up
----
=== Run app
==== from source
[source,bash]
----
go run ./example
----
==== from docker-composer
[source,bash]
----
go run ./example
----
=== Check out
[source,bash]
----
curl http://127.0.0.1:8080/crash
curl http://127.0.0.1:8080/user/123/qqq
curl http://127.0.0.1:8080/hello
curl http://127.0.0.1:8080/
for i in {1..100}; do; curl http://127.0.0.1:8080/user/123/qqq ;done;
----
and take a look at grafana dashboards. in particular HTTP dashboard
[source,bash]
----
open http://127.0.0.1:3000
----