{"id":15187353,"url":"https://github.com/cyprinus12138/otelgin","last_synced_at":"2025-07-04T00:05:18.072Z","repository":{"id":229882417,"uuid":"777892665","full_name":"Cyprinus12138/otelgin","owner":"Cyprinus12138","description":"OpenTelemetry trace \u0026 metric instrumentation as Gin Middleware","archived":false,"fork":false,"pushed_at":"2024-04-13T07:34:01.000Z","size":54,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-04T00:03:47.025Z","etag":null,"topics":["gin","gin-gonic","gin-middleware","http","http-server","metrics","opentelemetry-go","tracer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cyprinus12138.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-26T17:41:52.000Z","updated_at":"2025-03-31T04:49:13.000Z","dependencies_parsed_at":"2024-06-21T04:09:21.499Z","dependency_job_id":"42795d6b-8f1f-4a7f-a84d-dbc62b182df0","html_url":"https://github.com/Cyprinus12138/otelgin","commit_stats":null,"previous_names":["cyprinus12138/otelgin"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Cyprinus12138/otelgin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyprinus12138%2Fotelgin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyprinus12138%2Fotelgin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyprinus12138%2Fotelgin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyprinus12138%2Fotelgin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cyprinus12138","download_url":"https://codeload.github.com/Cyprinus12138/otelgin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyprinus12138%2Fotelgin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263421884,"owners_count":23464046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gin","gin-gonic","gin-middleware","http","http-server","metrics","opentelemetry-go","tracer"],"created_at":"2024-09-27T18:20:29.073Z","updated_at":"2025-07-04T00:05:17.926Z","avatar_url":"https://github.com/Cyprinus12138.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go OpenTelemetry Gonic-gin Trace \u0026 Metrics Instrumentation\n\n[![ci](https://github.com/Cyprinus12138/otelgin/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/Cyprinus12138/otelgin/actions/workflows/go.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Cyprinus12138/otelgin)](https://goreportcard.com/report/github.com/Cyprinus12138/otelgin)\n[![Documentation](https://godoc.org/github.com/Cyprinus12138/otelgin?status.svg)](https://pkg.go.dev/mod/github.com/Cyprinus12138/otelgin)\n\nIt is an OpenTelemetry (OTel) trace \u0026 metric instrumentation for http server implement with Gonic-gin. [Gin Web Framework](https://gin-gonic.com/).\n\n## Install\n\n```bash\n$ go get github.com/Cyprinus12138/otelgin\n```\n\n## Usage\n\nMetrics are reported based on [Semantic Conventions for HTTP Metrics](https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#http-server) :\n\n1. `http.server.request.duration`\n2. `http.server.request.body.size`\n3. `http.server.response.body.size`\n4. `http.server.active_requests`\n\n### Plugin as a middleware\n\n[Example Server](https://github.com/Cyprinus12138/otelgin/blob/main/example/server.go)\n\n```go\n\tr := gin.New()\n    r.Use(otelgin.Middleware(\"my-server\"))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyprinus12138%2Fotelgin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyprinus12138%2Fotelgin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyprinus12138%2Fotelgin/lists"}